npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@juicesharp/rpiv-args

v2.9.0

Published

Pi extension. Shell-style $1 / $ARGUMENTS placeholders and !`cmd` / ```! shell substitution, expanded into your Pi skills at invocation.

Readme

@juicesharp/rpiv-args

npm version License: MIT

Pass arguments to a skill the way you pass them to a shell command. rpiv-args adds $1, $2, $ARGUMENTS and friends to Pi Agent skill bodies, and runs !`cmd` and ```! blocks so real command output is in the prompt before the model reads it. It is for anyone who writes Pi skills and wants to parameterize them instead of keeping one hard-coded copy per case.

Install

pi install npm:@juicesharp/rpiv-args

Restart your Pi session.

Quick start

Create .pi/skills/deploy/SKILL.md in your project (or ~/.pi/agent/skills/deploy/SKILL.md for a personal skill) and put a placeholder in the body:

---
name: deploy
description: Deploy a service to an environment
---

Deploy service $1 to $2.
Current branch: !`git branch --show-current`

Invoke it with arguments:

/skill:deploy api production

The model receives the body with $1 as api, $2 as production, the real branch name in place of the git command, and a trailing Skill input: api production line marking your raw input.

What you get

  • Skills take arguments like shell commands — positionals, $ARGUMENTS and ${@:N:L} slices, split with shell-style quoting, so /skill:deploy "staging server" --force puts staging server in $1.
  • Command output lands in the prompt, not in a tool call — inline !`git status -s` and ```! blocks execute first and the model reads the evidence instead of deciding to go fetch it.
  • Installing it is a no-op for existing skills — a body with no placeholder and no shell syntax emits text byte-identical to Pi's built-in expansion, pinned by a regression test.
  • The model stops reading your argument as a new instruction — arguments are emitted under an explicit Skill input: label and a skill-invocation protocol is prepended to the system prompt every turn.
  • Runaway commands can't hang the turn or flood the context — every command is capped at 120 s by default and output is tail-truncated to 50 KB / 2000 lines; errors are inlined so the rest of the body still gets through.
  • Commands run in the order you wrote them — strictly sequential, never parallel, so !`mkdir x` then !`ls x` behaves.
  • Skill-relative paths keep working${SKILL_DIR} always resolves to the skill file's own directory, however the skill was installed; ${SESSION_ID} gives the current session id.

Configuration

rpiv-args reads no config file and no environment variables. The one knob is per-skill frontmatter, in the skill's own SKILL.md:

| Key | What it does | Default | | --- | --- | --- | | shell-timeout | Ceiling in seconds for each !`cmd` / ```! command in that skill. 0 disables the timer. | 120 |

Shell commands always run in the Pi session's working directory, not the skill directory.

Reference

  • Placeholders and variables — every placeholder and runtime variable, indexing and slicing rules, quoting, and what substitution deliberately does not do.
  • Authoring skills — choosing $ARGUMENTS over positionals, empty-argument behaviour, frontmatter, and a worked example with the exact text the model receives.
  • Shell substitution — shell syntax, execution order, timeouts, error strings, output budgets, and Windows / PowerShell authoring.
  • How it works — the three event hooks, the transformation pipeline, both emit paths, the skill index, and the paths that are not covered.

Requirements

  • A Pi Agent host. No API key, no model selection, no native modules — nothing here calls a model.
  • A POSIX shell or PowerShell for !`cmd` / ```! blocks. Commands run through sh -c on macOS and Linux and powershell.exe -Command on Windows, where POSIX-only tools such as grep, sed and awk are not aliased — see Shell substitution.

Related

  • @juicesharp/rpiv-pi — the umbrella package. Its /rpiv-setup command installs rpiv-args along with the rest of the family, and its lane transcript hides the Skill input: line from the displayed conversation.

License

MIT — see LICENSE.