pstack for Claude Code
This repository is a Claude Code port of pstack, poteto's rigorous agent workflows. pstack helps you write less code, but higher quality code, and parallelize agents with confidence. The design is poteto's. This port changes only what Claude Code needs.
The repository is a single-plugin marketplace. The plugin is named pstack, and its skills are /pstack:<name>.
Install
In a Claude Code session, add the marketplace:
/plugin marketplace add anas-yousef/pstack-claude
Then install the plugin from your shell:
claude plugin install pstack@pstack-claude
/plugin install pstack@pstack-claude inside a session does the same.
Allow pstack to read its own files
pstack's router reads its playbooks and principle files with the Read tool. Claude Code asks permission for each read outside the working directory, and a background subagent can't answer that prompt. Allow the plugin cache once in ~/.claude/settings.json:
{
"permissions": {
"allow": ["Read(~/.claude/plugins/**)"]
}
}
Adding ~/.claude/plugins to permissions.additionalDirectories works too. With --plugin-dir <path>, pass --add-dir <path> as well.
Keep poteto-mode on
Cursor's custom mode has no Claude Code equivalent, and this port ships no SessionStart hook. Add one line to the host project's CLAUDE.md:
For non-trivial work, apply the pstack:poteto-mode skill.
Without it, start each task with /pstack:poteto-mode.
Requirements
- Node runs
scripts/check-plan.mjs (Multi-phase plan playbook).
- Bun runs
scripts/orch/orch.ts (Orchestrate playbook) and scripts/watch-pr/watch-pr (Babysit and Shipping playbooks). Both install their one dependency on first run.
gh for every PR playbook.
- The
skill-creator skill for the Authoring-a-skill playbook, /pstack:reflect, and /pstack:automate-me. It is not part of pstack. Install it from Anthropic's skills.
Get started
- Run
/pstack:setup-pstack. Pick a reasoning budget and the models per role.
- Use
/pstack:poteto-mode for anything that needs rigor.
The pstack guide walks through a first real task. /pstack:poteto-help answers questions about pstack itself.
Model configuration
/pstack:setup-pstack writes pstack-models.md. Skills read the project file .claude/pstack-models.md when it exists, otherwise the user file ~/.claude/pstack-models.md. The project file replaces the user file as a whole. A role with no line keeps its default. A line is <role>: <model> <effort>, and a panel role lists entries separated by commas. The spawn passes the model and the effort as the Agent tool's separate model and effort parameters. inherit-parent or auto runs a role on the parent session's model.
| Role | Default |
|---|
judgment and prose, hardest tasks, how explainer, why synthesizer, reflect judgment, divergent, synthesizer | opus xhigh |
feature, refactoring, bug-fix, perf-issue, hillclimb, reflect tooling | sonnet high |
swarm workers, how explorer, why investigators | haiku high |
arena runners, architect runners | opus xhigh, sonnet high |
interrogate reviewers, arena cross-judge pool | opus xhigh, sonnet xhigh |
Upstream's cross-family review (Claude against Grok) is cross-tier review here. The cross-judge pool defaults to opus xhigh, sonnet xhigh, because Arena picks a judge on a different tier from the parent, and an Opus session had no other tier to pick. fable is never a default. It is an escalation you choose for one hard spawn. A budget moves every entry's effort along low < medium < high < xhigh < max. unlimited is one step up, large keeps the defaults, medium is one step down, and small is two steps down, never below medium. Upstream set one absolute effort per budget. With mixed defaults that would break "large matches the defaults", so the port moves each entry relative to its default.
What the port changes
Every change is in port/rules.mjs (mechanical rules) or port/patches/ (judgment edits, one patch per file). upstream/ is byte-identical to cursor/plugins at 1b6d44f.
Mapped.