name: workflow-state-patterns
description: Hook-based state machine patterns for multi-phase workflows. Use when designing sequential workflows with quality gates.
allowed-tools: ["Read", "Write", "Grep", "Glob"]
Workflow State Patterns
Multi-phase workflows need phase enforcement, session continuity, and quality gates. This pattern uses file-based state + hooks.
Quick Start
Define phases: analyze → plan → execute → verify
Create state files on phase completion: .workflow-phase-done
Add PreToolUse hooks to check required state files
Run npx skillmds@latest add tomevault-io/chkim-su-forge-editor-workflow-state-patterns in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
--- It is listed under Productivity on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.