refract v0.1 · beta
Agent-native / AI skills

AI skills

The agent-native surface in practice: refract ships a catalog of AI skills — short, procedural guides that teach a coding agent how to work with the package across the whole workflow: authoring, the token subsystems, adapters, the build, consuming the output, and migration. Install them into your agent with one command, version-locked to the refract you have.

Install

refract skills install writes the skills into your agent's own config. Run it once per project (or --global for your whole machine); re-run update after upgrading refract so the guidance never drifts from your version.

Terminal
refract skills list                          # show the catalog
refract skills install --agent claude          # install for one agent (interactive if --agent omitted)
refract skills install --agent all --optional  # every agent + the opt-in skills
refract skills update                        # re-sync after upgrading refract

Each agent loads skills differently, so the installer adapts the output per target. Claude gets native per-skill files it loads automatically; every other agent gets a small router in its own instructions file that points at on-demand bodies under .refract/skills/ — so a non-Claude agent doesn't load all fifteen every turn. A .refract/skills.lock manifest records what's installed for a clean update.

AgentWhere the skills land
claudeNative per-skill files at .claude/skills/<name>/SKILL.md, loaded automatically.
codex · opencode · genericAn AGENTS.md router + on-demand bodies under .refract/skills/.
github-copilotA .github/copilot-instructions.md router + .refract/skills/ bodies.
cursorA .cursor/rules/refract-skills.mdc router + .refract/skills/ bodies.

Flags mirror the interactive prompts: --agent <a,b|all>, --global / --local (default local, to the project), --only <names> for a subset, and --optional to include the opt-in tier.

The catalog

Fifteen skills, hub-and-spoke: theme-authoring is the hub that orients and routes; the rest are focused spokes that own their vocab once so they never drift. Thirteen are core (installed by default); two are opt-in. Wording is agent-neutral, so they read as plain reference files too.

SkillTierCovers
theme-authoringcoreThe hub — orient, frame a RawTheme, and route to the right spoke.
theme-foundationscoreCross-cutting vocab: breakpoints, containers, responsive, variant/target, modes, states, refs.
recipes-and-compositioncoreRecipes, recipe variants, and composing across subsystems.
colorscorePalettes, OKLCH synthesis, tonal steps, harmony, colour-math.
typographycoreFamilies, weights, the modular type scale.
layoutcoreSpacing / gutters / sizes scales; columns / grids / stacks / containers.
visual-effectscoreEffects, borders, and animation.
adapter-usagecoreChoosing an adapter and its options; installs the chosen package.
build-configcoretheme.config / defineConfig, targets, emit modes, the CLI, dark mode.
consuming-the-outputcoreWiring the emitted output per adapter and framework.
overrides-and-child-themescoretheme.override() — child themes and white-labeling.
theme-scaffoldcoreGenerating a starting theme from one seed colour — refract create and npm create refract-theme.
dtcg-importcoreMigrating in from a DTCG tokens.json.
adapter-scaffoldopt-inWriting your own adapter with defineAdapter.
troubleshootingopt-inMapping a validation error to its fix.
Technical documentation for @theme-registry/refract · all output is compiled client-side by the real library (CSS adapter). The chrome is theme-aware; the render panes carry each preset's own world. · MIT licensed.