circuit

A skill for running coding work through Circuit, a flow engine that organizes tasks such as fixing, building, exploring, reviewing, and prototyping into recorded steps.

In plain words
What is it for?
Use it for substantive bug fixes, features, investigations, refactoring, reviews, and prototypes when Circuit is installed in the project.
Why use it?
It provides checkpoints, verification, and a trace of what was tried and reviewed, making coding work easier to resume and audit.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/petekp/claude-code-setup/circuit
Any agent
npx skills add petekp/claude-code-setup --skill circuit
Clone the repo
git clone --depth 1 https://github.com/petekp/claude-code-setup

Made for: Claude Code, Codex.

Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,640 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00137 $0.03640
Opus 5 $0.00068 $0.01820
Sonnet 5 $0.00027 $0.00728
Haiku 4.5 $0.00014 $0.00364

Measured 2d ago against content hash 7f629f308b36, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

circuit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/circuit/SKILL.md · 301 lines

How it starts

The opening of the file, as written. The whole thing — 301 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Operating Circuit

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).

When to route through Circuit, and when not to

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:

  • The task is trivial or conversational: a one-line answer, a rename, a question about code you can answer by reading one file.
  • You are already inside a Circuit run as a relayed worker. Never start a nested Circuit run from inside one; do the relayed work directly.
  • The user explicitly asks you to skip Circuit, or is debugging Circuit itself in a way a run would confuse.
  • Circuit is not installed and the user did not ask for it. (Check before assuming; see "Finding the front door.")

When you skip Circuit for a borderline task, say so in one line so the user can redirect you.

Finding the front door

Resolution order:

  1. Claude Code plugin installed: prefer /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.
  2. Working inside a Circuit checkout: ./bin/circuit run <flow> --goal '<task>' from the repo root (it loads compiled flows from generated/flows).
  3. Global CLI: circuit run <flow> --goal '<task>'.

Read the full file on GitHub · 301 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 301 lines · 137 tokens per session scan A 7f629f308b36

Subscribe to this mod's changes

circuit is a skill published in the GitHub repository petekp/claude-code-setup (45 stars, last pushed 26d ago), licensed MIT. It adds 137 tokens to every session and 3,640 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

forget

Delete specific observations from agentmemory after showing them and getting explicit confirmation. Use when the user says "forget this", "delete memory", "remove that note", or wants to scrub specific data for privacy.

rohitg00/agentmemory · 43 tokens

handoff

Resume the most recent agent session for the current working directory, leading with any unanswered question. Use when the user says "where were we", "resume", "handoff", "pick up where I left off", or starts a session with no fresh context.

rohitg00/agentmemory · 55 tokens

lesson

Save a correction or hard-won rule as a confidence-weighted lesson that resurfaces before similar work. Use when the user corrects your approach, says "learn this", "always" or "never do X", or you notice yourself repeating a past mistake.

rohitg00/agentmemory · 55 tokens

memory-discipline

The session loop that makes agentmemory pay off, recall before starting work, save at decision points, learn from corrections. Use when starting a nontrivial task, after settling a decision or debugging a gotcha, or whenever deciding if something belongs in memory.

rohitg00/agentmemory · 56 tokens

remember

Save an insight, decision, or learning to agentmemory's long-term storage with searchable concept tags. Use when the user says "remember this", "save this", "note that", "don't forget", or wants to preserve knowledge for future sessions.

rohitg00/agentmemory · 52 tokens

agentmemory-hooks

The agentmemory plugin hooks that capture observations automatically across the agent session lifecycle. Use when explaining how memory gets captured without manual saves, when debugging missing observations, or when tuning what gets recorded.

rohitg00/agentmemory · 42 tokens