Agent skill · Security

agent-loops

Complete operational workflow for implementer agents (Codex, Gemini, etc.) making code changes and writing tests. Defines the Code Change Loop, Test Writing Loop, and Issue Filing process with circuit breakers, severity levels, and escalation rules. Includes bundled scripts for specialist-review (code review) and test-review-request (test audit) that delegate to Claude CLI. Use this skill when starting any implementation task.

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

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

Facts
Files in the skill folder: 2
SKILL.md size: 22 KB
Bundled scripts: none
Path: skills/agent/agent-loops-nickcrew-claude-cortex/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

Defines the operational loops that implementer agents follow when making code changes and writing tests. It specifies entry criteria, exit criteria, escalation rules, and a circuit-breaker for iterative remediation. It includes bundled scripts for specialist-review and test-review-request to delegate reviews to Claude.

How it works

  • You are the Implementer (Codex or Gemini) who writes code changes per a task spec.
  • After changes, run specialist-review via scripts/specialist-review.sh to send diffs to Claude for a code review. Read the output file the script produces; do not analyze the diff yourself.
  • If Claude returns findings, proceed with REMEDIATE to fix ONLY P0/P1 findings, then run specialist-review again. Repeat up to a maximum of 3 iterations (circuit breaker).
  • For tests, run test-review-request via scripts/test-review-request.sh to obtain a gap report from Claude identifying missing coverage and bad tests. Act on findings by writing tests (prioritizing P0 then P1), verify locally, and re-audit.
  • If shelling out to Claude fails at any point, escalate to the user.
  • The two loops proceed sequentially: CODE CHANGE LOOP followed by TEST WRITING LOOP.

When to use it

  • Triggered by starting implementation work, code change tasks, writing tests after implementation, remediation cycles, or filing issues from review findings.

What it can touch

  • The skill invokes dedicated Claude review tools via:
    • scripts/specialist-review.sh
    • scripts/test-review-request.sh
    • Claude CLI integration via these scripts.

Caveats

  • Critical rule: Codex and Gemini NEVER self-review; reviews are performed by Claude via the dedicated skills.
  • Maximum iterations for code review is 3; beyond that, it must escalate with a summary.
  • If a shell-out to Claude fails, escalate to the user immediately.
  • The review outputs are read from output files produced by the scripts; do not modify or reinterpret the raw diff.
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 Claude via dedicated skills. 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 specialist-review) - `references/review-prompt.md` — Claude review prompt template - `references/audit-prompt.md` — Claude test audit prompt template **Bundled scripts:** - `scripts/specialist-review.sh` — Shell out to Claude CLI for code review - `scripts/test-review-request.sh` — Shell out to Claude CLI for test audit --- ## Architecture: Who Does What | Role | Agent | How | |------|-------|-----| | **Implementer** | Codex or Gemini | Writes code changes and test code | | **Code Reviewer** | Claude | Invoked via `specialist-review`

What's inside
Steps it walks through
  1. Architecture: Who Does What
  2. Skill Invocation Reference
  3. specialist-review — Request Code Review from Claude
  4. test-review-request — Request Test Audit from Claude
  5. Overview
  6. Loop 1: Code Change Loop
  7. Severity Levels
  8. The Loop
  9. Circuit Breaker
  10. Code Review Checklist (Claude's Criteria)
  11. Review Output Format (What Claude Returns)
  12. Remediation Rules
  13. Loop 2: Test Writing Loop
  14. Roles
Ships with 1 file
  • metadata.json
Commands it runs
Review only the files you changed (RECOMMENDED)
scripts/specialist-review.sh --git -- src/parser/ src/auth.rs
Review changes since a specific ref, scoped to a directory
scripts/specialist-review.sh --git origin/main -- claude_ctx_py/
Review all changes vs last commit (use sparingly in monorepos)
scripts/specialist-review.sh --git
Pipe in a pre-filtered diff
git diff HEAD~3..HEAD -- src/ | scripts/specialist-review.sh -
Review a diff file
scripts/specialist-review.sh /path/to/changes.diff
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. Defines the Code Change Loop, Test Writing Loop, and Issue Filing process with circuit breakers, severity levels, and escalation rules. Includes bundled scripts for specialist-review (code review) and test-review-request (test audit) that delegate to Claude CLI. Use this skill when starting any implementation task.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill agent-loops-nickcrew-claude-cortex --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