/chidi-optimal-brain:agent-loopfrom chidi-optimal-brain
Agentic loop discipline. Use when the user wants to loop until done, iterate until tests pass, keep fixing until green, run until verification passes, or mentions red-green-refactor in an iterative fix context.
Ships in chidi-optimal-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Plan → Act → Observe → Verify → Stop
A stateful control cycle for autonomous engineering work. Read .agent/context/loops.md first (fallback: docs/agents/loops.md); if missing, use conservative defaults (iteration cap 5, no push/deploy/CI changes) and suggest /setup-agent-loops.
When exploring the codebase, read CONTEXT.md (if it exists) so changes use the project's domain vocabulary.
When you encounter a knowledge gap (unknown terminology, missing concepts, need to ground a decision), reach for research-from-vault (or run external research first then synthesize into the vault). Goals of the form "research X using the vault until a synthesis note and learning record exist" are valid and encouraged when the vault is configured.
Before the first change:
.agent/context/loops.md (fallback: docs/agents/loops.md) for verification commands, stop rules, and editable scope..agent/context/project-context.md (fallback: docs/agents/project-context.md) when present — project filter over global vault knowledge./tdd skill.One bounded change per iteration — a vertical slice, not a bulk rewrite.
.agent/context/loops.md (fallback: docs/agents/loops.md).Run the after-each-change verifier(s) from .agent/context/loops.md (fallback: docs/agents/loops.md).
Paste or summarize the relevant output — pass/fail must be unambiguous from exit code and output.
two-axis-review skill in gate mode; a FAIL verdict is a failing verifier. Then stop with success brief.Apply stop rules from STOP-RULES.md:
/diagnosing-bugs before blind retries.If continuing: increment iteration count, return to Act with a changed strategy — don't repeat the same fix.
The loop is done when verification passes and a success brief is presented, or any stop rule fires with an explicit brief to the user.
For significant research or engineering goals (multi-step synthesis, architecture changes, non-obvious fixes), emit a decision trace when configured:
Decision Traces/ (see setup-knowledge-vault/templates/decision-trace-template.md).agent/context/decision-traces/ (fallback: docs/agents/decision-traces/) when that folder existsVault: when this finishes, update the vault per the ## Vault write-back block in AGENTS.md/CLAUDE.md, or run /vault-sync.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (chidiokoene/optimal-brain) — no native marketplace selected
npx claudepluginhub p/chidiokoene-mattpocock-skills36 skills in this plugin
/ask-brainRouter for the whole optimal-brain pack: given a task, picks the single best skill or an ordered chain of skills, says why, and says what to skip. Use when the user is unsure which skill to use, asks what to do next or where to start, or describes a task without naming a skill./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./decision-mappingTurn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time. Use when the user has a fuzzy idea with many unknowns, asks what to figure out first, or wants a research-and-decide plan before committing./diagnosing-bugsDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow./domain-modelingBuild and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model./edit-articleEdit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.