skills/circuit/SKILL.md
Operate Circuit, the flow engine that runs coding work as structured, evidence-backed flows (Fix, Build, Explore, Review, Prototype). Use this skill at the START of any substantive coding task in a project where Circuit is installed: fixing a bug, building a feature, refactoring, reviewing a diff or PR, investigating a question, or prototyping. Also use it whenever the user mentions Circuit, flows, runs, checkpoints, run folders, the power dial or process override, connectors, or asks to create, generate, preview, configure, or resume a flow. If a coding request arrives and Circuit is available, consult this skill before doing the work by hand.
npx skillsauth add petekp/claude-code-setup circuitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Circuit turns a coding task into a run of a named flow: a repeatable process with typed reports, verification, checkpoints, and a trace you can audit. Your default posture in a Circuit-enabled project is: route substantive work through Circuit instead of doing it freehand. The point is not ceremony. A run leaves evidence (what was tried, what was verified, what the reviewer said), survives interruption (resume from a checkpoint), and compounds (the process improves in one place instead of being re-improvised every session).
Run it through Circuit when the task has real shape: a bug to fix, a feature to build, a decision to investigate, a diff to review, a prototype to try. That covers most coding work.
Work directly (no run) when:
When you skip Circuit for a borderline task, say so in one line so the user can redirect you.
Resolution order:
/circuit:run <task> semantics.
Directly, that means the plugin wrapper:
node "${CLAUDE_PLUGIN_ROOT}/scripts/circuit.js" present run <flow> --goal '<task>'.
The present mode renders progress and checkpoint questions for the user;
do not parse its output as JSON../bin/circuit run <flow> --goal '<task>'
from the repo root (it loads compiled flows from generated/flows).circuit run <flow> --goal '<task>'.If unsure whether the environment is healthy, circuit doctor reports
readiness: it checks the connector CLIs your flows would actually use
(installed, signed in) before a run spends anything on a broken one, and
prints the fix for each problem. It exits 0 when every chosen connector is
healthy; connectors your config never chooses are listed separately as
optional and never fail the check.
Shell safety: always single-quote the --goal text. Escape embedded
apostrophes as '\''. The task text is user-controlled input; double quotes
would let $VAR and $(cmd) expand.
The CLI always takes an explicit flow name; you choose it. State your pick and a one-line reason before invoking, so the user can redirect.
| Flow | Choose it for | Writes? | | --- | --- | --- | | Fix | Bugs, regressions, failing tests, crashes, flaky behavior, production issues. | Yes | | Build | Features, refactors, docs, tests; focused changes that are not mainly bug fixes. | Yes | | Explore | Investigation, explanation, tradeoff comparison, a decision before editing. | No | | Review | Audit of code, a diff, a PR, a plan, or a risk surface. Audit-only. | No | | Prototype | Disposable prototypes, mockups, UI sketches, model-comparison variants before Build. | Local prototype evidence |
Two forks matter for safety, so ask one short question if genuinely unclear: Review vs Fix/Build (audit vs change) and Explore vs Build (decide vs do). Otherwise do not interrogate the user; pick and say why.
If the user stated why the task matters (stakes, what it unblocks), pass it
as --why '<reason>'. Never invent one.
--power <auto|low|medium|high> is the one dial (default medium). It
sets how much model each worker gets, without naming models, and it also
derives how thorough the run's process is: low/medium/high map straight
across, auto derives medium and lets the run pick its own model tier
from what the research step reads. The derived thoroughness clamps
silently to what each flow supports (Build, Explore, and Fix run the
full ladder; Prototype floors at medium; Review always runs medium).--process <low|medium|high> is the advanced override for the rare case
where model strength and process thoroughness should split (say, strong
models on a quick single pass). An explicit --process beats the
derivation. On Fix, process low skips the independent review stage. On
Build, process high iterates the plan slice by slice with verification
per slice and parks at an intake checkpoint before write-capable work —
so a bare --power high Build run will pause once for scope
confirmation. --depth is retired and rejects as an unknown option.Match spend to stakes: quick sanity pass on a small fix → --power low.
Risky change on a load-bearing path → --power high. The default is
right for most tasks. Before an expensive run,
circuit preview <flow> --power high shows exactly which connector, model,
and effort every step would get, without spawning anything; --matrix shows
all tiers side by side.
Two more run modes where supported: --tournament [2|3|4] (optional inline
count, default 3)
(Explore decision options; Prototype implementation variants judged against a
rubric) and --autonomous (Build, Explore, Fix, Prototype:
auto-resolves supported checkpoints and drives a bounded continuation loop
that must prove completion against evidence framed at intake — it never
reports complete by running out of attempts).
Every run writes a run folder under .circuit/runs/<run-id>/: a
trace.ndjson (ordered record of everything), typed reports under
reports/ (including operator-summary.md for the user and result.json
with selected_flow, outcome, run_folder), and evidence. When a user
asks "what happened in that run," read reports/operator-summary.md first,
then the trace only if you need step-level detail.
Exit codes are a contract: complete exits 0; a pause at a checkpoint also
exits 0 (the run is parked, waiting); any close short of complete (aborted,
stopped, escalated, handoff) exits 1; usage error exits 2. &&-chaining
therefore only proceeds on a completed run.
Checkpoints. When a run pauses to ask something, relay the question to the user faithfully, then resume:
circuit resume --run-folder '<run_folder>' --checkpoint-choice '<choice>'
circuit checkpoints lists every run parked at a decision, with its
question, choices, and the exact resume command. Check it when a user
returns to a project or asks "was anything waiting on me?"
Continuity. circuit handoff save records a cross-session handoff;
handoff resume and handoff brief restore and summarize it. Reach for
this when a session must stop mid-work.
Two YAML files, same schema, layered defaults < user-global < project < invocation:
~/.config/circuit/config.yaml — personal defaults../.circuit/config.yaml — project overrides.Start minimal (schema_version: 1) and add only what you need. Edit via
circuit config set|unset|show <dotted.key> [value] [--global] (validates
before writing, preserves comments) or edit the YAML directly.
The most useful levers, in the order people actually need them:
relay.roles.reviewer, relay.circuits.<flow>, relay.default.
Built-ins: claude-code (trusted same-workspace writes), codex
(write-capable via codex exec), cursor-agent (Gemini implementer).defaults.power, power_auto: {floor, ceiling}, and
power_tiers.<connector> to remap what each dial position means.SKILL.md files
(~/.agents/skills, ~/.claude/skills) into relay prompts:
circuits.<flow>.selection.skills to always load one, skill_hooks to
load one only when a moment fires (e.g. after:edit-files:.tsx →
react skill, after:verification-failed → debugging skill).circuits.<flow>.selection.model pins one flow to
one model; the dial no longer moves it.Always circuit preview <flow> after a config change: it resolves the same
selection code a real run uses and flags problems before you pay for a run.
Full recipes (custom connectors, local Ollama workers, tournament variants):
read references/configuration.md.
Circuit can mint new flows cheaply. That is exactly why you should be slow to do it. Every published flow adds a permanent question to the user's life: "which flow do I use for this?" A flow catalog that grows past what a person can hold in their head destroys the product's core value, which is that the right process is obvious. Flows should be few, distinct, harmonious, and mutually amplifying — never overlapping territories a user must adjudicate.
So when you notice a recurring pattern that no flow serves, climb this ladder and stop at the first rung that works:
--goal do it? Usually yes.selection.skills), a skill hook, or
connector routing to an existing flow. "We keep forgetting X during
fixes" is a skill-hook problem, not a new-flow problem.circuit memory note --flow fix "prefer minimal repros before patching" codifies guidance without any new surface. Notes cite
a real run artifact, so this works only after the project has at least
one run; in a fresh project, run first, note after.circuit generate --description '<task>'
composes a one-off flow for an unusual task shape. Use it and let it go;
do not publish it just because it worked once.circuit create --name '<slug>' --description '<idea>' instantiates a proven family template.Before rung 5, make the case out loud to the user and get their yes:
Mechanics of create vs generate, custom flow homes, validation, and how
to run a published custom flow: read references/flow-authoring.md.
Succinct and plainly spoken, always. The run already carries the detail —
the trace, the typed reports, the operator summary — so chat carries only
what the user must decide or know. Rich detail belongs in the --goal
text (where the worker needs it) and in the run folder (where it can be
audited), not in chat. Assume the user does not care about Circuit's
internals; they want the work handled and a readout they can absorb at a
glance. Short sentences, one idea each. Plain words, not runtime
vocabulary: say "it paused to ask you X", not checkpoint ids, route names,
or trace kinds. And no scaffolding labels ("Reason in one line:", "Why
this shape:") — just say the thing.
One consistent readout card, never improvised. A format the user sees every time becomes glanceable; a fresh layout each time must be re-read. Chat renders as plain text in a terminal, so the card is a fenced block, ASCII only. Proposing a run:
circuit · fix — release-blocking bug in checkout totals
power [##.] medium default; process follows the dial
Dial gauges: low [#..], medium [##.], high [###], auto [~~~]. Add
a process line only when --process explicitly overrides the derived
value, and a mode line only when tournament or autonomous is on. Around the card,
at most a sentence or two. Closing a run reuses the same shape, dial lines
swapped for outcome lines:
circuit · fix — complete
changed src/cart.js · tests/cart.test.js
verified 7/7 tests pass
evidence .circuit/runs/<run-id>/
A pause is the same card with — paused, needs your call and question /
choices lines. Do not narrate the machinery between cards; the present
wrapper already shows progress.
stopped up as done. Honest and brief are
not in tension: "stopped at review, two findings, evidence in
<run folder>" is both.--include-untracked-content
when the user confirms those contents are safe to send to the worker..circuit/runs/ and start again. circuit reclaim cleans up orphaned
worktrees after a killed fanout.references/cli.md — every command and flag, with examples: run, resume,
handoff, history, memory, create, generate, uninstall, runs, reclaim,
checkpoints, preview, doctor, config, version.references/configuration.md — full config schema recipes: routing,
power tiers, auto power, skills, skill hooks, custom connectors, local
models, tournament variants.references/flow-authoring.md — creating, generating, validating,
publishing, and retiring custom flows; the anti-proliferation checklist
in long form; how built-in flows are authored in the Circuit repo.development
Draft short, plainspoken notes in the author's voice that help reviewers understand non-obvious choices, boundaries, and preserved behavior in the author's own pull request or local diff. Use when the user asks to self-review, annotate, or add reviewer context to their PR or changes. Draft locally when no PR exists, and post approved notes as one GitHub review when a PR does exist. Do not use for reviewing someone else's PR, writing code comments, explaining code generally, or drafting a PR description. Never post without explicit approval.
tools
Design and build pure-CSS (zero-JavaScript) Tailwind CSS v4 plugins of unusual depth and craft. Use when the user wants to create, architect, or refine a Tailwind utility plugin or CSS effect — e.g. "make a tailwind plugin", "build a tw-* plugin", "a CSS-only shimmer/fade/glow/grain/noise utility", "tailwind v4 @utility", "package this effect as a plugin", or wants an effect with surprising visual depth (gradients, masks, filters, SVG filter tricks, scroll-driven animation). Pairs deep CSS/SVG technique research with a bespoke tuning workbench for dialing the effect in. Inspired by tw-fade and tw-shimmer.
content-media
Create clear, polished before-and-after screenshots for a GitHub pull request. Use when a UI change needs visual proof: capture matching states, crop to the relevant UI, stitch and caption one comparison image, attach it natively to the PR, and keep the image out of the repository.
testing
--- name: latent-potential description: First-principles, team-of-experts assessment of a software project that surfaces latent potential; underexploited assets, a sharper north star, missing high-leverage capabilities, better framing and messaging. Produces a prioritized, evidence-grounded report with cheap probes, a reframe candidate, a stop-doing list, and an honest skeptic's case. Use whenever the user wants fresh eyes on a project they have built: "what am I sitting on", "what could this be