Agent skill · Jakub Krehel's Interface Skills
/state-machine See every state of a component on one throwaway page
state-machine gives you a workbench for a single component. The agent reads the code for every branch it can render, builds a scratch route that imports the real component, feeds each state with realistic mock data and adds a grouped switcher driven by a search parameter. The page stays up while you work and is removed in one step when you say so.
Works with
- Agents supported by the skills CLI
When to use it
- You are polishing a table or card and need to see its empty, loading and error states quickly.
- Plan tiers, roles or feature flags change what a component shows.
- Designers want to review states that are hard to reach in the running app.
How it works
- 1Pick one component
The agent scopes the run to a single component and restates what it shows, where it renders and where its data comes from.
- 2List reachable states
It reads the component and its data hooks for data, account and feature states, leaving out anything the code cannot reach and listing designed-but-missing states.
- 3Build the scratch route
A route inside the app imports the untouched component, inherits the app's layout and providers and keeps fixtures and switcher in one folder.
- 4Feed data at the boundary
Mock data enters through props or the app's own data seam, looks like real product data, and loading states stay pending until switched.
- 5Confirm and hand over
Every state is loaded once to confirm the mock data appears, then the agent hands over the URL and stops.
What it steers the agent away from
- Editing the component or adding branches just to display a state.
- Placeholder data like three rows of test items that hides real layout problems.
- Restyling the component on the scratch page or changing visuals unasked.
Install this skill
It installs with the Jakub Krehel's Interface Skills pack.
Agents supported by the skills CLIInstalls the whole collection; the README documents no other route.
npx skills add jakubkrehel/skillsCommands come from the author’s README; check it for changes before you run them.
Questions
How is it different from break?
state-machine shows one product state at a time for ongoing work, while break stacks worst-case scenarios on one page for a single inspection.
Does it work with Next.js server components?
Yes; the skill notes that the scratch page must be client code in Next so fixture data is not lost across the server boundary.
More guides from Jakub Krehel's Interface Skills
/afkLet the agent improve your project while you are awaySpends hours improving a project while you are away, committing evidence-backed changes to a local branch and leaving a report.Read the guide →/better-accessibilityFix keyboard, focus, ARIA and form issues against WCAG 2.2Audits keyboard paths, focus rings, ARIA, form labels, live regions, motion and zoom, citing the WCAG 2.2 criterion each failure breaks.Read the guide →/better-interfaceGet one ranked, evidence-backed review of an entire interfaceRuns one review across six UI domains, merges the evidence into a single table capped at 15 findings and ends with a verdict.Read the guide →/interface-reviewCatch the UI regressions a branch or pull request introducesReviews a branch, pull request or working-tree change and tags each UI finding as introduced, regression or pre-existing.Read the guide →
Also in this pack
/better-colorsGenerates hue-stable ramps, maps steps to semantic tokens, converts notations and measures rendered contrast instead of guessing it.↗/better-layoutFixes grouping, alignment, reading order and responsive structure, then tests the layout resized, translated and mirrored for RTL.↗/better-typographySets type scales, line-height, font loading, numeric figures, wrapping and truncation, writing fixes in the project's CSS or Tailwind.↗/better-uiApplies exact polish values for nested radii, optical alignment, layered shadows, image outlines and press and hover motion.↗/better-writingInventories existing strings, then writes labels, errors, empty states and confirmations in the product's established voice.↗/build-designImplements Figma frames or a design image with the project's existing tokens and components and reports every rounding or deviation.↗/explain-interfaceBreaks down how a site or a single visual effect was built from a URL or screenshot, marking each value measured, derived or inferred.↗
Summary by trendhub. The skill itself lives in jakubkrehel/skills/skills/state-machine by Jakub Krehel (MIT); read the full, current text there.