state-transition

Validate task-state prerequisites and log transitions in task.json.

4|Updated Sep 25, 2025
One-click install
npx skills add https://github.com/cowwoc/styler --skill state-transition
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: state-transition
Source: https://github.com/cowwoc/styler/tree/main/.claude/skills/state-transition
Command: npx skills add https://github.com/cowwoc/styler --skill state-transition

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safely transition task.json state with automatic prerequisite validation and proper timestamp tracking.

Core Features & Use Cases

  • Prerequisite validation: Verifies required files/flags/conditions for each transition.
  • State update: Appends transitions history and updates current state.
  • Audit trails: Maintains a transition log for metrics and compliance.

Quick Start

TASK_NAME="implement-formatter-api" FROM_STATE="INIT" TO_STATE="CLASSIFIED" /workspace/main/.claude/scripts/state-transition.sh
--task "$TASK_NAME"
--from "$FROM_STATE"
--to "$TO_STATE"

/workspace/main/.claude/scripts/state-transition.sh
--task "$TASK_NAME"
--to "$TO_STATE"
--auto-validate true

Frequently Asked Questions about state-transition

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate state transitions in a task workflow?

State transitions validate prerequisite conditions before moving tasks through lifecycle stages. This Skill automatically checks required files, flags, and conditions, updates task.json with the new state, and logs the transition for audit compliance.

What's the best way to prevent invalid task-state changes?

Prerequisite validation prevents invalid transitions by verifying all required conditions are met before state changes occur. This Skill applies validation rules across INIT to CLEANUP lifecycle stages, recording timestamps and maintaining a complete audit trail.

How do I set up automatic state machine validation for tasks?

Use the state-transition script with --task, --from, and --to parameters to move tasks through validated states. Enable --auto-validate true to automatically verify prerequisites, update state in task.json, and generate transition logs without manual intervention.

Can I track task state changes for compliance and metrics?

Yes. This Skill maintains transition logs that record each state change with timestamps, creating an audit trail suitable for compliance tracking and workflow metrics analysis throughout the task lifecycle.

What prerequisites must be met before transitioning task states?

Prerequisites vary by transition and are validated automatically—typically including required files, completion flags, or condition checks specific to each lifecycle stage. The Skill verifies these before allowing state updates.