Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/chidiokoene-agent-loop
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/agent-loop
What's inside
- Skill name
agent-loop- Description
- 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.
- License
- MIT
- Instructions
- 60 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- STOP-RULES.md
SKILL.md (first lines)
# Agent Loop **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. ## 1. Plan Before the first change: - State the **goal** and **done signal** (what verifier output means success). - Read `.agent/context/loops.md` (fallback: `docs/agents/loops.md`) for verification commands, stop rules, and editable scope. - Read `.agent/context/project-context.md` (fallback: `docs/agents/project-context.md`) when present — project filter over global vault knowledge. - If building features test-first, reach for the `/tdd` skill. - Track **iteration count** from 1. ## 2. Act One **bounded change** per iteration — a vertical slice, not a bulk rewrite. - Stay within editable paths from `.agent/context/loops.md` (fallback: `docs/agents/loops.md`). - Prefer the smallest change that could move verification toward green. ## 3. Observe 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. ## 4. Verify - **Pass** → if the task touched multiple areas, run the **before-stopping** gate (full suite). If that passes, and the change is code, run the `two-axis-review` skill in gate mode; a `FAIL` verdict is a failing verifier. Then stop with success brief. - **Fail** → proceed to step 5. ## 5. Stop or continue Apply stop rules from [STOP-RULES.md](STOP-RULES.md): - Iteration cap hit → stop with brief. - Same failure N times with no meaningful diff → stop with brief. - Next step needs forbidden action → stop with brief. - Fix path unclear after one failed attempt → reach for `/diagnosing-bugs` before blind retries. If continuing: increment iteration count, return to **Act** with a changed strategy — don't repeat the same fix. ## Completion criterion 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: - Research: vault `Decision Traces/` (see `setup-knowledge-vault/templates/decision-trace-template.md`) - Engineering: repo `.agent/context/decision-traces/` (fallback: `docs/agents/decision-traces/`) when that folder exists **Vault:** when this finishes, update the vault per the `## Vault write-back` block in `AGENTS.md`/`CLAUDE.md`, or run `/vault-sync`.
From ChidiOkoene/optimal-brain, MIT.
More from ChidiOkoene/optimal-brain
- 0.604score
optimal-brain-full
ChidiOkoene
Router for the full optimal-brain pack (36 agent skills for engineering, planning, review, agent loops, and an Obsidian knowledge vault).
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
optimal-brain-vault-pack
ChidiOkoene
Router for the optimal-brain vault pack, which gives your coding agent a long-term memory in an Obsidian vault.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
ask-brain
ChidiOkoene
Router 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.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
prototype
ChidiOkoene
Build a throwaway prototype to flesh out a design: a runnable terminal app for state/business-logic questions, or several radically different UI variations…
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
setup-agent-loops
ChidiOkoene
Configure this repo for agent loops (verification commands, stop rules, scope, starter recipes), or design a custom recurring workflow spec.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
setup-optimal-brain
ChidiOkoene
Configure this repo for the engineering skills: issue tracker, triage label vocabulary, and domain doc layout, written to .agent/context/.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
system-architect
ChidiOkoene
Orchestrate solution and system architecture across competence roles (discovery, as-is review, target design, or migration) into a session hub, ADRs, and…
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
two-axis-review
ChidiOkoene
Review a set of code changes against two separate axes, Standards (does it follow this repo's documented rules?) and Spec (does it do what the issue/PRD…
SkillAFreshness: A★ 3Claude Code +9 - 0.599score
implement
ChidiOkoene
Implements a PRD or issue set end to end: plans, writes code test-first, runs the repo's verification commands, and gates on /two-axis-review before committing.
SkillAFreshness: A★ 3Claude Code +9 - 0.584score
diagnosing-bugs
ChidiOkoene
Diagnosis loop for hard bugs and performance regressions.
SkillAFreshness: A★ 3Claude Code +9 - 0.579score
to-issues
ChidiOkoene
Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.
SkillAFreshness: A★ 3Claude Code +9 - 0.579score
to-prd
ChidiOkoene
Turn the current conversation into a PRD and publish it to the project issue tracker, with no interview, just synthesis of what you've already discussed.
SkillAFreshness: A★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 14, 2026 (14 days ago)
- Last release
- Oct 13, 2026 (15 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ChidiOkoene/optimal-brain
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ChidiOkoene
- 0.604score
optimal-brain-full
ChidiOkoene
Router for the full optimal-brain pack (36 agent skills for engineering, planning, review, agent loops, and an Obsidian knowledge vault).
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
optimal-brain-vault-pack
ChidiOkoene
Router for the optimal-brain vault pack, which gives your coding agent a long-term memory in an Obsidian vault.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
ask-brain
ChidiOkoene
Router 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.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
prototype
ChidiOkoene
Build a throwaway prototype to flesh out a design: a runnable terminal app for state/business-logic questions, or several radically different UI variations…
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
setup-agent-loops
ChidiOkoene
Configure this repo for agent loops (verification commands, stop rules, scope, starter recipes), or design a custom recurring workflow spec.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
setup-optimal-brain
ChidiOkoene
Configure this repo for the engineering skills: issue tracker, triage label vocabulary, and domain doc layout, written to .agent/context/.
SkillAFreshness: A★ 3Claude Code +9
Cite this page
agent-loop skill. Agent Mart. https://agentmart.dev/skills/chidiokoene-agent-loop (last updated 2026-10-24)