Back to Skills

pi-cli-runtime

Internal helper contract for calling the pi-companion runtime from Claude Code

24stars4forksUpdated 7/30/2026

Security Assessment

Safe(90/100)
Security Score90/100

About pi-cli-runtime

pi-cli-runtime is an internal, non-user-invocable helper contract that defines exactly how Claude Code should call the pi-companion runtime from inside the pi:pi-rescue subagent. Rather than performing analysis itself, it turns the rescue subagent into a thin forwarder whose only job is to invoke a single companion command once and return that command's standard output unchanged. It solves a narrow orchestration problem: giving a subagent one precise, safe way to hand a rescue request off to an external Pi runtime without hand-rolling git commands or ad-hoc CLI strings.

The contract specifies the primary helper invocation (a Node script under the plugin root called with a single task command and the raw arguments) and a detailed set of execution, command-selection, and safety rules. It covers how to translate routing flags -- stripping Claude-side execution controls like background and wait, passing model and effort through unchanged, mapping resume to a resume-last run and fresh to a new run -- and defines the accepted effort levels. It defaults to a write-capable Pi run unless the user explicitly asks for read-only, review, diagnosis, or research only.

The intended audience is authors and operators of the pi plugin's rescue workflow, not end users; the skill is marked user-invocable false and is meant to run only inside the pi:pi-rescue subagent. Its safety posture is strict and self-limiting: the forwarder must preserve the user's task text apart from routing flags, must not inspect the repository, read files, grep, poll status, fetch results, or add its own analysis, and must return nothing if the underlying command fails. It is a routing and contract specification rather than a standalone tool.

FAQ

Can end users invoke this skill directly?

No. It is marked user-invocable false and is intended to be used only inside the pi:pi-rescue subagent as an internal helper contract.

What does the rescue subagent actually do?

It acts as a forwarder, not an orchestrator. It invokes the companion task command exactly once per rescue handoff and returns that command's stdout unchanged, without inspecting the repo or performing independent analysis.

How are flags like resume, fresh, model, and effort handled?

Background and wait are treated as Claude-side execution control and stripped; model and effort are passed through unchanged; resume maps to a resume-last run; and fresh forces a new task run. Accepted effort values are off, minimal, low, medium, high, and xhigh, with none aliasing to off.

Does it write to my repository by default?

Yes. It defaults to a write-capable Pi run by adding a write flag unless the user explicitly asks for read-only behavior or only wants review, diagnosis, or research without edits.

What happens if the companion runtime cannot be invoked?

If the underlying Bash call fails or Pi cannot be invoked, the skill returns nothing rather than improvising or doing follow-up work of its own.

Install pi-cli-runtime

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill