agentleFS
anhermonanhermon/pstack-claude/skills/setup-pstack/SKILL.md

setup-pstack

Skill0 starsChanged 37 days agoMITView on GitHub

Configure which models pstack uses per role and at what reasoning budget. Detects your available Claude models and external CLIs (codex, gemini) and writes an always-loaded Claude Code rule that overrides the skill defaults. Use for /setup-pstack, "configure pstack models", "pstack budget", or changing pstack's model choices.

25 other projects use a version of this, 12 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use make-bot-ui, ketchup-video and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • eryzerzSkill

    make-bot-ui

    Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.

    Also in 15 projects that use this

  • tristanphvnSkill

    ketchup-video

    Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.

    Also in 6 projects that use this

  • TheOnlyFusionCubeSkill

    statechart

    Draw what an app's user sees as a Mermaid statechart from a TLA+ model. States are gray if they work, red if still wrong, and green if fixed. Each bug TLC finds is a numbered path. Use for /statechart, \"show the PM the bug\", or to turn an agreed chart into a TLA+ skeleton.

    Also in 8 projects that use this

  • TheOnlyFusionCubeSkill

    maintain-formal-verification-skill

    Bring a project's formal verification back in line with the code after the code changes: find the commits that touched verified code, update the model, harness, or properties to describe the code as it is now, rerun, and say whether each failure is drift in the verification or a bug in the code. Use for /maintain-formal-verification-skill, \"is the model still true to the code\", or after merges and refactors that touched verified code without rechecking it.

    Also in 8 projects that use this

  • instructureSkill

    ketchup

    Rebuild context after /clear by analyzing uncommitted changes across Canvas LMS and all plugin repositories

    Also in 9 projects that use this

  • drafaelSkill

    in-your-own-words

    Restate the user's goals and the problem they are trying to solve to check understanding. Manual invocation only; use when the user explicitly invokes in-your-own-words or requests this understanding check. Do not solve the task or rewrite the assistant's last answer.

    Also in 9 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never write a value you have not confirmed is available.

    line 25
  2. Very specific:

    (a) Ask for a budget: Prefer AskUserQuestion over free text.

    line 33
  3. Very specific:

    Every agent seat must have an available model and a valid explicit effort.

    line 57
  4. Distinctive:

    Write the rule body as plain Markdown, with no code fence around it.

    line 89

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Setup pstack

Configure explicit model/effort pairs per role. Without delegation-kit, write ~/.claude/rules/pstack-models.md, a user-level rule loaded into every session and subagent. Read claude-code/runtime.md for what each value means.

Hand-maintained Claude Code port of upstream setup-pstack. The upstream version writes ~/.cursor/rules/pstack-models.mdc with Cursor model slugs.

Steps

0. Respect delegation-kit routing

