day8/re-frame2/skills/re-frame2/SKILL.md
re-frame2
Writes re-frame2 ClojureScript application code — events, subscriptions, effects, flows, frames, state machines (reg-machine, parallel regions, tags, spawn), schemas, stories, routing, tests, and the canonical patterns (RemoteData, Resources, Forms, Boot, WebSocket, NineStates, ManagedHTTP, AsyncEffect, LongRunningWork, StaleDetection, ReusableComponents, StatefulComponents, FormAction, SSR-Loaders). Use whenever the user mentions re-frame2, reg-event, reg-sub, reg-fx, reg-cofx, reg-flow, reg-vi
- Source repository stars
- 44
- Declared platforms
- 0
- Static risk flags
- 1
- Last source update
- 2026-08-05
- Source checked
- 2026-08-05
Decision brief
What it does—and where it fits
Authors re-frame2 ClojureScript application code. Router skill: this file carries decision shortcuts; depth lives one level deep in references/, patterns/, and decision-trees/.
Not for
- Full skill-disambiguation matrix lives at skills/README.md §Skill routing — single source. In brief: not for live-runtime inspection, greenfield bootstrap, v1→v2 migration, porting existing Reagent views onto Freehand (…
- This skill's view surface is the adapters — Reagent, reagent-slim, UIx, Helix. Freehand is re-frame2's re-frame-native peer view layer; references/fundamentals/views.md §Freehand carries what it changes and where its co…
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/day8/re-frame2 --skill "skills/re-frame2"Inspect the Agent Skill "re-frame2" from https://github.com/day8/re-frame2/blob/500f455ab81740840a38338633554e4f8ffd7821/skills/re-frame2/SKILL.md at commit 500f455ab81740840a38338633554e4f8ffd7821. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Authoring workflow (every task)
1. Identify the surface — event? sub? fx? cofx? view? machine? route? story? schema? 2. Load at most two leaves (the relevant fundamentals or pattern; a second only if the task spans two surfaces). 3. Match the canonical declaration in the leaf; do not re-derive. 4. Pick the fea…
Identify the surface — event? sub? fx? cofx? view? machine? route? story? schema?Load at most two leaves (the relevant fundamentals or pattern; a second only if the task spans two surfaces).Match the canonical declaration in the leaf; do not re-derive. - 02
When to load
.cljs / .cljc authoring of: event handlers, subscriptions, flows, state machines, views, schemas, routes, stories, or the canonical patterns. References to reg-event, reg-sub, reg-fx, reg-flow, reg-machine, dispatch, subscribe, app-db, flows, frames, regions, tags, or pattern na…
.cljs / .cljc authoring of: event handlers, subscriptions, flows, state machines, views, schemas, routes, stories, or the canonical patterns. References to reg-event, reg-sub, reg-fx, reg-flow, reg-machine, dispatch, su… - 03
When NOT to use
Full skill-disambiguation matrix lives at skills/README.md §Skill routing — single source. In brief: not for live-runtime inspection, greenfield bootstrap, v1→v2 migration, porting existing Reagent views onto Freehand (use reagent-migration), view code on the re-frame.ui donor s…
Full skill-disambiguation matrix lives at skills/README.md §Skill routing — single source. In brief: not for live-runtime inspection, greenfield bootstrap, v1→v2 migration, porting existing Reagent views onto Freehand (…This skill's view surface is the adapters — Reagent, reagent-slim, UIx, Helix. Freehand is re-frame2's re-frame-native peer view layer; references/fundamentals/views.md §Freehand carries what it changes and where its co… - 04
Cardinal rules
1. Implementation is ground truth. When spec and implementation/ disagree, the implementation wins. Recipes here are verified against implementation/ and examples/. 2. Recipes over explanations. Use the canonical shape; do not re-derive from first principles. 3. Distinguish orch…
Implementation is ground truth. When spec and implementation/ disagree, the implementation wins. Recipes here are verified against implementation/ and examples/.Recipes over explanations. Use the canonical shape; do not re-derive from first principles.Distinguish orchestration from state. State machines for modes (legal-transitions-depend-on-current-state); slices for fields. See decision-trees/slice-or-machine.md. Standing mental model for machines: think in xstate,… - 05
Decision shortcuts
Slice vs machine vs region — decision-trees/slice-or-machine.md. Tell: if the prompt names transitions or modes, machine. If it names fields, flags, or counters, slice. A sub-concern of a larger feature's lifecycle is a region inside that feature's machine, not its own top-level…
Slice vs machine vs region — decision-trees/slice-or-machine.md. Tell: if the prompt names transitions or modes, machine. If it names fields, flags, or counters, slice. A sub-concern of a larger feature's lifecycle is a…Which pattern fits — decision-trees/pick-a-pattern.md. Quick map:Patterns compose; a screen can use Forms on submit, RemoteData for the request, and WebSocket for a push.
Permission review
Static risk signals and limitations
Network access
The documentation includes network, browsing, or remote request actions.
| HTTP request with request/response lifecycle | `patterns/remote-data.md` |Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 93/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 44 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- day8/re-frame2
- Skill path
- skills/re-frame2/SKILL.md
- Commit
- 500f455ab81740840a38338633554e4f8ffd7821
- License
- MIT
- Collected
- 2026-08-05
- Default branch
- main
View the original SKILL.md
re-frame2
Authors re-frame2 ClojureScript application code. Router skill: this file carries decision shortcuts; depth lives one level deep in references/, patterns/, and decision-trees/.
When to load
.cljs / .cljc authoring of: event handlers, subscriptions, flows, state machines, views, schemas, routes, stories, or the canonical patterns. References to reg-event, reg-sub, reg-fx, reg-flow, reg-machine, dispatch, subscribe, app-db, flows, frames, regions, tags, or pattern names are sufficient triggers — re-frame2 need not be named.
When NOT to use
Full skill-disambiguation matrix lives at skills/README.md §Skill routing — single source. In brief: not for live-runtime inspection, greenfield bootstrap, v1→v2 migration, porting existing Reagent views onto Freehand (use reagent-migration), view code on the re-frame.ui donor substrate (defview and friends — use re-frame2-ui), porting re-frame2 itself, or spec / API / EP rationale reading.
This skill's view surface is the adapters — Reagent, reagent-slim, UIx, Helix. Freehand is re-frame2's re-frame-native peer view layer; references/fundamentals/views.md §Freehand carries what it changes and where its contract lives. Everything upstream of the view is the same either way, so the rest of this skill applies unchanged.
Cardinal rules
- Implementation is ground truth. When spec and
implementation/**disagree, the implementation wins. Recipes here are verified againstimplementation/**andexamples/**. - Recipes over explanations. Use the canonical shape; do not re-derive from first principles.
- Distinguish orchestration from state. State machines for modes (legal-transitions-depend-on-current-state); slices for fields. See
decision-trees/slice-or-machine.md. Standing mental model for machines: think in xstate, then map onto re-frame2 — most concepts translate cleanly; a handful re-frame2 renames or omits, and those divergences are the trap. Translation catalogue:references/state-machines/xstate-translation.md; declaration grammar + divergence flags:references/state-machines/reg-machine.md. - Schemas at boundaries. Schema the paths that cross trust boundaries — HTTP payloads, persisted state, snapshot restores — and do not schema-fence every internal key. Which surface you reach for depends on when you need the check to run.
reg-app-schemaand handler:schemaare development-build assertions: a production build registers them but never checks them, so they are tripwires that catch you in dev, not guards on the deployed bundle. Register them anyway — then, where untrusted data must be rejected in production too, give the handler that ingests it a:schemaand reference the:rf.schema/at-boundaryinterceptor, which is the schema surface that survives the production gate. Details and the full behaviour matrix:references/fundamentals/schemas.md. - Match the canonical shape. When a pattern has a worked example or reference declaration, match its shape; don't re-derive. (Repo:
examples/**; consumer app: the relevant pattern/fundamentals leaf plus any reference views your project follows.) - Frames before globals. Talk to a frame via
dispatch/subscribe. Do not import frame internals or bypass to mutate state. :rf/*is reserved. Application keywords pick their own feature prefix (:cart/...,:auth/...).reg-*macros over the runtime-fn forms. Macros capture source coordinates that tools rely on; the functional counterparts — the*-suffixed twins forreg-view*/reg-machine*, or the same name in value position for everything else (reg-event,reg-sub,reg-interceptor, …) — are for advanced/programmatic cases only.- Pillar 4 — assume training knowledge. Teach the re-frame2-specific binding, not FSM theory / HTTP retry / React rendering.
Decision shortcuts
Slice vs machine vs region — decision-trees/slice-or-machine.md. Tell: if the prompt names transitions or modes, machine. If it names fields, flags, or counters, slice. A sub-concern of a larger feature's lifecycle is a region inside that feature's machine, not its own top-level machine.
Which pattern fits — decision-trees/pick-a-pattern.md. Quick map:
| Need | Pattern leaf |
|---|---|
| HTTP request with request/response lifecycle | patterns/remote-data.md |
Cached server-state shared across views, with invalidation, or a reusable session/tenant scope (reg-resource-scope) — read/cache side (TanStack-Query-shaped) | patterns/resources.md |
Workflow after a write succeeds (navigate / toast / fold errors — mutation :reply-to), mixed-scope invalidation, optimistic writes | patterns/resources-mutations.md |
| HTTP with status-aware retries / error projection / batching | patterns/managed-http.md |
| Form input with validation and submit | patterns/forms.md |
| Long-running browser-side work | patterns/long-running-work.md |
| Fire-and-forget side effect, no response | patterns/async-effect.md |
| App boot (configure, hydrate, navigate) | patterns/boot.md |
| Real-time bidirectional connection | patterns/websocket.md |
| View rendering every legal lifecycle state | patterns/nine-states.md |
| Async result arrives after state moved on (epoch suppression idiom) | patterns/stale-detection.md |
| Parameterised widget rendered N times (entity-id idiom) | patterns/reusable-components.md |
| View wrapping a stateful JS library (chart / map / editor) | patterns/stateful-components.md |
| SSR form POST handling (progressive enhancement) | patterns/form-action.md |
| SSR parallel data fetch before render (fan-out) | patterns/ssr-loaders.md |
Patterns compose; a screen can use Forms on submit, RemoteData for the request, and WebSocket for a push.
Cross-cutting concerns — orthogonal to pattern choice; load alongside the primary leaf when the trigger fires.
| Concern | Cross-cutting leaf |
|---|---|
Declaring data sensitive / large; the owner-classifies / framework-projects / sinks-consume egress model + six :rf.egress/* profiles | references/cross-cutting/privacy-and-elision.md |
Datadog / Sentry / Honeycomb production listeners that survive goog.DEBUG=false | references/cross-cutting/production-observability.md |
Head/meta (reg-head / render-head / active-head); extending the shipped :rf/hydrate handler (re-register only to change merge policy) | references/cross-cutting/ssr-authoring.md |
Path overlap / valid segments / [:rf.path/param …] templates; canonical EDN identity for a resource key / route param / work id | references/cross-cutting/path-and-identity.md |
Testing your views
"Does the screen show the right thing? Does the button dispatch the right event?" — use the hiccup-walk pattern (walk the view-fn's returned hiccup by :data-testid, not a browser-mount; state-only assertions miss the view-broken and wrong-frame-dispatch bugs the walk catches). Recipe: references/cross-cutting/testing.md.
Where the depth lives
Load at most two leaves per task. If a task seems to need three, it likely spans patterns and should be broken up.
Fundamentals — references/fundamentals/: events.md, fx.md, cofx.md (value-returning reg-cofx, :rf.cofx/requires), subs.md, views.md (reg-view, injected dispatch/subscribe, reg-view*), flows.md (reg-flow, flow-vs-sub), schemas.md, frames.md, images.md (rf/image, image-order composition, frame-isolation story — EP-0023), event-state-cycle.md, project-structure.md.
State machines — references/state-machines/: reg-machine.md (declaration, guards/actions, divergence flags), xstate-translation.md (the full xstate→re-frame2 catalogue), machine-schemas.md (:schemas :data/:output + snapshot redaction), regions.md (parallel), tags.md, spawn.md (child machines), history.md (:type :history re-entry), cancellation.md. Standing model across all: think in xstate, then map onto re-frame2.
Tooling — references/tooling/: stories.md, routing.md, story-recorder.md (record canvas interactions as a :script), story-mcp-loop.md (story-mcp author/refine side; run-loop handoff to re-frame2-pair), xray.md (devtools panel mount + launch modes). Standing model for Story: think in Storybook JS, then map onto Story (stories.md has the concept map).
Cross-cutting — references/cross-cutting/: testing.md (with-frame, dispatch-sync, compute-sub, view-tree walk), api-cheatsheet.md (one-page reg-* signature index), privacy-and-elision.md (path-based fail-open egress: owner classifies / framework projects / sinks consume; the six :rf.egress/* profiles), production-observability.md (rf/register-listener! on :events/:errors), ssr-authoring.md (reg-head/render-head/active-head + the :rf.ssr/check-* fxs), path-and-identity.md (the :rf/path algebra + canonical EDN identity).
Patterns — patterns/: one leaf per canonical pattern (see table above). Each opens with load triggers, the canonical mini-declaration, the features it uses, trade-offs, and the worked-example link. Pattern → example app: examples-map.md.
Decision trees — decision-trees/: pick-a-pattern.md, slice-or-machine.md.
Authoring workflow (every task)
- Identify the surface — event? sub? fx? cofx? view? machine? route? story? schema?
- Load at most two leaves (the relevant fundamentals or pattern; a second only if the task spans two surfaces).
- Match the canonical declaration in the leaf; do not re-derive.
- Pick the feature prefix (
:cart/...,:auth/...) — never:rf/*. - Cross-check a worked example or reference view that uses the same shape when one exists (in the re-frame2 repo, that's
examples/**; in a consumer app, your project's own reference views). - Schema only at boundaries.
- Use
reg-*macros unless the macro shape can't express the need. - Cut-test comments: would I write this same comment in a React / Vue / Elm app? If yes, cut it.
Done checklist
- Ids do not collide (
grepthe codebase for the chosen id). - Schema registered for any new boundary.
- No
:rf.*application keywords. - Cut-test passed on comments.
- Shape matches the canonical declaration in the leaf.
- If a worked example exists, the new code's shape matches it.
- Hand off the gate to run — name the nearest relevant one concretely (e.g. "run
clojure -M:testinsrc/app/"). This skill writes the code; the author runs the tests, the compiler, the app.
How re-frame2 differs from re-frame v1
Do not re-derive v1 mappings from training memory. Migration workflow + breaking-change rule index: skills/re-frame-migration/; authoritative rule corpus: migration/from-re-frame-v1/README.md.
Background reading (optional)
For "why does it work this way?" or a feature whose shape isn't obvious. All route via SKILL-REDIRECT.md at the repo root: Principles, Conventions, Construction prompts, EP design rationale.
re-frame2 (v2 line). v1: re-frame. Full skill-disambiguation matrix: skills/README.md §Skill routing — single source. Deep-dive links route through SKILL-REDIRECT.md.
Alternatives
Compare before choosing
coreyhaines31/marketingskills
ab-testing
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
JasonColapietro/suede-creator-skills
suede-ab-testing
Suede-owned experimentation discipline for hypotheses, sample sizing, test duration, significance, and repeatable experiment programs. Use when comparing variants, deciding whether a result is reliable, or building an experiment backlog and cadence. NOT FOR: analytics instrumentation (use suede-analytics), post-click conversion diagnosis (use suede-site-alchemy), or writing the variant copy itself (use suede-copy).
narrative-io/narrative-skills-marketplace
design-analysis
Translate a fuzzy analytical question into a rigorous investigation plan. Interrogates the ask, grounds the plan in the available data dictionary, applies analytical best practices, and produces a structured brief of query specifications for a downstream query-writing skill. Plans, does not write SQL. Use when: "why did X drop", "is there a relationship between A and B", "who are our highest-value customers", "what's driving the change in Y", "investigate this trend", "design an analysis for", "
affaan-m/ECC
hexagonal-architecture
Design, implement, and refactor Ports & Adapters systems with clear domain boundaries, dependency inversion, and testable use-case orchestration across TypeScript, Java, Kotlin, and Go services.