跳到技能内容
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
词映 AI导航
工具库Skills 技能
我的收藏
词映 AI导航
发现工具选型指南Skills 技能AI 快讯AI图片AI视频AI文档AI办公AI助手AI搜索AI编程AI音频AI设计AI智能体模型与开发AI学习模型评测AI提示词内容检测AI金融AI 3D扫描与识别其他工具跨境电商 AI
Skills directory/Infrasity-Labs/dev-gtm-claude-skills/state-machine

Claude Code state-machine skill: Model form submission and retries

Describe a UI flow as states and transitions. Add conditions for each event so loading, failure, and retry behavior is easier to reason about and test.

中文

Install in Claude Code

Use a local Claude Code session with a written flow description. Start with a state transition table before choosing an implementation.

  1. Download the repository snapshot at the linked commit. Copy the entire .claude/skills/state-machine/ directory into .claude/skills/state-machine/ in your practice project.
  2. Confirm that SKILL.md is directly inside .claude/skills/state-machine/. Open Claude Code from the project root and enter /state-machine.

Example task

Run /state-machine. Describe an editable form that submits only with complete fields, disables the button during submission, confirms success, and keeps the draft if the request fails. Ask for a transition table and test cases.

What to check

The table prevents a second submit while the request is active. It also provides a retry from the error state that keeps the entered values.

Original SKILL.md on GitHub · Updated 2026-11-11

Frequently asked question

When does a form benefit from a state machine?

Use it when the interactions between editing, submitting, success, and failure become hard to track. The table gives each event a predictable outcome.

词映 AI 导航Skills 技能
工具分类全部工具已本地化技能选型指南AI 快讯