Template arguments for AI prompts.
You write a prompt with blanks ({{like_this}}), and promptargs fills them in.
Review {{file}} for {{focus}} issues.
becomes...
Review src/app.ts for security issues.
That's it. That's the whole idea.
Works as a CLI and as a skill in Claude Code, Copilot, Goose, and Bob.
npm install -g @hivecommons/promptargsOr just run it without installing:
npx @hivecommons/promptargs helpThis repo ships skill files for multiple AI coding tools. Install the one(s) you use:
Claude Code:
mkdir -p ~/.claude/commands
curl -o ~/.claude/commands/promptargs.md \
https://raw.githubusercontent.com/hivecommons/promptargs/main/.claude/commands/promptargs.mdGoose:
mkdir -p ~/.config/goose/skills
curl -o ~/.config/goose/skills/promptargs.md \
https://raw.githubusercontent.com/hivecommons/promptargs/main/.goose/agents/promptargs.mdBob (IBM):
mkdir -p ~/.bob/skills
curl -o ~/.bob/skills/promptargs.md \
https://raw.githubusercontent.com/hivecommons/promptargs/main/.bob/skills/promptargs.mdCopilot: Automatically detected from .github/copilot-instructions.md when you clone this repo.
promptargs initThis creates a .prompts/ folder with 3 starter templates. Done!
promptargs listAvailable templates:
review
vars: {{file}} {{focus=correctness}} {{tone=concise}}
explain
vars: {{file}} {{style=simple}} {{audience=junior developer}}
fix
vars: {{issue}} {{file}} {{expected}} {{actual}}
promptargs review --file=src/app.tsReview src/app.ts for correctness issues.
Be concise in your feedback.
Focus on real bugs, not style nitpicks.
Variables with =something already have a default. Variables without one will ask you to fill them in.
Powered by Mustache — a logic-less template language available in every major language.
A blank looks like this: {{name}}
A blank with a default looks like this: {{name=hello}} (promptargs extension)
That's the basics. You also get the full Mustache spec — comments ({{! ignore me}}), sections, partials, and more.
promptargs show reviewShows the template with red blanks (required) and yellow blanks (has a default).
promptargs review --file=main.go --focus=security --tone=detailedpromptargs review
file: main.go
focus: (correctness) ← press Enter to keep default
tone: detailedpromptargs "Explain {{thing}} to a {{audience=5-year-old}}" --thing=recursionExplain recursion to a 5-year-old
Want to review 5 files? Don't run the command 5 times. Use a comma:
promptargs review --file=api.go,auth.go,db.go,cache.go,main.gopromptargs runs the template once for each value and prints each expanded result separated by ---:
Review api.go for correctness issues.
Be concise in your feedback.
Focus on real bugs, not style nitpicks.
---
Review auth.go for correctness issues.
Be concise in your feedback.
Focus on real bugs, not style nitpicks.
---
Review db.go for correctness issues.
...
Status lines showing iteration progress go to stderr:
✅ review [1/5]: file=api.go focus=correctness tone=concise
✅ review [2/5]: file=auth.go focus=correctness tone=concise
...
| Syntax | What it does |
|---|---|
--file=a.go,b.go,c.go |
Comma-separated list |
--file="src/*.go" |
Glob pattern (expands to matching files) |
--file=@list.txt |
Reads one value per line from a file |
Zip mode (default): arrays pair up 1:1:
promptargs "Review {{file}} for {{focus}}" \
--file=api.go,auth.go,db.go \
--focus=security,perf,correctness✅ [1/3]: file=api.go focus=security
✅ [2/3]: file=auth.go focus=perf
✅ [3/3]: file=db.go focus=correctness
Cross-product mode (--cross): every combination of every value:
promptargs "Review {{file}} for {{focus}}" \
--file=api.go,auth.go,db.go \
--focus=security,perf,correctness \
--cross✅ [1/9]: file=api.go focus=security
✅ [2/9]: file=api.go focus=perf
✅ [3/9]: file=api.go focus=correctness
✅ [4/9]: file=auth.go focus=security
✅ [5/9]: file=auth.go focus=perf
✅ [6/9]: file=auth.go focus=correctness
✅ [7/9]: file=db.go focus=security
✅ [8/9]: file=db.go focus=perf
✅ [9/9]: file=db.go focus=correctness
3 files × 3 focuses = 9 runs. Use --cross when you want the full matrix.
| Location | What it's for |
|---|---|
.prompts/ |
Your project's templates (commit these!) |
~/.prompts/ |
Your personal templates (available everywhere) |
Project templates override personal ones with the same name.
promptargs discovers variables from two sources:
These variable names fill themselves automatically when you're in a git repo:
| Variable | Auto-fills with |
|---|---|
{{branch}} |
Current git branch |
{{repo}} |
Repository name |
{{org}} |
GitHub org/user |
{{user}} |
Git config user name |
{{date}} |
Today's date |
{{diff}} |
Staged or unstaged diff |
{{pr}} |
Current PR number |
Any environment variable in your terminal is available as a template variable. Use the same name:
# If your terminal has DATABASE_URL and AWS_REGION set:
promptargs "Connect to {{DATABASE_URL}} in {{AWS_REGION}}"In the Builder UI (promptargs ui), click "Show terminal env" to see all available env vars from your shell. Click any one to insert it at the cursor.
Common useful env vars: NODE_ENV, AWS_REGION, DATABASE_URL, GITHUB_TOKEN, CI, USER, EDITOR, PATH.
You can always override any auto-detected value with a flag. The order is:
--flag=value(explicit, always wins)- Interactive prompt (if no flag and not
--no-interactive) - Auto-detect from environment
- Template default (
{{name=fallback}})
promptargs review --file=main.gopromptargs review --file=main.go --jsonpromptargs review --file=main.go --status✅ review: file=main.go focus=correctness(default) tone=concise(default)
Don't want to memorize flags? Open the visual builder:
promptargs uiOpens a browser at http://localhost:3700 with:
- Preset examples — 8 clickable templates (review, explain, fix, test, migrate, security, docs, refactor)
- Template editor — type your template, variables auto-populate below
- Variable table — set values, arrays (comma-separated), and sources (manual, glob, @file)
- Environment panel — git context vars + all terminal env vars, click any to insert
{{var}}at cursor - Mustache cheatsheet — collapsible syntax reference for template features
- Zip / Cross toggle — switch array iteration mode
- Live preview — see expanded output update as you type
- CLI command — copy the generated command with one click
Use --port=N if 3700 is taken:
promptargs ui --port=4000Create a file in .prompts/ with any name ending in .md:
.prompts/buddy.md
Hey {{name=buddy}}! Can you help me understand {{topic}}?
I learn best with {{style=examples and analogies}}.
Now use it:
promptargs buddy --topic="async/await"Hey buddy! Can you help me understand async/await?
I learn best with examples and analogies.
promptargs works with any AI tool that accepts piped input:
# Claude
promptargs review --file=src/main.ts --no-interactive | claude -p "do this review"
# Goose
promptargs review --file=src/main.ts --no-interactive | goose run
# Copilot
promptargs review --file=src/main.ts --no-interactive | gh copilot explainIf you installed the skill (see Install), use it directly inside your session:
Claude Code:
/promptargs review --file=src/api.ts
Goose / Bob: The skill is automatically available after install — ask your agent to "use promptargs" or run a template.
Copilot: The instructions in .github/copilot-instructions.md teach Copilot about promptargs when you're in a repo that has it.
| Command | What it does |
|---|---|
promptargs ui |
Open the visual builder in your browser |
promptargs init |
Create .prompts/ with examples |
promptargs list |
Show all available templates |
promptargs show review |
Preview template with highlighted blanks |
promptargs review --file=x |
Run template with flags |
promptargs review |
Run template interactively |
promptargs "inline {{var}}" |
Use inline template |
--no-interactive |
Skip questions, use defaults only |
--cross |
Cross-product mode (all combinations) |
--json |
Output as JSON |
--status |
Output status line only |
... | claude -p "do this" |
Pipe to Claude |
... | goose run |
Pipe to Goose |
Apache-2.0