# pstack (Claude Code port)

> A port of Lauren Tan's Cursor pstack skill stack to Claude Code, Codex, Pi, GitHub Copilot and other agent harnesses

- Category: Agents & Automation / Agent Skills & Plugins
- Language: JavaScript
- Licence: MIT
- Repository: https://github.com/michael-denyer/pstack-claude
- Canonical page: https://ai-tldr.dev/tools/pstack-claude/
- Updated: 2026-10-16

## In short

pstack (Claude Code port) is a port of Lauren Tan's Cursor pstack skill stack to Claude Code, Codex, Pi, GitHub Copilot and other agent harnesses. It tracks upstream and also carries named policy forks, each declared in the repository's `tools/forks.json`, with Cursor-specific primitives translated for the other tools. It sits in the Agent Skills & Plugins category of the Agents & Automation tools and is open-source, written in JavaScript and licensed MIT.

## Overview

pstack is Lauren Tan's opinionated Cursor skill stack, published in Cursor's plugins repository, for getting more reliable results out of coding agents. pstack-claude, maintained by Michael Denyer, is an MIT-licensed port of it for Claude Code, Codex, Pi, GitHub Copilot and other harnesses. It tracks upstream and also carries named policy forks, each declared in the repository's `tools/forks.json`, with Cursor-specific primitives translated for the other tools.

The entry point is `poteto-mode`. You tell it your goal and it picks a playbook: planning, bugs, features, refactoring, performance issues, investigations, prototypes, PR maintenance, shipping or longer projects. For a bug, the README describes it reproducing the failure, using the `how` and `why` skills to investigate, delegating the fix and rerunning the failing case, bringing in `architect` first if the fix crosses a function boundary. You get the fix plus the failing and passing evidence.

The reference documentation lists 39 public skills and 24 `principle-*` reference skills. Beyond the core loop they include `arena` (parallel attempts at the same task), `interrogate` (three different models try to break a diff), `swarm`, `tdd`, `blast-radius`, `unslop`, `babysit` for open PRs and `fix-ci`. The Claude Code, Codex and Copilot plugins install a session-start routing hook that invokes `poteto-mode` for multi-file changes, design choices, bugs with an unknown cause and performance issues. On Pi, an extension injects the same instruction and adds the subagent, question and wake-up tools the skills rely on. pstack has no server or telemetry; anything the skills read goes to your model provider.

## What it does

- `poteto-mode` routes a request to a playbook for planning, bugs, features, refactoring, performance, investigations, prototypes, PR maintenance or shipping
- 39 public skills, among them `architect`, `arena`, `swarm`, `interrogate`, `tdd`, `blast-radius`, `thermos`, `fix-ci` and `babysit`, plus 24 principle references
- Native plugins for Claude Code, Codex and GitHub Copilot with an automatic routing hook, and a Pi package whose extension supplies subagent, question and wake-up tools
- A shared `~/.agents/skills/` install for OpenCode, Gemini CLI, Prime Agent and skills-only Codex; the docs record which runtimes were verified in live sessions
- `setup-pstack` sets the model and reasoning effort per role, or turns automatic routing off
- Tracks the upstream Cursor pstack, with every deliberate divergence declared in `tools/forks.json`

## Getting started

Install the plugin for the agent you use; each harness has its own path in the README (https://github.com/michael-denyer/pstack-claude). Then ask for `poteto-mode` with your goal.

1. Claude Code

   Run these inside Claude Code.

```text
/plugin marketplace add michael-denyer/pstack-claude
/plugin install pstack@pstack-claude
```

2. Codex

   Codex asks you to trust the routing hook through `/hooks` before it runs.

```bash
codex plugin marketplace add michael-denyer/pstack-claude
codex plugin add pstack@pstack-claude
```

3. Pi or GitHub Copilot

   The Copilot plugin covers both the Copilot CLI and the GitHub Copilot app; start a new session afterwards. Copilot ships no default pstack models, so the first skill that needs one runs `setup-pstack`.

```bash
# Pi
pi install git:github.com/michael-denyer/pstack-claude

# GitHub Copilot
copilot plugin marketplace add michael-denyer/pstack-claude
copilot plugin install pstack@pstack-claude
```

4. OpenCode, Gemini CLI and other harnesses

   These read skills from `~/.agents/skills/`. Clone the repo and link the skills; to update, `git pull` and run the loop again. There is no routing hook here, so ask for `poteto-mode` by name.

```bash
git clone https://github.com/michael-denyer/pstack-claude
cd pstack-claude
mkdir -p ~/.agents/skills
for s in plugins/pstack/skills/*/; do
  target=~/.agents/skills/"$(basename "$s")"
  test -e "$target" || test -L "$target" || ln -s "$(pwd)/$s" "$target"
done
```

5. Give poteto-mode a task

   It chooses the playbook, investigates, delegates the fix and reruns the failing case. Run `setup-pstack` (`/pstack:setup-pstack` in Claude Code) to change model defaults or effort per role.

```text
Use poteto-mode to fix the search filter resetting when I change pages.
```

## When to use it

- Use Lauren Tan's pstack workflows from Claude Code, Codex, Pi or Copilot instead of Cursor
- Make an agent reproduce a bug, investigate it and show failing and passing evidence before calling the fix done
- Have several models attack a diff with `interrogate`, or run parallel attempts with `arena`, before merging
- Keep one set of agent workflows across several coding harnesses from a single skills tree

## Version history

- 2026-10-16 v0.9.88: Aligned per-role model defaults with upstream pstack, adding a `worker` model tier for routine code roles, and added a check to `principle-prove-it-works` to read the real state and exit code before reporting success.
