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.
npx agentmods add skills/nickcrew/claude-cortex/agent-loopsnpx skills add NickCrew/Claude-Cortex --skill agent-loopsgit clone --depth 1 https://github.com/NickCrew/Claude-CortexWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nickcrew/claude-cortex/agent-loops)<a href="https://agentmods.dev/skills/nickcrew/claude-cortex/agent-loops"><img src="https://agentmods.dev/badge/skills/nickcrew/claude-cortex/agent-loops.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00125 | $0.12931 |
| Opus 5 | $0.00063 | $0.06466 |
| Sonnet 5 | $0.00025 | $0.02586 |
| Haiku 4.5 | $0.00013 | $0.01293 |
Grade B, and why
agent-loops scanned grade B with 1 finding 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 today.
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.
Enumerates other installed skillsmediumAgent snooping
Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.
SKILL_DIR="$(ls -d ~/.codex/skills/agent-loops 2>/dev/null || ls -d .codex/skills/agent-loops 2>/dev/null)" How it starts
The opening of the file, as written. The whole thing — 1,179 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 reviewersreferences/audit-prompt.md— Test audit prompt template for module-scope (full-contract) auditsreferences/diff-audit-prompt.md— Test audit prompt template for diff-scope (per-commit) audits; used bydiff-test-audit.shwhen--gitis active
Bundled scripts:
$SKILL_DIR/scripts/specialist-review.sh— Provider-aware Claude/Gemini/Codex CLI path for code review$SKILL_DIR/scripts/diff-test-audit.sh— Provider-aware Claude/Gemini/Codex CLI path for test audit
Locate Scripts
The bundled scripts live inside the installed skill directory, not the project tree.
Before invoking any script, resolve SKILL_DIR so paths work regardless of install scope:
SKILL_DIR="$(ls -d ~/.codex/skills/agent-loops 2>/dev/null || ls -d .codex/skills/agent-loops 2>/dev/null)"
All script invocations below use "$SKILL_DIR/scripts/...". Run the snippet above once
at the start of your session and reuse the variable.
Architecture: Who Does What
| Role | Agent | How |
|---|---|---|
| Implementer | Codex or Gemini | Writes code changes and test code |
| Code Reviewer | Claude preferred; non-self scripted fallback next; same-model provider last; fresh-context Codex final fallback | specialist-review keeps same-model shell-outs last; fallback reviewer uses bundled prompts and produces a review artifact |
| Test Auditor | Claude preferred; non-self scripted fallback next; same-model provider last; fresh-context Codex final fallback | diff-test-audit keeps same-model shell-outs last; fallback auditor uses bundled prompts and produces an audit artifact |
| Remediator | Codex or Gemini | Fixes findings from the independent review/audit artifact |
What ships with it
12 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.
- justfile 15 KB
- references/audit-prompt.md 3.5 KB
- references/audit-workflow.md 8.8 KB
- references/diff-audit-prompt.md 5.9 KB
- references/perspective-catalog.md 6.1 KB
- references/review-prompt.md 3.9 KB
- references/testing-standards.md 14 KB
- scripts/diff-test-audit.sh 30 KB runs code
- scripts/review-provider.sh 7.2 KB runs code
- scripts/specialist-review.sh 26 KB runs code
- scripts/synthesize-review-artifacts.py 6.3 KB runs code
- scripts/validate-review-contract.py 4.6 KB runs code
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.
- today First seen · 1,179 lines · 125 tokens per session scan B 6bc047f1af7b
agent-loops is a skill published in the GitHub repository NickCrew/Claude-Cortex (37 stars, last pushed 2mo ago), licensed MIT. It adds 125 tokens to every session and 12,931 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (enumerates other installed skills). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
prd
Generates a Product Requirements Document from a natural language app description. Asks clarifying questions, researches similar apps, defines scope, stack, architecture, and produces a structured PRD that Archon can decompose into a campaign.
deslop
The optimization pass, defined - delete before you add, one smell class per pass, behaviour pinned by a test that ran BEFORE the edit. Lints a SKILL.md and prose by the same instinct. Use for the per-story optimization pass or when code has grown noisy without growing capable.
design-tokens
Generate a cohesive color-token system from ONE OKLCH brand hue — primary/secondary/background/foreground/muted/border with semantic light + dark, emitted as a Tailwind v4 @theme block or a CSS-variables fallback. Use when starting a design system, defining brand colors, setting up theming/dark-mode, or replacing…
ph-tdd
(PH) Use after an approved delivery boundary to define a focused failing behavior test before implementation.
writing-plans
Use after design approval to create a dated executable workflow file with bite-sized tasks, exact file paths, and loop/gate definitions.
inno-pipeline-planner
Guides the user through an interactive conversation to define their research project, then generates researchbrief.json and tasks.json.