- name
SKILL.md
스킬 파일은 게시자의 저장소에 그대로 있습니다.
복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add waynesutton/builder-skills --skill state-machines -a cursor -y복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add waynesutton/builder-skills --skill state-machines -a claude-code -y복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add waynesutton/builder-skills --skill state-machines -a codex -y복사한 명령을 터미널에 붙여넣습니다. 이 SKILL.md가 해당 에이전트에 설치됩니다.
npx skills add waynesutton/builder-skills --skill state-machines -a grok -y복사한 메시지를 Grok Bot 채팅에 보냅니다. Bot이 GitHub에서 이 SKILL.md를 가져와 모든 Bot이 공유하는 스킬에 추가합니다.
Install this skill: https://github.com/waynesutton/builder-skills/tree/HEAD/skills/state-machines게시자 제공
An implicit state machine is a field, or a group of fields, that moves through stages with no written list of allowed moves. The list exists anyway. It is spread across every function that writes the field, and nobody has read it in one place.
This skill reads it in one place. It writes a report. It changes no code until the user picks a machine to fix.
Most of what it finds is product design and bugs. The part an attacker can use belongs to sec-check rule 21.
status, state, stage, phase, or step (draft, pending, paid, shipped, refunded).isPaid, isApproved, isRejected, isPublished.paidAt, deletedAt, completedAt, verifiedAt.Work at the repo root with the whole repo open. On a Convex app, start with convex/schema.ts, then convex/**/*.ts, convex/http.ts, and convex/crons.ts.
Find the fields. Search the schema and types:
rg -n "\b(status|state|stage|phase|step)\b\s*[:=]" convex src --glob '!**/_generated/**'
rg -n "\bis[A-Z]\w+:\s*v\.(boolean|optional)" convex/schema.ts
rg -n "\w+At:\s*v\.(number|optional)" convex/schema.ts
Group booleans and timestamps on the same table that describe one lifecycle. Each group is one machine.
List the states. Read the validator (v.union(v.literal(...))) and every literal written in code. A value written in code but missing from the validator, or the reverse, is a finding.
Find every writer. For each machine, list every ctx.db.patch, ctx.db.insert, and ctx.db.replace that sets the field. Search by field name, not by table. Include webhooks, crons, scheduled functions, and migrations. For each writer record the move: from which states (what it checks before writing, or "any" when it checks nothing) and to which state.
Find who can trigger each move. Public, signed in, owner, admin, verified webhook, or internal. A public function that calls an internal one makes the move public.
Find the side effects. Emails, payments, payouts, AI calls, and scheduled jobs tied to a move. Note whether each one runs in the mutation that makes the move, before it, or from the client.
Check for problems. Use references/problems.md. It lists each problem, how to spot it, and the fix.
Write the report. Use the format below. Order machines by risk: money, access, and one time moves first.
Stop. Do not edit code. Ask which machine to fix first.
# State machines: PROJECT
Found N machines. M have problems. Date, commit.
## 1. orders.status
States: draft, pending, paid, cancelled, refunded
Lives in: `orders` (convex/schema.ts:42)
| Move | Function | Who can trigger | Checks current state | Side effects |
| --- | --- | --- | --- | --- |
| draft -> pending | orders:submit (public mutation) | owner | yes | none |
| any -> paid | orders:setStatus (public mutation) | any signed in user | no | receipt email, from the client |
Problems:
1. `orders:setStatus` takes the new status from args. Any signed in user can mark an order paid. Security: sec-check rule 21.
2. Nothing moves `pending` to `cancelled`. Abandoned orders stay pending forever.
Proposed transition map:
draft: [pending]
pending: [paid, cancelled]
paid: [refunded]
cancelled: []
refunded: []
Fixes, in order:
1. Replace `setStatus` with named mutations. `markPaid` becomes internal, called by the verified webhook.
2. Add a cron that cancels orders pending for more than 24 hours.
Mark each problem as security, bug, or design. Say "none found" for a clean machine and keep it in the report, so the next run can compare.
Only after the user picks one. Fix one machine at a time.
For Convex APIs, check https://docs.convex.dev/llms.txt before relying on memory.
Finds the implicit state machines in an app: status, state, stage, phase, and step fields, groups of booleans that act like one status, and flows spread across UI, mutations, webhooks, and scheduled j
---name: state-machinesdescription: Finds the implicit state machines in an app: status, state, stage, phase, and step fields, groups of booleans…---# skills/state-machines/SKILL.md개요
Finds the implicit state machines in an app: status, state, stage, phase, and step fields, groups of booleans that act like one status, and flows spread across UI, mutations, webhooks, and scheduled jobs. Reports every state, every function that moves it, who can trigger each move, and the problems, then proposes an explicit transition map. Report only by default. Use when the user says find the implicit state machines, audit status fields, map the order or onboarding flow, or when a status bug, a skipped step, or a double run refund, payout, or email shows up.
FAQ
게시자에게서 skills/state-machines/SKILL.md를 다운로드하거나 경로를 복사해 저장소를 엽니다. PlugMCP는 스킬을 목록에 올릴 뿐 파일을 호스팅하지 않습니다.
게시자가 https://github.com/waynesutton/builder-skills에서 관리합니다.
Claude, Cursor, Codex, Grok Build는 게시자의 저장소에서 추가한 SKILL.md를 읽을 수 있습니다. Grok Bot은 채팅에서 스킬의 GitHub 폴더 링크를 보내면 설치합니다.