re-frame2

Writes re-frame2 ClojureScript application code including events, subscriptions, effects, and state machines.

49|Updated May 7, 2026
One-click install
npx skills add https://github.com/day8/re-frame2 --skill re-frame2-day8
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: re-frame2
Source: https://github.com/day8/re-frame2/tree/main/skills/re-frame2
Command: npx skills add https://github.com/day8/re-frame2 --skill re-frame2-day8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing idiomatic re-frame2 ClojureScript code requires knowing the framework's canonical declarations, decision rules, and 14 canonical patterns; this Skill supplies those recipes so an AI agent produces correct events, subscriptions, effects, frames, state machines, schemas, stories, and routing on the first attempt. ## Core Features & Use Cases - Canonical pattern recipes: Provides one leaf per canonical pattern (RemoteData, Resources, Forms, Boot, WebSocket, NineStates, ManagedHTTP, AsyncEffect, StaleDetection, and more) with load triggers, mini-declarations, and worked-example links. - Decision trees: Routes authoring tasks through pick-a-pattern and slice-or-machine decision trees to choose between slices, regions, and state machines. - Reference depth: Carries fundamentals, state-machine, tooling, and cross-cutting references (testing, privacy/elision, SSR authoring, observability) loaded on demand, at most two leaves per task. - Use Case: Ask the agent to write a reg-machine for a login lifecycle with a parallel region for password-visibility toggling, and it loads the machine grammar and Forms pattern leaves, matches the canonical declaration shape, and runs the project's declared test gate before reporting done. ## Quick Start Ask the agent to write a re-frame2 event handler, subscription, or state machine for your feature, for example by mentioning reg-event, reg-sub, dispatch, or a pattern name like RemoteData in your prompt.

Frequently Asked Questions about re-frame2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a re-frame2 state machine for an HTTP request lifecycle?▼

Use reg-machine with the five canonical states (:idle, :loading, :fetching, :loaded, :error), keyword-referenced actions in the top-level table, and :tags for queryable predicates. The Skill's reg-machine and RemoteData leaves carry the canonical declaration to match.

When should I use a state machine versus an app-db slice in re-frame2?▼

Use a machine when the concern is about modes or legal transitions that depend on current state; use a slice for fields, flags, or counters. The Skill's slice-or-machine decision tree routes this choice, and sub-concerns of a feature lifecycle become parallel regions inside that feature's machine.

Does this Skill handle re-frame v1 to v2 migration?▼

No, v1-to-v2 migration is explicitly out of scope and routed to the dedicated re-frame-migration skill. This Skill is authoring-only for new re-frame2 code; greenfield bootstrap goes to re-frame2-setup and live-app inspection to re-frame2-pair.

Can I use re-frame2 with UIx or Fresco instead of Reagent?▼

Yes, the Skill's view surface covers the Reagent, reagent-slim, and UIx adapters, and everything upstream of the view applies unchanged. Porting existing Reagent views onto Fresco belongs to the separate reagent-migration skill.

Why does my async dispatch from an fx raise no-frame-context?▼

Re-frame2 never synthesises a default frame, so an async reply dispatched without a carried frame raises :rf.error/no-frame-context. Capture :frame from the fx handler's first-arg context map and pass it as {:frame frame-id} on the reply dispatch.