state-machine

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

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.

agentmods
npx agentmods add skills/madappgang/claude-code/state-machine
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.

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. Scan, not verified.
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 $0.00020 $0.01613
Opus 5 $0.00010 $0.00807
Sonnet 5 $0.00004 $0.00323
Haiku 4.5 $0.00002 $0.00161

Measured 3d ago against content hash e4361f050bc0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 (279 stars, last pushed 5mo ago), licensed MIT. It adds 20 tokens to every session and 1,613 once invoked, about $0.0001 per session on Opus 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

state-trees

Create, inspect, and edit StateTree assets — states, tasks, transitions, conditions, considerations, and property bindings for AI behavior and game logic (StateTreeService). Use when the user asks to build a StateTree, add states/tasks/transitions, bind task properties, set up Utility AI considerations, or wire…

kevinpbuckley/VibeUE · 72 tokens

finishing-a-development-branch

Verifies, summarises, and closes a development branch.

andreaswasita/copilot-agents-dojo · 19 tokens

requesting-code-review

Self-reviews work against the plan before sign-off.

andreaswasita/copilot-agents-dojo · 16 tokens

login_auto

基于 Supabase Auth + Resend SMTP 实现通用登录系统,零新依赖。覆盖邮箱密码登录、OAuth(google/github)、邮箱验证码注册、邮箱验证码改密。验证码邮件经 Supabase 自定义 SMTP 接入 Resend 投递。当用户说"loginauto"、"登录实现"、"Supabase登录"、"通用登录"时触发。.

weiyi88/cc-code · 82 tokens

init

初始化 cc-code 极简开发工作流场域。三轨判定(新建/已最新/升级迁移) → 生成 .cccode/ 黑匣子目录树与模板骨架 → 旧版场域按「归档→清点→迁移→校验→归位」升级到当前插件规范(全程零删除) → 进入角色串行状态机循环。.

weiyi88/cc-code · 87 tokens