pstack for Claude Code and Codex, with delegated agents running as visible Herdr panes.
This is a fork of michael-denyer/pstack-claude, the Claude Code, Codex, Pi, and GitHub Copilot port of Lauren Tan's pstack. It has 58 Agent Skills: 34 public skills and 24 principle-* leaves. The skill tree is synced against upstream df58112 from cursor/plugins/pstack.
Inside Herdr (HERDR_ENV=1), workflows that delegate start real Claude Code or Codex workers in Herdr panes, routed by role. You can watch and answer each worker. Outside Herdr, the plugin behaves like pstack-claude.
For concurrency bugs and invariants that tests cannot reach, see the separate agent-formal-verify plugin, which adds TLA+ model checking and Lean proofs.
/plugin marketplace add TiewKH/pstack-herdr
/plugin install pstack@pstack-claude
codex plugin marketplace add TiewKH/pstack-herdr
codex plugin add pstack@pstack-claudeRun in your terminal:
pi install git:github.com/TiewKH/pstack-herdrThe package loads the skills and the pstack Pi extension, which adds the subagent, question, and wake-up tools the skills use, plus /loop and the routing instruction. Invoke a skill with /skill:<name>. Herdr delegation is verified from Claude Code and Codex coordinators only.
Run in your terminal:
copilot plugin marketplace add TiewKH/pstack-herdr
copilot plugin install pstack@pstack-claudeThis installs pstack for the Copilot CLI and the GitHub Copilot app, which share ~/.copilot. Start a new session afterwards. Copilot ships no default pstack models, so the first skill that needs one runs setup-pstack to pick from the models your account lists, and later sessions reuse that choice. Herdr delegation is verified from Claude Code and Codex coordinators only.
The Copilot build is tested on Copilot CLI 1.0.87 through 1.0.92. On those versions the routing hook's context reaches the session alongside other plugins' session-start context. If a later version keeps only one plugin's context, setup-pstack offers a standing instruction for ~/.copilot/copilot-instructions.md instead. On 1.0.92, once the CLI caches its computer-use experiment assignment, copilot -p sessions list no plugin skills and a skill call returns "Skill not found". Interactive sessions, the hooks, and the agents are unaffected.
Run setup-pstack to change model defaults, set a reasoning effort per role (for example arena runners: opus @xhigh, fable @max, which Claude Code dispatches through the plugin's pstack:effort-<level> or pstack:poteto-agent-<level> agents; roles without a level keep the session's effort unless the sheet's default effort line names one), or turn automatic routing off. The plugin installs the routing hook on Claude Code, Codex, and GitHub Copilot; Codex asks you to trust it through /hooks before it runs. On Pi the extension injects the same routing instruction. In Claude Code and the Copilot CLI, use /pstack:setup-pstack. For skills-only installs and other runtimes, see shared installation.
- Install Herdr, then its integrations for the CLIs you use:
herdr integration install claudeandherdr integration install codex. - Inside Herdr, run
/pstack:setup-pstack. It writes~/.config/pstack-herdr/routes.yaml, which maps each role to a Claude or Codex profile, model, and effort.config/routes.example.yamlshows the format. - Start the coordinator inside Herdr and give
poteto-modea task:
Use poteto-mode to fix the search filter resetting when I change pages.
poteto-mode picks the playbook. For a bug, it reproduces the failure, investigates with how and why, delegates the fix to an implementation worker, and reruns the failing case.
| Layer | Owns |
|---|---|
| pstack skills | decomposition, roles, worktree isolation, synthesis, review, verification |
herdr/dispatch.ts |
pane creation, profile environment, CLI startup, prompt delivery, waiting, output reads, pane cleanup, delegation depth |
herdr-agent-gate.sh |
on Claude Code, denies the native Agent tool inside Herdr and returns the dispatcher command |
| Herdr | panes, agent status, visibility |
| Claude Code, Codex | the delegated work |
Skills keep Claude's Agent vocabulary. herdr-tools.md translates it to dispatcher calls when HERDR_ENV=1, the same way codex-tools.md does for Codex. HERDR.md is the runtime contract: roles, routing, depth limits, isolation, and the dispatcher's lifecycle.
- Skills and slash commands
- Runtime setup
- Models and dependencies
- Maintenance and port scope
- Contributing and security reports
pstack has no server or telemetry. Anything its skills ask your agent to read, including session transcripts, goes to your model provider. Scripts run locally, and PR tools use your GitHub CLI login. Herdr workers run as local Claude Code or Codex processes under the profiles you configure.
- pstack and Poteto Mode by Lauren Tan (poteto), MIT.
- pstack-claude, the Claude Code, Codex, Pi, and GitHub Copilot port, by Michael Denyer.
- Imported cursor-team-kit skills by Cursor, MIT.
- Herdr by herdrdev, Apache-2.0. It is an external runtime, not vendored or relicensed here.
This fork's changes are also MIT-licensed. See NOTICE.md and LICENSE-cursor-team-kit.
To support maintenance of the upstream port, buy its maintainer a coffee.