If the prompt section Delegation routing (live appears in context, delegation-kit is installed and owns model/effort routing. Defer to that live table per role. Do NOT write ~/.claude/rules/pstack-models.md. Tell the user that delegation-kit's live routing will be used, still offer /pstack:mode on (step 6), and stop model configuration here. Otherwise continue below.

1. Detect available models

  • Claude models: the aliases opus, sonnet, and haiku always resolve. fable resolves only when the account has Fable enabled. Ask the user if unsure, or check /model. Full model IDs such as claude-opus-5-5 are valid when the user names them. The availableModels allowlist in the user's settings, if set, limits what works, so read ~/.claude/settings.json and drop anything it excludes.
  • External runners: load ToolSearch select:mcp__delegation-kit__delegate when available; codex uses harness codex, gemini uses harness agy. Otherwise run command -v codex and command -v gemini and offer only installed CLI seats. Follow the runtime's worktree and wait: true contract; fallback wrapper agents pass explicit model: haiku, effort: low.
  • Normalize the legacy aliases inherit, inherit-parent, and auto to explicit model: sonnet, effort: medium. Never omit either parameter.

Never write a value you have not confirmed is available.

2. Load current state

The default role-to-model mapping is the rule shape shown in step 5 below. If ~/.claude/rules/pstack-models.md already exists, read it and treat its budget: line and its role values as the current choices. Otherwise start from those defaults. A line whose role is not in step 5, such as how critics, is from a retired role. Drop it. If the user also has a Cursor rule at ~/.cursor/rules/pstack-models.mdc, mention it, but do not copy Cursor slugs across.

3. Budget, map, and confirm

(a) Ask for a budget. Prefer AskUserQuestion over free text. Offer these four options with these exact labels, and name the current budget when the rule records one.

  • unlimited — max effort
  • large — xhigh effort
  • medium — high effort
  • small — medium effort

(b) Apply it. The Agent tool accepts explicit model and effort (low|medium|high|xhigh|max). Record both for every seat. Pass them on every spawn, retry, resume, and nested delegation.

The budget maps to per-role effort below. Keep prior role choices that satisfy the fan-out policy. Explorers and low-risk helpers stay sonnet/low; haiku seats stay haiku/low. The main session handles explanation and final synthesis. Only a single non-parallel judge after the fan-out may use opus, always with explicit effort. Fan-outs of 3+ use sonnet/haiku seats, never opus, including configured and retry seats.

Budgetsingle judgecode rolespanels (model/effort per seat)
unlimitedopus/maxsonnet/maxsonnet/max, haiku/low, sonnet/max, plus detected external seats
largeopus/xhighsonnet/xhighsonnet/xhigh, haiku/low, sonnet/xhigh
mediumopus/highsonnet/highsonnet/high, haiku/low, sonnet/high
smallsonnet/mediumsonnet/mediumsonnet/medium, haiku/low, sonnet/medium

Code roles are the four code playbook lines, hardest tasks, why investigators, reflect tooling, and swarm workers. how explorer uses sonnet/low. judgment and prose, how explainer, and why synthesizer run in the main session. The shared reflect judgment, divergent, synthesizer line uses sonnet for parallel reviewers (default effort high) and the single-judge pair only for the later synthesizer. Panels are arena runners, architect runners, and interrogate reviewers. arena cross-judge pool lists choices for just one later judge, never a fan-out.

(c) Show the roles and confirm. Show every role with its model/effort pair (or main session), marking unavailable models as needing a choice. List retired lines dropped in step 2. Ask whether to accept or change specific roles, offering detected models and external seats. Prefer AskUserQuestion. Each panel entry adds one seat; arena cross-judge pool instead selects one later judge, preferably from a different family. codex and gemini are separate families. swarm workers sets each worker's pair unless a race assigns explicit pairs per arm.

4. Validate

Every agent seat must have an available model and a valid explicit effort. Normalize legacy inheritance aliases to sonnet/medium. Validate the fan-out limits above. If a chosen model is unavailable, stop and ask again.

5. Write the rule

Create ~/.claude/rules/ if needed. Write ~/.claude/rules/pstack-models.md with a budget: line and one line per role, using the same labels poteto-mode uses. Overwrite the whole file so re-runs stay idempotent. Do not add a paths frontmatter field, because a path-scoped rule loads only for matching files. Shape (the large defaults):

# pstack model configuration (Claude Code)

Per-role model/effort pairs for pstack skills. Pass both explicit parameters to `Agent`. Delete a line to use the runtime default.
Normalize `inherit`, `inherit-parent`, or `auto` to explicit `sonnet/medium`. `codex` or `gemini` uses the runtime's delegate routing (harness codex or agy), falling back to a CLI wrapper with explicit haiku/low. Every panel entry adds one seat. No opus in fan-outs of 3+; opus is only for one later judge. Main session roles never spawn another agent.

budget: large (xhigh effort)
feature, refactoring: sonnet/xhigh
bug-fix: sonnet/xhigh
perf-issue: sonnet/xhigh
hillclimb: sonnet/xhigh
judgment and prose: main session
hardest tasks: sonnet/xhigh
how explorer: sonnet/low
how explainer: main session
why investigators: sonnet/xhigh
why synthesizer: main session
reflect tooling: sonnet/xhigh
reflect judgment, divergent, synthesizer: reviewers sonnet/high; single synthesizer opus/xhigh
arena runners: sonnet/xhigh, haiku/low, sonnet/xhigh
arena cross-judge pool: opus/xhigh, sonnet/xhigh, haiku/low
swarm workers: sonnet/xhigh
architect runners: sonnet/xhigh, haiku/low, sonnet/xhigh
interrogate reviewers: sonnet/xhigh, haiku/low, sonnet/xhigh

Write the rule body as plain Markdown, with no code fence around it.

6. Optional: keep poteto-mode on (Custom Mode equivalent)

Ask once whether the user wants /poteto-mode applied on every new task in this project. On yes, tell them to run /pstack:mode on. It writes .claude/pstack-mode, and the plugin's UserPromptSubmit hook then injects the poteto-mode reminder on every turn. /pstack:mode off removes it. For a global default, /pstack:mode on --global writes ~/.claude/pstack-mode instead.

7. Confirm

Tell the user the rule was written and that Claude Code loads it at session start, so it applies to new sessions. Re-running this skill updates it.

8. Offer a verification skill (optional)

Check whether the project has a way to drive the real app for proof (a verify-* skill, or an existing harness). If not, offer once: "want a project-local verification skill, so agents can drive the app the way a user does and prove changes work? I can generate one with /create-verification-skill." On yes, invoke /pstack:create-verification-skill. On no, move on without pushing.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.