state-machine

state-machine is a skill for Claude Code, Codex from MadAppGang/claude-code. It costs 20 tokens per session (1,613 once invoked), scanned A, original, MIT.

A task-lifecycle guide that defines allowed states, transitions, and checks for software tasks. It covers stages such as Todo, In Progress, In Review, Done, and Blocked.

In plain words
What is it for?
Implementing or understanding task-state rules, validation gates, approval loops, escalation, and iteration limits.
Why use it?
It prevents tasks from changing status without the required work or evidence and defines how review and blocked tasks are handled.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Implementing or understanding task-state rules, validation gates, approval loops, escalation, and iteration limits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/madappgang/claude-code/state-machine
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 MadAppGang/claude-code --skill state-machine
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/claude-code

Made for: Claude Code, Codex.

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 state-machine

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/madappgang/claude-code/state-machine"><img src="https://agentmods.dev/badge/skills/madappgang/claude-code/state-machine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,613 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.00020 $0.01613
Opus 5.5 $0.00008 $0.00645
Sonnet 5.5 $0.00004 $0.00323
Haiku 4.5 $0.00002 $0.00161

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

Security

Grade A, and why

state-machine 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 1mo 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.

plugins/autopilot/skills/state-machine/SKILL.md · 242 lines

How it starts

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

plugin: autopilot updated: 2026-01-20

Task Lifecycle State Machine

Version: 0.1.0 Purpose: Manage task state transitions with validation gates Status: Phase 1

When to Use

Use this skill when you need to:

  • Understand valid state transitions for tasks
  • Implement validation gates before state changes
  • Handle iteration loops (In Review -> In Progress)
  • Manage escalation to blocked state
  • Enforce iteration limits

States

Todo ──→ In Progress ──→ In Review ──→ Done
                 ↑           │
                 └───────────┘
                 (iteration)

In Progress ──→ Blocked (escalation)

State Definitions

State Description Entry Condition
Todo Task queued for execution Created with @autopilot label
In Progress Task being executed Passed start gate
In Review Awaiting validation Proof generated
Done Task completed Auto-approved or user approved
Blocked Cannot proceed Dependency issue or escalation

Transition Triggers

From To Trigger Gate
Todo In Progress Label @autopilot added Has acceptance criteria
In Progress In Review Work complete Proof >= 80% confidence
In Review Done Confidence >= 95% Auto-approval
In Review Done User approves User feedback = APPROVAL
In Review In Progress Confidence < 80% Validation failed
In Review In Progress User requests changes Feedback = REQUESTED_CHANGES
In Progress Blocked Max iterations Escalation
* Blocked Unresolvable blocker Manual trigger

Validation Gates

Gate 1: Start Work (Todo -> In Progress)

async function canStartWork(issue: Issue): Promise<boolean> {
  const checks = [
    // Has acceptance criteria
    extractAcceptanceCriteria(issue.description).length > 0,

    // No blocking dependencies
    (await getBlockingIssues(issue)).length === 0,

    // Assigned to autopilot
    issue.assignee?.id === AUTOPILOT_BOT_USER_ID,
  ];

  return checks.every(c => c);
}

Read the full file on GitHub · 242 lines

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. 1mo ago First seen · 242 lines · 20 tokens per session scan A e4361f050bc0

Subscribe to this mod's changes

state-machine is a skill published in the GitHub repository MadAppGang/claude-code (287 stars, last pushed 7mo ago), licensed MIT. It adds 20 tokens to every session and 1,613 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-08-30.

Related

Other skills, from other repositories

animation-blueprint

Navigate, inspect, and author Animation Blueprints — state machines, states, transitions, and transition rules (AnimGraphService). Use when the user asks to create or edit an Animation Blueprint/AnimBP, add a state machine or states, wire transitions between states, set a state's animation, or inspect AnimGraph…

kevinpbuckley/VibeUE · 68 tokens

agent-whole-qa

A coordinator for testing an entire application and sending failures to separate development and testing agents. It repeats repair and regression rounds rather than writing code or tests itself.

weiyi88/cc-code · 32 tokens

agent-mvp

An execution workflow for building a minimum viable product, meaning the smallest complete version of a product that can be tested with users. It reads approved plans, assigns development and testing in order, and coordinates fixes until the planned checks pass.

weiyi88/cc-code · 37 tokens

plan-mvp

A planning workflow for defining a complete minimum viable product from the beginning. It gathers decisions in planning mode and records the product, interface, project, data, and API documents for a later implementation workflow.

weiyi88/cc-code · 29 tokens

agent-feature

An execution workflow for implementing a previously planned feature. It reads the approved requirements and coordinates development, testing, and targeted rechecks without redesigning the feature.

weiyi88/cc-code · 27 tokens

plan-feature

A guided planning workflow for adding an incremental feature to an existing product. It compares the requested change with current code and documented requirements before recording the work for implementation.

weiyi88/cc-code · 28 tokens