Agent skill · Security

agent-loops

Complete operational workflow for implementer agents (Codex, Gemini, etc.) making code changes and writing tests. Drives all work through atomic commits — each loop operates on the smallest complete, reviewable change. Defines the Code Change Loop, Test Writing Loop, Lint Gate, and Issue Filing process with circuit breakers, severity levels, and escalation rules. Requires `committer` for all commits. Includes bundled provider-aware review scripts that keep same-model shell-outs as the last resort, plus a fresh-context Codex fallback for code review and test audit. Use this skill when starting

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill agent-loops-nickcrew-claude-cortex-2 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 40 KB
Bundled scripts: none
Path: skills/agent/agent-loops-nickcrew-claude-cortex-2/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

The skill describes an operational workflow for implementer agents (e.g., Codex, Gemini) to perform code changes and write tests. It enforces atomic commits so each loop operates on the smallest complete, reviewable change. It defines four components: Code Change Loop, Test Writing Loop, Lint Gate, and Issue Filing, each with circuit breakers, severity levels, and escalation rules. Commits must be performed by a committer. It includes bundled provider-aware review scripts for code review and test audit, plus a fresh-context Codex fallback for review and audit. It specifies that all reviews are conducted by an independent reviewer and not by the implementer, with Claude preferred as reviewer when available. It provides a detailed invocation path for the bundled scripts, fallback strategies, and anti-patterns. It requires using the scripts to request reviews and audits, and outlines how to handle artifacts from those reviews. It also details how to structure and scope reviews and audits, how to escalate when reviewers are unavailable, and how to save fallback outputs. It emphasizes that every loop operates on atomic commits and that the unit of work is the minimal, complete change.

How it works

  • Start any implementation task following the defined loops exactly.
  • Ensure reviews are not performed by the implementer; route to an independent reviewer.
  • Use bundled scripts located in the skill directory for code review and test audit:
    • specialist-review.sh for code review
    • test-review-request.sh for test audit
  • Resolve SKILL_DIR at session start and invoke scripts with scoped diffs/files (e.g., specific paths or commits).
  • If automated providers fail, fall back to a fresh-context Codex reviewer, providing necessary references and scoped diff; save output as a review artifact.
  • For tests, run test-review-request.sh with appropriate flags to audit modules, changes, and tests, then treat the produced gap report as the authoritative artifact.
  • Each commit must be atomic and follow one of the loops (Code Change, Test Writing, or Lint Gate) and then be reviewed.
  • The reviewer selection order is: bundled script first, then fresh-context Codex; escalate if unavailable.
  • Maintain strict workflow around artifact validation and non-self-review rules.

When to use it

  • When starting any implementation task requiring code changes and test writing.
  • When code changes are ready for review and tests need auditing.
  • During remediation cycles and issue filing based on review findings.

What it can touch

  • The skill references and invokes the following scripts within the skill directory:
    • $SKILL_DIR/scripts/specialist-review.sh
    • $SKILL_DIR/scripts/test-review-request.sh
  • Commands and file paths are quoted exactly as shown in the skill: e.g., "specialist-review.sh" and "test-review-request.sh". Artifacts are saved under standard locations like .agents/reviews/.

Caveats

  • Reviews must be performed by an independent reviewer; the implementer must not review their own work.
  • If Claude/Gemini/Codex providers fail, a fresh-context Codex fallback must be used.
  • The artifact shape must be validated by the provider output; invalid outputs are rejected and triggers next fallback.
  • The process emphasizes atomic commits and explicitly discourages non-atomic grouping of changes.
From the SKILL.md

# Agent Workflow Loops This skill defines the operational loops that implementer agents follow when making code changes and writing tests. Each loop has explicit entry criteria, exit criteria, and escalation rules. If you are an agent, follow these loops exactly. **You do not review your own work.** All reviews are performed by an independent reviewer. Prefer Claude via the bundled scripts. If Claude is unavailable, use a different model before asking your own model family to review. Same-model shell-outs are the last resort. You never grade your own homework. **Bundled references:** - `references/testing-standards.md` — Test quality standards (how to write tests) - `references/audit-workflow.md` — Test gap discovery (how to find what's missing) - `references/perspective-catalog.md` — Review perspective selection (used by primary and fallback code review) - `references/review-prompt.md` — Code review prompt template for fallback reviewers - `references/audit-prompt.md` — Test audit prompt template for fallback reviewers **Bundled scripts:** - `$SKILL_DIR/scripts/specialist-review.sh` — Provider-aware Claude/Gemini/Codex CLI path for code review - `$SKILL_DIR/scripts/test-review-req

What's inside
Steps it walks through
  1. Locate Scripts
  2. Architecture: Who Does What
  3. Reviewer Selection Order
  4. Skill Invocation Reference
  5. Pre-Review: Impact Analysis with Codanna (Optional)
  6. specialist-review — Request Code Review
  7. test-review-request — Request Test Audit
  8. Atomic Commits: The Unit of Work
  9. What Makes a Commit Atomic
  10. How This Drives the Loops
  11. Commit Rules
  12. When to Split
  13. Overview
  14. Loop 1: Code Change Loop
Ships with 1 file
  • metadata.json
Commands it runs
What calls the functions you changed?
codanna mcp find_callers process_request --watch
codanna mcp analyze_impact DatabaseConnection --watch --json
Feed impact data into review context
Review only the files you changed (RECOMMENDED)
Review changes since a specific ref, scoped to a directory
Review all changes vs last commit (use sparingly in monorepos)
Pipe in a pre-filtered diff
git diff HEAD~3..HEAD -- src/ | "$SKILL_DIR/scripts/specialist-review.sh" -
Review a diff file
More from claude-skill-registry
All skills →
About this skill
What does the agent-loops skill do?

Complete operational workflow for implementer agents (Codex, Gemini, etc.) making code changes and writing tests. Drives all work through atomic commits — each loop operates on the smallest complete, reviewable change. Defines the Code Change Loop, Test Writing Loop, Lint Gate, and Issue Filing process with circuit breakers, severity levels, and escalation rules. Requires `committer` for all commits. Includes bundled provider-aware review scripts that keep same-model shell-outs as the last resort, plus a fresh-context Codex fallback for code review and test audit. Use this skill when starting

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill agent-loops-nickcrew-claude-cortex-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going