patpat-statechart

patpat-statechart is a skill for Claude Code, Codex from goiltpatpat/patpat. It costs 31 tokens per session (1,125 once invoked), scanned A, original, MIT.

A state-flow modelling tool for showing how a product, service, protocol, or business process moves between conditions. It checks agreed rules with TLA+/TLC, tools for testing possible system behaviours, and displays broken rules as Mermaid diagrams.

In plain words
What is it for?
Use it to examine checkouts, logins, deployments, agent workflows, media players, and order processes. It is for finding and explaining rule-breaking paths through a flow.
Why use it?
It helps reveal flows that can get stuck, repeat an action, or break a business rule before those problems reach users. The diagram explains the failing path in the reader’s own words.

Skill for Claude CodeCodex

Written for Claude Code and Codex: disable-model-invocation in frontmatter, but also agents/openai.yaml present.

Part of the patpat plugin — 29 skills, 1 agent, 4 hooks shipped together

Good fit Use it to examine checkouts, logins, deployments, agent workflows, media players, and order processes. It is for finding and explaining rule-breaking paths through a flow.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/goiltpatpat/patpat/patpat-statechart
Install

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.

Any agent
npx skills add goiltpatpat/patpat --skill patpat-statechart
Clone the repo
git clone --depth 1 https://github.com/goiltpatpat/patpat

Made for: Claude Code, Codex.

Or install patpat, the plugin that ships this one along with the rest of its 29 skills, 1 agent, 4 hooks.

Wrote 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.

agentmods badge for patpat-statechart

README.md
[![agentmods](https://agentmods.dev/badge/skills/goiltpatpat/patpat/patpat-statechart/github.svg)](https://agentmods.dev/skills/goiltpatpat/patpat/patpat-statechart)
Your own site
<a href="https://agentmods.dev/skills/goiltpatpat/patpat/patpat-statechart"><img src="https://agentmods.dev/badge/skills/goiltpatpat/patpat/patpat-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.

agentmods 80×15 button for patpat-statechart

Your own site · 80×15
<a href="https://agentmods.dev/skills/goiltpatpat/patpat/patpat-statechart"><img src="https://agentmods.dev/badge/skills/goiltpatpat/patpat/patpat-statechart.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,125 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.01125
Opus 5.5 $0.00012 $0.00450
Sonnet 5.5 $0.00006 $0.00225
Haiku 4.5 $0.00003 $0.00112

Measured yesterday against content hash e0e920d40d40, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

patpat-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 yesterday.

The scan reads SKILL.md. This mod also ships 34 executable files (scripts/backends/cfg.ts, scripts/backends/mermaid.ts, scripts/backends/plain-text.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/patpat-statechart/SKILL.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Patpat Statechart

Before following this skill, apply the skill state and mutation gate.

Answer one reader's question in their words: can this flow reach a state that breaks a rule they care about?

Choose the route

  • Use here: Behavior over time where a rule must be checked (stuck states, double-charge, invalid handoff). Keep runs ephemeral in scratch or /tmp/ and report rules, bug paths, and Mermaid in chat; never write statechart runs or dashboards into docs/diagrams/.
  • Structure without rule-checking: Route to patpat-repository-diagram.
  • Durable project suite: Route to patpat-formal-verify (which sends its TLA+ results back here).
  • Saved patpat-model-check-receipt without running TLC: Follow references/receipt-rendering.md.

Frame

  1. Name the reader and write each rule as one user-agreeable sentence; ask only when a rule is an unsettled product choice.
  2. List actors and events (citing owning file and function for code flows; if a patpat-repository-diagram JSON exists, import it per references/modeling-and-handoff.md).
  3. State omissions, explicit bounds, and any waived rules. Define the five-field proof contract before committing a chart or model; scratch charts require only a rerunnable command.

Model

Work in a scratch folder outside the repository (SPEC.tla, SPEC.cfg, view.mjs). Encode each reader rule as an INVARIANT without weakening it, map state(vars) and step(action, from, to) to reader-visible wording, and follow TLA+/view conventions in references/modeling-and-handoff.md. Read references/chart-view.md for parent states, parallel regions, bracketed conditions, phase colors, and keeping charts to ~20 arrows.

Read the full file on GitHub · 66 lines

Files

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.

Changes

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.

  1. yesterday Changed · -2 lines e0e920d40d40
  2. 7d ago Changed · -23 lines 941efd3efaa3
  3. 9d ago Changed · -81 tokens per session 2f2de9aa28a4
  4. 19d ago Changed · +1 lines 7d58373ba9b9
  5. 24d ago Changed · +2 lines c4d55b2f9db0
  6. 28d ago First seen · 88 lines · 112 tokens per session scan A a8d7934e032f

Subscribe to this mod's changes

patpat-statechart is a skill published in the GitHub repository goiltpatpat/patpat (1 stars, last pushed yesterday), licensed MIT. It adds 31 tokens to every session and 1,125 once invoked, about $0.0001 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-11-01.

Related

patpat-statechart compared with skills from other repositories

patpat-statechart next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
patpat-statechartgoiltpatpat/patpatSkill1yesterdayMITA31Claude Code, Codex
kafka-consumer-laglensesio/agentic-engineering-for-apache-kafkaSkill713mo agoMITA84Claude Code
diagnose-backend-bugQoderAI/better-harnessSkill2.5k18d agoMITA87Claude Code, Codex
chisle-auditJayPokale/ChisleSkill1.3k3d agoMITA130Claude Code
kiro-verify-completiongotalab/cc-sddSkill3.8k1mo agoMITA39Codex
debug-livemicrosoft/DebugMCPSkill59016d agoMITA84Claude Code
dsh-error-handlingqufei1993/skills-hubSkill1.9kyesterdayMITA39Codex