Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Hidden state machine audit

Finds the hidden state machines in your app, maps each state and move, and proposes a clear transition map.

Claude's review

7/10 Useful implicit state machine audit for Convex apps, problems list and other skills not included.

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

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.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: state-machines
description: "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."
---

# 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.

## What counts

- A field named `status`, `state`, `stage`, `phase`, or `step` (draft, pending, paid, shipped, refunded).
- A group of booleans that act like one status: `isPaid`, `isApproved`, `isRejected`, `isPublished`.
- A timestamp that doubles as a flag: `paidAt`, `deletedAt`, `completedAt`, `verifiedAt`.
- A flow spread across UI, mutations, webhooks, and scheduled jobs: onboarding, checkout, invites, approvals, AI jobs, uploads.

## Run the audit

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`.

1. **Find the fields.** Search the schema and types:

   ```bash
   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.

2. **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.

3. **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.

4. **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.

...

From waynesutton's repository, Apache-2.0 licence.

Related skills

  • Checked

    Kotlin Toolchain CLI

    Builds, tests and packages Kotlin projects with the new JetBrains Kotlin Toolchain CLI, formerly called Amper.

    by Kotlin 1.1k
    7/101 credit
  • Checked

    Rust best practices

    Writes and reviews idiomatic, maintainable Rust code and runs a checklist before handing it back to you.

    by morganlinton 2.2k
    7/101 credit
  • Checked

    Port code to Rust

    Ports C, C++, Python, Go or JavaScript code into idiomatic Rust, with tests that prove it behaves the same.

    by morganlinton 2.2k
    9/101 credit
  • Checked

    Rust code review

    Reviews Rust code for idiom, errors, safety and API design, with a ranked report and a fix for every finding.

    by morganlinton 2.2k
    8/101 credit
  • Checked

    Java Debugging Guide

    Finds the cause of Java bugs and failing tests, and attaches a debugger safely in Maven, Gradle, Spring or Docker.

    by github 42k
    7/101 credit
  • Checked

    Multi axis code review

    Reviews a diff for correctness, design, tests and security with severity labels, so only solid code merges.

    by addyosmani 122k
    8/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added