by QuintinShaw
Claude Code–style dynamic workflows for Pi: code-mode subagents with real model routing, journaled resume, git-worktree isolation, cost accounting, an interactive /workflows TUI, an /ultracode standing opt-in, and deep research.
Requires a passing catalog security scan. Resolve the flagged issues and resubmit to enable featuring.
# Add to your Claude Code skills
git clone https://github.com/QuintinShaw/pi-dynamic-workflowsGuides for using ai agents skills like pi-dynamic-workflows.
Last scanned: 6/22/2026
{
"issues": [
{
"type": "npm-audit",
"message": "@earendil-works/pi-coding-agent: Pi Agent: Potential XSS in HTML session exports via Markdown URL sanitization bypass",
"severity": "high"
},
{
"type": "npm-audit",
"message": "esbuild: esbuild allows arbitrary file read when running the development server on Windows",
"severity": "low"
},
{
"type": "npm-audit",
"message": "protobufjs: protobufjs : Schema-derived names can shadow runtime-significant properties",
"severity": "high"
},
{
"type": "npm-audit",
"message": "undici: undici vulnerable to TLS certificate validation bypass via dropped requestTls in SOCKS5 ProxyAgent",
"severity": "high"
},
{
"type": "npm-audit",
"message": "ws: ws: Memory exhaustion DoS from tiny fragments and data chunks",
"severity": "high"
}
],
"status": "WARNING",
"scannedAt": "2026-06-22T09:52:49.773Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}Claude Code–style dynamic workflows for Pi. Turn one prompt into a fleet of subagents that fan out in parallel, cross-check each other, and hand back a single synthesized answer.
Website · npm · Pi package · GitHub

Instead of one model grinding a task step by step, Pi writes a small JavaScript orchestration script that spawns many subagents at once, keeps the intermediate work in script variables (not your chat context), and returns only the result. It's the "code mode for subagents" from Claude Code — on any model Pi can reach.
Built for codebase-wide audits, multi-perspective review, large refactors, and cross-checked research — anything one context window can't hold.
pi install npm:@quintinshaw/pi-dynamic-workflows
Then /reload in Pi. You get the workflow tool plus the /workflows, /deep-research, and /adversarial-review commands.
Ask in plain language:
Run a workflow to audit every route under src/routes/ for missing auth checks.
Pi writes the script and runs it in the background — your turn ends immediately and a live panel tracks progress while you keep working. Or just type workflow or workflows in any message to force one. To force one explicitly — even with the keyword trigger off — run /workflows run <prompt>. If that causes false triggers, set a custom trigger such as pi-workflow with /workflows-trigger set pi-workflow or by adding { "keywordTriggerWord": "pi-workflow" } to ~/.pi/workflows/settings.json. With that setting, only pi-workflow auto-arms workflows mode. If you only want to discuss workflows without triggering one, run /workflows-trigger off; preferences are saved for new sessions. Check the current state with /workflows-trigger status, and turn it back on with /workflows-trigger on.

If another Pi extension has already installed a custom editor component, pi-dynamic-workflows leaves it in place and keeps the submit-time workflow trigger active. In that compatibility mode, the animated keyword highlight and Backspace one-shot disarm affordance are skipped because the existing editor remains responsible for rendering and input handling; use /workflows-trigger off or /workflows-trigger set <word> when you need to discuss workflow/workflows without auto-triggering, including in future sessions. Editor composition is load-order dependent: whichever extension installs a visual editor last owns the editor surface, while pi-dynamic-workflows still keeps its submit-time hook registered.
Plain JavaScript. The first statement exports literal metadata; then you orchestrate:
export const meta = {
name: 'auth_audit',
description: 'Find routes missing auth checks and verify the findings',
phases: [{ title: 'Scan' }, { title: 'Review' }, { title: 'Verify' }],
}
phase('Scan')
const files = await agent('List every route file under src/routes/.', { tier: 'small' })
phase('Review')
const findings = await parallel(
files.split('\n').filter(Boolean).map((file) =>
() => agent(`Audit ${file} for missing auth checks.`, { tier: 'medium', isolation: 'worktree' }),
),
)
phase('Verify')
return await agent('Synthesize and double-check these findings:\n' + findings.join('\n\n'), { tier: 'big' })
agent() spawns an isolated subagent, parallel() runs many at once, phase() groups them in the live view, and tier routes each one to the right model. That's the whole idea.
agent(), parallel(), pipeline(), phase() in a sandboxed script. Up to 16 concurrent / 1000 total subagents; intermediate results stay in variables, not the chat.small / medium / big tiers (or an exact model) per agent. It actually switches the subagent's model — cheap work on a light one, hard synthesis on a big one.isolation: "worktree" gives an agent its own branch, so parallel agents can edit the same files without clobbering each other.tokenBudget, phase budgets, and budget let you add explicit gates when you want them./workflows-progress detailed expands it inline to per-phase/per-agent rows with tokens, cost, and a live tok/s rate (so a stalled agent shows as 0 tok/s) — no need to open /workflows./workflows TUI — drill runs → phases → agents → detail; inspect per-agent failures and compact subagent history; pause, stop, restart, and save runs from the keyboard.verify(), judgePanel(), loopUntilDry(), and completenessCheck() for adversarial review, best-of-N, and exhaustive discovery./ultracode is a standing opt-in that auto-arms an exhaustive multi-agent workflow for every substantive message, the way Claude Code's ultracode does. /effort high is the lighter tier./deep-research + /adversarial-review — real web search, source cross-checking, and cited reports./<name> command, and compose saved workflows from inside other scripts.The same model — on Pi, plus the production pieces a real run needs:
| Claude Code dynamic workflows | pi-dynamic-workflows (on Pi) |
|---|---|
| Code-mode orchestration — the model writes a script that drives subagents | A JS workflow tool running agent() / parallel() / pipeline() / phase() in a vm sandbox |
| Subagents with isolated context | Fresh in-memory Pi sessions; results held in script variables, not the chat |
| Structured outputs | JSON-Schema schema → a validated object, with bounded repair if the model misses |
| Background runs | Non-blocking by default, a live task panel, and auto-continue delivery |
| Resume | Journaled + replayable — survives restarts and replays the unchanged prefix |
| Model selection | Per-agent / per-phase routing across any provider Pi is authenticated for |
| Ultracode (standing maximal-effort opt-in) | /ultracode (or /effort ultra) — auto-arms an exhaustive workflow for every substantive message |
| — | Git worktree isolation, real cost accounting, /deep-research, and a quality-pattern stdlib |
/workflows open the interactive navigator (plain list in print mode)
/workflows status <id> watch a run live; print its result when it finishes
/workflows save <name> save the latest run's script as a reusable /<name> command
/workflows pause|resume|stop|rm <id>
/workflows-trigger off|on|status
persistently disable, restore, or inspect keyword triggering
/workflows-trigger set <word>|reset
customize or reset the keyword trigger word (default "workflow",
also matches "workflows"; custom words match exactly, case-insensitive)
/workflows run <prompt> force a dynamic workflow from <prompt> on demand — the explicit
twin of the keyword trigger. Works even when the keyword trigger
is off (/workflows-trigger off); the run shows in the panel + /workflows.
/workflows-progress compact|detailed|status
switch the live panel between the compact one-liner and the detailed
per-phase/per-agent view (with tokens, cost, and a live tok/s rate)
/workflows-progress-max <N> cap agents shown per phase in detailed mode (1-1000, default 8)
/workflows-models map the small / medium / big tiers to real models
/ultracode [off] ultracode: auto-arm an exhaustive workflow for every substantive message
/effort off|high|ultra finer control over the standing opt-in (high = thorough, ultra = ultracode)
/deep-research <question> web-researched, source-cross-checked report
/adversarial-review <task> findings vetted by skeptical reviewers
/multi-perspective "<topic>" [angle …]
analyze a topic from several independent angles, then synthesize
/codebase-audit <scope> "<check>" …
run parallel checks over a scope, then cross-validate and report
/multi-perspective and /codebase-audit take quoted arguments so a topic or check can be multiple words:
/multi-perspective "should we use Redis or Postgres for session storage"
/multi-perspective "JWT vs session cookies" security scalability developer-experience
/codebase-audit src/ "missing er
pi-dynamic-workflows is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by QuintinShaw. Claude Code–style dynamic workflows for Pi: code-mode subagents with real model routing, journaled resume, git-worktree isolation, cost accounting, an interactive /workflows TUI, an /ultracode standing opt-in, and deep research. It has 74 GitHub stars.
pi-dynamic-workflows returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.
Clone the repository with "git clone https://github.com/QuintinShaw/pi-dynamic-workflows" and add it to your Claude Code skills directory (see the Installation section above).
pi-dynamic-workflows is primarily written in TypeScript. It is open-source under QuintinShaw on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh pi-dynamic-workflows against similar tools.
No comments yet. Be the first to share your thoughts!