Skip to content

re-frame2 (authoring)

Writes re-frame2 ClojureScript application code — events, subscriptions, effects, frames, state machines, schemas, stories, routing, and the canonical patterns.

What it does

The re-frame2 skill is the authoring skill for re-frame2: it teaches an agent the re-frame2-specific binding for the ideas the user already knows (events, FSMs, HTTP retry, optimistic updates). It carries the cardinal rules — implementation-is-ground-truth, recipes-over-explanations, frames-before-globals, reserved :rf/* namespaces, reg-* macros over register-* functions — and a one-level-deep map of reference and pattern leaves. The agent loads at most two leaves per task and matches the canonical declaration verbatim rather than deriving a shape from first principles.

Worked examples in examples/reagent/<x>/ are treated as canonical. Pattern leaves (patterns/remote-data.md, patterns/forms.md, patterns/managed-http.md, ...) name the features the pattern uses, give the canonical mini-declaration, and link to the worked example.

When to reach for it

Load this skill when the prompt is about writing or editing re-frame2 application source.cljs / .cljc files. The user does not have to name re-frame2; any of these are sufficient triggers:

  • References to reg-event-db, reg-event-fx, reg-event-ctx, reg-sub, reg-fx, reg-cofx, reg-view, reg-machine, reg-route, reg-story, reg-app-schema.
  • Mentions of dispatch, subscribe, app-db, frames, regions, tags, the nine UI states.
  • Pattern names: RemoteData, Forms, Boot, WebSocket, NineStates, ManagedHTTP, AsyncEffect, LongRunningWork, StaleDetection.
  • "Write a test for a re-frame2 handler / sub / machine."

Do not use this skill for:

Kickoff

The skill auto-triggers on any of the surfaces above. No paste-ready prompt is needed for routine authoring tasks — open Claude Code in a project that has the skill installed, ask for what you want in your own words, and the skill loads itself.

For force-loading from a slash-command launcher:

/skill re-frame2

For greenfield-then-author, walk the re-frame2-setup skill first; when the counter mounts, switch to this one.

Where the skill lives