From pi-cli-skill
Pi CLI wrapper — three modes. Review: independent diff review via Pi CLI with pass/fail gate. Challenge: adversarial mode that tries to break your code via multi-turn loop. Consult: ask Pi anything with session continuity. Provider-agnostic second opinion (Foundry, Anthropic, OpenAI, HuggingFace, whatever Pi has configured). Use when asked to "pi review", "pi challenge", "ask pi", "consult pi", or "second opinion via pi".
How this skill is triggered — by the user, by Claude, or both
Slash command
/pi-cli-skill:piThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Wraps the [Pi coding agent](https://pi.dev) CLI. Independent voice from the
Wraps the Pi coding agent CLI. Independent voice from the session you're in — different provider, different context, fresh eyes.
Note for the assistant: all logic lives in
bin/*.sh. The skill body is intentionally free of inline shell positional variables (the dollar-zero through dollar-nine forms, plus dollar-at and dollar-star) so the slash-command processor cannot mangle it via positional-arg substitution. The skill shells out topi --print --mode jsonand parses NDJSON withjq— no SDK, no bundlednode_modules.
The skill receives a subcommand as its first argument. Map it to the matching
script under bin/. The skill base directory is provided by Claude Code in the
CLAUDE_PLUGIN_ROOT-style preamble; the assistant should resolve BIN as the
absolute path to <skill_root>/bin and call the relevant .sh.
Always run bin/preamble.sh first to verify the environment, then dispatch.
modelsPrint discovery grouped by provider. Foundry-* providers marked with *.
bin/preamble.sh
bin/models.sh
consult <question> [--model <id>] [--continue]One-shot ask, session-resumable. With --continue, picks up the last Pi
session.
bin/preamble.sh
bin/consult.sh [--model "<id>"] [--continue] -- "<question>"
review [--base <branch>] [--model <id>]Independent diff review. Detects base branch automatically (upstream →
origin/HEAD → master → main). Prints findings tagged
[BLOCKER|MAJOR|MINOR|NIT] and emits a final PI_REVIEW_GATE: {...} JSON
verdict.
bin/preamble.sh
bin/review.sh [--base "<branch>"] [--model "<id>"]
After the run completes, parse the last PI_REVIEW_GATE: line. If
verdict=="fail", surface the findings to the user. Do not auto-fix unless
the user asks.
challenge [--rounds N] [--model <id>]Adversarial multi-turn loop. Pi tries to break the diff — concurrency, error paths, security, boundary conditions. Default 3 rounds.
bin/preamble.sh
bin/challenge.sh [--rounds N] [--model "<id>"]
Final summary line: PI_CHALLENGE_GATE: {"breakages":N,"blockers":B,"majors":M}.
resume [<prompt>]Continue last Pi session. No args = interactive. With args = one-shot continue.
bin/resume.sh ["<prompt>"]
--model "<provider>/<modelId>".Skill assumes Pi is already authenticated. First-run setup is Pi's
responsibility — if pi --list-models errors or returns nothing, tell the user
to run pi once interactively to log in / configure providers.
foundry-*)
alongside others. Routes through your Foundry tenant if you pick one.pi --session <id> so each round builds on the prior context.pi. Nothing to bun install,
nothing to keep in lockstep with upstream pi versions.--version, --list-models) to stderr, not stdout.
Capture with 2>&1.bin/*.sh files. (Even quoting
them in backticks is not safe — substitution happens before render.)pi -p --mode json and extract assistant text from the
agent_end event with jq. Errors surface via the same event's
errorMessage field.pi --session <id>; the id is captured from the
first round's session event.Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub machug/marketplace --plugin pi-cli-skill