Audit State Machine
ben-manes/caffeine
Audit explicit state machines (drain status, node lifecycle, async-value lifecycle) for illegal or missed transitions
Task lifecycle state transitions with validation gates. An agent skill from MadAppGang/claude-code.
$ npx skills add MadAppGang/claude-code --skill state-machine -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install MadAppGang/claude-code state-machine --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/autopilot/skills/state-machine .claude/skills/state-machine && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "state-machine" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/autopilot/skills/state-machine into .claude/skills/state-machine/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "state-machine", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/MadAppGang/claude-code/tree/main/plugins/autopilot/skills/state-machineType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add MadAppGang/claude-code --skill state-machine -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install MadAppGang/claude-code state-machine --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/autopilot/skills/state-machine .agents/skills/state-machine && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "state-machine" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/autopilot/skills/state-machine into .agents/skills/state-machine/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "state-machine", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add MadAppGang/claude-code --skill state-machine -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install MadAppGang/claude-code state-machine --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/autopilot/skills/state-machine .cursor/skills/state-machine && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "state-machine" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/autopilot/skills/state-machine into .cursor/skills/state-machine/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "state-machine", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/MadAppGang/claude-code.git --path plugins/autopilot/skills/state-machine--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add MadAppGang/claude-code --skill state-machine -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install MadAppGang/claude-code state-machine --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/autopilot/skills/state-machine .gemini/skills/state-machine && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "state-machine" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/autopilot/skills/state-machine into .gemini/skills/state-machine/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "state-machine", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install MadAppGang/claude-code state-machineInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add MadAppGang/claude-code --skill state-machine -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/autopilot/skills/state-machine .github/skills/state-machine && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "state-machine" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/autopilot/skills/state-machine into .github/skills/state-machine/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "state-machine", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add MadAppGang/claude-code --skill state-machine -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install MadAppGang/claude-code state-machine --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/autopilot/skills/state-machine .opencode/skills/state-machine && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "state-machine" agent skill from https://github.com/MadAppGang/claude-code/tree/main/plugins/autopilot/skills/state-machine into .opencode/skills/state-machine/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "state-machine", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
state-machineTask lifecycle state transitions with validation gates. An agent skill from MadAppGang/claude-code.
State Machine is an agent skill from MadAppGang/claude-code. Task lifecycle state transitions with validation gates. Defines states, triggers, and required proofs.
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: claude code plugins marketplace. The licence is MIT.
Read from SKILL.md and the folder at commit 6097ad4. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
State Machine loads about 1.7k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 273 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from MadAppGang/claude-code at commit 6097ad4, republished under its MIT licence (© MadAppGang). 273 words, ~1,677 tokens.
.claude/skills/state-machine/SKILL.md (or your agent's skills folder).plugin: autopilot updated: 2026-01-20
Version: 0.1.0 Purpose: Manage task state transitions with validation gates Status: Phase 1
Use this skill when you need to:
Todo ──→ In Progress ──→ In Review ──→ Done
↑ │
└───────────┘
(iteration)
In Progress ──→ Blocked (escalation)| 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 |
| 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 |
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);
}async function canSubmitForReview(proof: Proof): Promise<boolean> {
const checks = [
// All tests pass
proof.testResults.passed === proof.testResults.total,
// Build successful
proof.buildSuccessful,
// No lint errors
proof.lintErrors === 0,
// Has proof artifacts
proof.screenshots.length > 0 || proof.deploymentUrl,
];
return checks.every(c => c);
}async function canComplete(proof: Proof): Promise<{
canProceed: boolean;
autoApproved: boolean;
}> {
if (proof.confidence >= 95) {
return { canProceed: true, autoApproved: true };
}
if (proof.confidence >= 80) {
return { canProceed: false, autoApproved: false };
// Wait for user approval
}
return { canProceed: false, autoApproved: false };
// Validation failed, should iterate
}| Loop Type | Max Iterations | Escalation |
|---|---|---|
| Execution retry | 2 | Block task |
| Feedback rounds | 5 | Manual intervention |
| Quality check fixes | 2 | Report to user |
class StateMachine {
async transition(
issueId: string,
targetState: string,
proof?: Proof
): Promise<void> {
const issue = await linear.issue(issueId);
const currentState = issue.state.name;
// Validate transition
const isValid = this.validateTransition(currentState, targetState, proof);
if (!isValid) {
throw new Error(`Invalid transition: ${currentState} -> ${targetState}`);
}
// Execute transition
await linear.issueUpdate(issueId, {
stateId: await this.getStateId(issue.team.id, targetState),
});
// Log transition
await this.logTransition(issueId, currentState, targetState, proof);
}
private validateTransition(
from: string,
to: string,
proof?: Proof
): boolean {
const validTransitions: Record<string, string[]> = {
'Todo': ['In Progress', 'Blocked'],
'In Progress': ['In Review', 'Blocked'],
'In Review': ['Done', 'In Progress'],
'Blocked': ['Todo', 'In Progress'],
};
return validTransitions[from]?.includes(to) ?? false;
}
} ┌─────────────────────────────┐
│ │
▼ │
┌──────┐ ┌─────────────┐ ┌───────────┴───┐ ┌──────┐
│ Todo │ ────► │ In Progress │ ────► │ In Review │ ────► │ Done │
└──────┘ └─────────────┘ └───────────────┘ └──────┘
│ │ │
│ │ │
│ ▼ │
│ ┌─────────┐ │
└────────► │ Blocked │ ◄─────────────────┘
└─────────┘// Task created
await transitionState(issueId, 'In Progress'); // Gate: Has acceptance criteria
// Work complete, proof generated
await transitionState(issueId, 'In Review'); // Gate: Proof >= 80%
// High confidence auto-approval
await transitionState(issueId, 'Done'); // Gate: Confidence >= 95%// First attempt
await transitionState(issueId, 'In Progress');
await transitionState(issueId, 'In Review'); // Confidence: 85%
// User requests changes
await transitionState(issueId, 'In Progress'); // Feedback: REQUESTED_CHANGES
// Second attempt
await transitionState(issueId, 'In Review'); // Confidence: 97%
await transitionState(issueId, 'Done'); // Auto-approved// After 5 feedback rounds
if (iterationCount >= MAX_FEEDBACK_ROUNDS) {
await transitionState(issueId, 'Blocked');
await addComment(issueId, "Escalated: Max iterations reached");
}© MadAppGang, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/autopilot/skills/state-machine of MadAppGang/claude-code.
Open the folder on GitHubat commit 6097ad4
State Machine next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| State Machine this skillMadAppGang/claude-code | 285 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Audit State Machineben-manes/caffeine | 18k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| State MachineOwl-Listener/designer-skills | 2.9k | 1 repos | ~488 | Automated safety check: Pass | MIT | |
| State Machinejame581/GodotPrompter | 799 | — | ~3.5k | Automated safety check: Pass | MIT | |
| Gate Testsvercel/next.js | 143k | — | ~2.7k | Automated safety check: Pass | MIT | |
| View Transitionsthedaviddias/Front-End-Checklist | 74k | — | ~528 | Automated safety check: Pass | MIT |
ben-manes/caffeine
Audit explicit state machines (drain status, node lifecycle, async-value lifecycle) for illegal or missed transitions
Owl-Listener/designer-skills
Model component behaviour as explicit states, events, and transitions.
jame581/GodotPrompter
A skill your agent uses when implementing state machines in Godot — enum-based, node-based, and resource-based FSM patterns with trade-offs
vercel/next.js
How to use the @gate / @force-gate test directives instead of it.skip or fake-green skip patterns.
thedaviddias/Front-End-Checklist
A skill your agent uses when adding page transition animations, image expand/contract effects, shared-element transitions, or improving navigation UX in a single-page or multi-page application.
sickn33/agentic-awesome-skills
Guide React and Next.js view transitions, shared element animations, route transitions, transition types, and reduced-motion-safe UI state animation.
MadAppGang/claude-code
Content brief template and creation methodology for SEO-optimized content.
MadAppGang/claude-code
A skill your agent uses when detecting project technology stack from files/configs/directory structure, auto-loading framework-specific skills, or analyzing multi-stack fullstack projects (e.g…
MadAppGang/claude-code
On-page SEO optimization techniques including keyword density, meta tags, heading structure, and readability.
MadAppGang/claude-code
Techniques for expanding seed keywords and clustering by topic and intent.
MadAppGang/claude-code
SERP analysis techniques for intent classification, feature identification, and competitive intelligence.
MadAppGang/claude-code
A skill your agent uses when deciding whether to launch an agent, selecting which agent to use, or coordinating multiple agents.
Task lifecycle state transitions with validation gates. An agent skill from MadAppGang/claude-code. State Machine is an agent skill from MadAppGang/claude-code. Task lifecycle state transitions with validation gates.
Run `npx skills add MadAppGang/claude-code --skill state-machine -a claude-code`. Or copy the skill folder (plugins/autopilot/skills/state-machine in MadAppGang/claude-code) into .claude/skills/state-machine in your project. Claude Code loads it when a task matches its description.
Run `npx skills add MadAppGang/claude-code --skill state-machine -a codex`. Or copy the skill folder (plugins/autopilot/skills/state-machine in MadAppGang/claude-code) into .agents/skills/state-machine in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MadAppGang/claude-code --skill state-machine -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/state-machine, .gemini/skills/state-machine, .github/skills/state-machine and .opencode/skills/state-machine in your project.
SKILL.md names no scripts, command-line tools or credentials: State Machine is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
State Machine is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with State Machine: Audit State Machine (ben-manes/caffeine, 18k stars), State Machine (Owl-Listener/designer-skills, 2.9k stars), State Machine (jame581/GodotPrompter, 799 stars) and Gate Tests (vercel/next.js, 143k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
MadAppGang (a GitHub organization) maintains it in MadAppGang/claude-code, which has 285 GitHub stars. The repository holds 69 skills in this directory. The repository was last updated on March 15, 2026.
Source: MadAppGang/claude-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.