Convert State Machines to Actors
Convert a database-backed implicit state machine to an actor, the one owner every writer of the persisted state goes through. Use when asked to put writers behind one owner, or to fix a race or lost update across several writers, such as a find-implicit-state-machines finding.
Install
npx skills add kr4chinin/skills --skill convert-state-machines-to-actorsgit clone --depth 1 https://github.com/kr4chinin/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/convert-state-machines-to-actors ~/.claude/skills/convert-state-machines-to-actorsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Convert implicit state machines to actors An actor is the one owner of a process's persisted state: writers send it events instead of writing. It is a function run per event with nothing kept in memory; the database is the authority, so the actor holds across replicas and restarts. Input: findings from `find-implicit-state-machines`, a `path:line` or a ticket. Keep the finder's label: convert **Confirmed**; convert **Likely** only after its step 2 test goes red, unless the user asked for one owner; a **Smell** only on request. For several findings, see [Several machines](#several-machines). One conditional write (`UPDATE ... WHERE status = :expected`, checking the row count) is often the whole fix. Build an actor only when one conditional write cannot cover the writers or the user asks for one owner; otherwise recommend the conditional write and stop. If the writers are not known yet, decide after step 3. ## 1. Check for existing work Read recent history of the files and look for open branches or pull requests on the same code. Report any change that covers the finding. Stop if it does, unless the user asked for one owner; then stop only if a change already makes that conversion. ## 2. Reproduce Write a test that replays the finding's event sequence and asserts its reason (the final state, the error), so it goes red for that reason only. A sequential defect replays in order. A race runs its writers in two
Details
- Skill name
convert-state-machines-to-actors- Repository
- kr4chinin/skills
- Path
skills/convert-state-machines-to-actors/SKILL.md- License
- MIT
- Repo updated
- 16 November 2026
FAQ
What does the Convert State Machines to Actors skill do?
Convert a database-backed implicit state machine to an actor, the one owner every writer of the persisted state goes through. Use when asked to put writers behind one owner, or to fix a race or lost update across several writers, such as a find-implicit-state-machines finding.
How do I install the Convert State Machines to Actors skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add kr4chinin/skills --skill convert-state-machines-to-actors. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Convert State Machines to Actors popular?
It lives in kr4chinin/skills, which has 9 GitHub stars and 0 forks.
Related skills
Find Implicit State Machines
9kr4chinin/skills
Audit a codebase for implicit state machines (state spread across flags, status fields, timers and callbacks). Use when asked to find them or to trace impossible states, stuck loading, missing resets or async races. Catalog machines with no defect only when asked for an inventory.
Prune Comments
9kr4chinin/skills
Audit code comments and plan which to delete, keep, rewrite or replace with a refactor. Use when asked to prune a codebase's comments, or to sort workaround comments into root-cause fixes and safe deletions.
Recover Semantic Model
9kr4chinin/skills
Recover a program's minimal semantic model (the state that changes what users see, how its transitions repeat and reorder, what each effect requires). Use when asked to recover or audit that model, to check what is idempotent or order-dependent, or to split a refactor into provably equivalent and "trust me" changes.
Flow Audit
9adaptyteam/adapty-skills
Use when a client asks whether a Flow Builder flow is ready for production, wants it audited or checked, or asks something like "did I forget anything — triggers, products, variables?", "is this ready to publish?", or "check my paywall/flow". Answers one question — is this flow safe to put in front of paying users — with a verdict and ranked findings. Read-only: never writes to a flow. Complements `flow-generator` (which owns writes) and `paywall-teardown` (which owns conversion advice).
Adapty Docs
9adaptyteam/adapty-skills
Use when an Adapty question has no page already linked in the skill you are holding — how a product or dashboard feature behaves, what a setting does, a limit, store connections, Flow Builder, the Developer CLI, the server-side API, or an SDK method on any platform. Also use when you need a docs page and have no URL for it, or when a docs URL you tried returned 404. Not for making a change to an app's Adapty setup — connecting a store, or creating products, access levels or placements — which `adapty-integration` carries out through the Adapty CLI.
Flow Generator
9adaptyteam/adapty-skills
Use when a user wants to change an Adapty flow by editing its builder config JSON — add a locale, translate a paywall or onboarding, rewrite copy, add/remove/reorder screens, add tabs or plan pickers, wire quiz branching, or build an onboarding sequence — and also once a flow is published, to point a placement at it so an app can fetch it. Triggers on "edit my flow config", "add a language to my paywall", "translate my onboarding", "remove a screen from the flow", "add tabs to my paywall", "show the user's name or coin balance on my paywall", "add a Lottie animation, a map or a chart", "build
Browse the most popular Claude skills, all writing & content skills, or write your own with the skills generator.