pstack-claude is a set of opinionated coding-agent skills and workflows ported from Cursor to Claude Code, Codex, Pi, and other agent harnesses. It guides agents toward concise, simple, and verified code by routing goals to suitable workflows and supporting subagent tools. The catalogue entries are the project's skills, agents, hook, and plugin implementations for these agent environments.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add michael-denyer/pstack-claude --skill statechartgit clone --depth 1 https://github.com/michael-denyer/pstack-claudeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/michael-denyer/pstack-claude/statechart)<a href="https://agentmods.dev/skills/michael-denyer/pstack-claude/statechart"><img src="https://agentmods.dev/badge/skills/michael-denyer/pstack-claude/statechart/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/michael-denyer/pstack-claude/statechart"><img src="https://agentmods.dev/badge/skills/michael-denyer/pstack-claude/statechart.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00070 | $0.02160 |
| Opus 5.5 | $0.00028 | $0.00864 |
| Sonnet 5.5 | $0.00014 | $0.00432 |
| Haiku 4.5 | $0.00007 | $0.00216 |
Grade A, and why
statechart scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
3 near-identical copies found in the catalogue:
- statechart — 98% identical, 0 lines differ
- statechart — 95% identical, 1 lines differ
- pstack-statechart — 94% identical, 85 lines differ
How it starts
The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Statechart
The chart shows how a system moves between states, in the words of the person who reads it. That person, the reader, decides whether the behavior is right.
Run
Work in a scratch folder outside the repo. Write a TLA+ spec and its config. Then run:
<skill dir>/scripts/statechart SPEC.tla [--config FILE] [--view FILE] [--out DIR]
scripts/statechart.ts is TypeScript, so run it with a runtime that can execute TypeScript.
The first run installs TLC and Java with mise and needs the network.
Write the spec
- Write each rule that the reader agrees to as an INVARIANT. A rule can be about a screen, a result, a stored value, or a message. If the model has no variable for a rule, add the variable. Never weaken a rule to make it hold.
- Write
Nextas a disjunction of the actions, such asYouPressPlay \/ YouPressStop. If you do not, TLC names every stepNext. - A state with no step out breaks
NoDeadlock, also when it is a correct end state. When an INVARIANT or a PROPERTY already has that name, the rule isCHECK_DEADLOCK. Add toNextan action that is true only in the end states and changes nothing, such asDone == phase \in {"paid", "failed"} /\ UNCHANGED vars, and give it a label instep().
Pick the chart
You do the work that needs judgment: the words on each state and arrow, the phases and their colors, the title, and the report to the reader. Put your work in a view module, and give it with --view.
To show the reader's words, the view exports state(vars). The value that state() returns picks the form:
- A string gives a flat chart:
export const state = (v) => (v.paid ? "Paid" : "Paying"); - An array gives parent states:
export const state = (v) => v.main.split("."); - An object gives one parallel region for each key:
export const state = (v) => ({ Playback: v.playback, Volume: v.volume });
Label each state with what the reader can see or cares about, such as "Paying" or "Lease held, write pending". Keep variable names out of labels. In vars, a TLA+ sequence is an object with keys from 1, so v.pc[1] is pc[1]. A set is an array.
What ships with it
60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/render.md 3.6 KB
- scripts/backends/cfg.ts 1.2 KB runs code
- scripts/backends/mermaid.ts 7.3 KB runs code
- scripts/backends/plain-text.ts 2.3 KB runs code
- scripts/backends/report.ts 6.9 KB runs code
- scripts/bun.lock 555 B
- scripts/frontends/config.ts 11 KB runs code
- scripts/frontends/dot.ts 2.4 KB runs code
- scripts/frontends/marks.ts 3.2 KB runs code
- scripts/frontends/messages.ts 1.9 KB runs code
- scripts/frontends/spec.ts 4.1 KB runs code
- scripts/frontends/trace.ts 988 B runs code
- scripts/frontends/value.ts 4.6 KB runs code
- scripts/frontends/verdict.ts 1.7 KB runs code
- scripts/frontends/view.ts 4.3 KB runs code
- scripts/ir.ts 15 KB runs code
- scripts/janitor.ts 537 B runs code
- scripts/package.json 233 B
- scripts/passes/annotate.ts 3.7 KB runs code
- scripts/passes/label.ts 8.4 KB runs code
- scripts/passes/lift.ts 2.8 KB runs code
- scripts/passes/loop-check.ts 2.1 KB runs code
- scripts/passes/paths.ts 1.9 KB runs code
- scripts/passes/reach.ts 4.0 KB runs code
- scripts/passes/region-check.ts 3.4 KB runs code
- scripts/passes/regions.ts 9.3 KB runs code
- scripts/pipeline.ts 2.9 KB runs code
- scripts/run.ts 19 KB runs code
- scripts/statechart 991 B
- scripts/statechart.ts 6.2 KB runs code
- scripts/test/chart.test.ts 39 KB runs code
- scripts/test/charts/Braces.mmd 312 B
- scripts/test/charts/Escapes.mmd 244 B
- scripts/test/charts/Phases.mmd 584 B
- scripts/test/child-env.test.ts 551 B runs code
- scripts/test/cli.test.ts 50 KB runs code
- scripts/test/config-fuzz.test.ts 8.6 KB runs code
- scripts/test/ConfigOracle.java 2.7 KB
- scripts/test/corpus.test.ts 13 KB runs code
- scripts/test/corpus/Counter/chart.mmd 112 B
- scripts/test/corpus/Counter/ChartRun.out 2.6 KB
- scripts/test/corpus/Counter/Counter.cfg 64 B
- scripts/test/corpus/Counter/Counter.tla 185 B
- scripts/test/corpus/Counter/graph.dot 633 B
- scripts/test/corpus/Counter/report.md 243 B
- scripts/test/corpus/Counter/sany.out 37 KB
- scripts/test/corpus/Counter/verdict-1.out 2.1 KB
- scripts/test/corpus/CounterAction/chart.mmd 518 B
- scripts/test/corpus/CounterAction/ChartRun.out 2.7 KB
- scripts/test/corpus/CounterAction/CounterAction.cfg 89 B
- scripts/test/corpus/CounterAction/CounterAction.tla 255 B
- scripts/test/corpus/CounterAction/graph.dot 798 B
- scripts/test/corpus/CounterAction/report.md 436 B
- scripts/test/corpus/CounterAction/sany.out 43 KB
- scripts/test/corpus/CounterAction/verdict-1.exit 3 B
- scripts/test/corpus/CounterAction/verdict-1.out 2.1 KB
- scripts/test/corpus/CounterAction/verdict-2.exit 3 B
- scripts/test/corpus/CounterAction/verdict-2.out 3.1 KB
- scripts/test/corpus/CounterAction/verdict-3.out 2.6 KB
- scripts/test/corpus/CounterDeadlock/chart.mmd 462 B
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 14d ago Changed · +46 lines · -12 tokens per session 9d401e0e3169
- 15d ago First seen · 36 lines · 82 tokens per session scan A 1191e664bb22
statechart is a skill published in the GitHub repository michael-denyer/pstack-claude (4,216 stars, last pushed today), licensed MIT. It adds 70 tokens to every session and 2,160 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-27.
statechart compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| statechartmichael-denyer/pstack-claude | Skill | 4.2k | today | MIT | A | 70 | Claude Code |
| istio-traffic-managementwshobson/agents | Skill | 42k | 2d ago | MIT | A | 40 | Claude Code |
| postgresql-table-designwshobson/agents | Skill | 42k | 2d ago | MIT | A | 37 | Claude Code |
| event-store-designwshobson/agents | Skill | 42k | 2d ago | MIT | A | 33 | Claude Code |
| chief-data-officer-advisoralirezarezvani/claude-skills | Skill | 30k | yesterday | MIT | A | 61 | Claude Code |
| general-counsel-advisoralirezarezvani/claude-skills | Skill | 30k | yesterday | MIT | A | 68 | Claude Code |
| strategic-alignmentalirezarezvani/claude-skills | Skill | 30k | yesterday | MIT | A | 38 | Claude Code |