Agent Skills › NicholasFlemmer/styx-app › state-machine-change

state-machine-change

GitHub

用于修改核心包中的会话或授权状态机,通过更新状态/事件联合、转换表及测试用例,确保变更的完备性与正确性。

.claude/skills/state-machine-change/SKILL.md NicholasFlemmer/styx-app

Trigger Scenarios

需要修改状态机的状态、事件、守卫或效果时 需要验证状态机转换逻辑的完整性时

Install

npx skills add NicholasFlemmer/styx-app --skill state-machine-change -g -y
More Options

Non-standard path

npx skills add https://github.com/NicholasFlemmer/styx-app/tree/main/.claude/skills/state-machine-change -g -y

Use without installing

npx skills use NicholasFlemmer/styx-app@state-machine-change

指定 Agent (Claude Code)

npx skills add NicholasFlemmer/styx-app --skill state-machine-change -a claude-code -g -y

安装 repo 全部 skill

npx skills add NicholasFlemmer/styx-app --all -g -y

预览 repo 内 skill

npx skills add NicholasFlemmer/styx-app --list

SKILL.md

Frontmatter
{
    "name": "state-machine-change",
    "description": "Modify the Session or Grant state machine in packages\/core with exhaustive transition tables and tests. Use whenever a state, event, guard, or effect changes.",
    "allowed-tools": "Read, Grep, Edit, Write, Bash(pnpm:*)",
    "argument-hint": "<session|grant> <change summary>"
}

State machine change: $ARGUMENTS

  1. Quote the spec §1 rule being implemented (/spec-lookup 1).
  2. Update the State/Event unions and the transition table in packages/core/src/machines/<name>.ts (object-literal table, not if-chains) so exhaustiveness errors surface missing cells. Invalid pairs return null.
  3. Effects are data ({ type: 'startExpiryTimer', grantId, at }), executed by main.
  4. Tests: table-driven over every (state, event) pair incl. invalid; invariants: needs-you never times out; always never expires; one open grant ask per session.
  5. Update the Mermaid diagram in docs/state-machines.md.
  6. Run pnpm test -F @styx/core --coverage (100% on machines) and the state-machine-auditor subagent.

Version History

  • 1d72019 Current 2026-10-18 15:23

Same Skill Collection

.claude/skills/db-migration/SKILL.md
.claude/skills/ipc-command/SKILL.md
.claude/skills/port-screen/SKILL.md
.claude/skills/provider-adapter/SKILL.md
.claude/skills/release/SKILL.md
.claude/skills/run-app/SKILL.md
.claude/skills/spec-lookup/SKILL.md
.claude/skills/ui-component/SKILL.md
.claude/skills/visual-diff/SKILL.md

Metadata

Files
0
Version
1d72019
Hash
faf15795
Indexed
2026-10-18 15:23

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-18 20:43
浙ICP备14020137号-1