codex-break-loop

codex-break-loop is a skill for Claude Code, Codex from yinanli1917-cloud/searching-apple-notes. It costs 95 tokens per session (782 once invoked), scanned A, original, MIT.

A post-fix review procedure for bugs and other non-trivial fixes. It classifies the underlying cause and records a lasting prevention rule in project specifications.

In plain words
What is it for?
Use it after fixing a bug, debugging a failure, or investigating why a previous fix did not work.
Why use it?
It helps prevent the same failure from returning by examining missing requirements, broken contracts, change propagation, test gaps, or unstated assumptions.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also installed under .codex/. Also seen: mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/codex_harness.py record-session --title "Break-loop: <bug title>" --summary "Root cause: <category>. Prevention written to <spec-file>.".

Part of the searching-apple-notes plugin — 9 skills shipped together

Good fit Use it after fixing a bug, debugging a failure, or investigating why…

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/yinanli1917-cloud/searching-apple-notes
agentmods
npx agentmods add skills/yinanli1917-cloud/searching-apple-notes/codex-break-loop

Made for: Claude Code, Codex.

Or install searching-apple-notes, the plugin that ships this one along with the rest of its 9 skills.

Wrote 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.

agentmods badge for codex-break-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/yinanli1917-cloud/searching-apple-notes/codex-break-loop.svg)](https://agentmods.dev/skills/yinanli1917-cloud/searching-apple-notes/codex-break-loop)
Your own site
<a href="https://agentmods.dev/skills/yinanli1917-cloud/searching-apple-notes/codex-break-loop"><img src="https://agentmods.dev/badge/skills/yinanli1917-cloud/searching-apple-notes/codex-break-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 782 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00095 $0.00782
Opus 5 $0.00048 $0.00391
Sonnet 5 $0.00019 $0.00156
Haiku 4.5 $0.00010 $0.00078

Measured 6d ago against content hash aab82acdfbdb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

codex-break-loop scanned grade A with 0 findings 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 6d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/skills/codex-break-loop/SKILL.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Break Loop

After fixing a bug, systematically analyze what went wrong and write the lesson into durable specs. The analysis is worthless if it stays in chat.

Process

1. Classify Root Cause

Identify which category this bug falls into:

Category Description Example
Missing Spec No documented rule prevented this "Nothing said the cache must invalidate on logout"
Cross-Layer Contract Two layers disagreed on a contract "View assumed sync, but ViewModel is async"
Change Propagation A change in A broke B because the link was undocumented "Renamed enum case, 3 switch statements missed"
Test Gap The scenario was untested and could have been caught "No test for empty-array edge case"
Implicit Assumption Code assumed something that was never guaranteed "Assumed array was sorted, but API doesn't guarantee order"

2. Analyze Why Prior Approach Failed

If this bug persisted through multiple fix attempts:

  • What did each attempt get wrong?
  • What assumption did they share that was incorrect?
  • What would have caught the real issue on the first try?

3. Identify Prevention Mechanism

What durable change prevents this CLASS of bug (not just this instance)?

  • A spec rule? (Add to .codex/spec/project/)
  • A code contract? (Add assertion/guard)
  • A test pattern? (Add to test suite)
  • An architectural boundary? (Document in spec)

4. Write to Specs

Find the most relevant existing spec file and add the lesson under ## Lessons:

ls .codex/spec/project/

If no existing spec covers this area, create one following the spec-bootstrap format.

The entry format:

### <Short title> (YYYY-MM-DD)

**Root cause**: <category> — <one sentence>
**Prevention**: <what rule/pattern prevents recurrence>
**Evidence**: <git commit hash or file:line reference>

5. Expand to Related Areas

Ask: "Where else in this codebase could the same category of bug exist?"

Read the full file on GitHub · 85 lines

Changes

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.

  1. 6d ago First seen · 85 lines · 95 tokens per session scan A aab82acdfbdb

Subscribe to this mod's changes

codex-break-loop is a skill published in the GitHub repository yinanli1917-cloud/searching-apple-notes (2 stars, last pushed 1mo ago), licensed MIT. It adds 95 tokens to every session and 782 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

notes-snapshot-control-room

This skill should be used when the user asks to "connect Apple Notes Snapshot to a host", "run notesctl mcp", "diagnose why Apple Notes Snapshot failed to attach", "separate AI Diagnose from MCP", or "verify the control-room proof path". It teaches local preflight, MCP wiring, capability boundaries, and proof-first…

xiaojiou176-open/notebackup · 85 tokens

mem0-status

Diagnoses mem0 connectivity, API key validity, and memory read/write functionality. Use when memory operations fail, searches return empty, addmemory errors occur, or to verify the plugin is working correctly.

mem0ai/mem0 · 44 tokens

inspector-workbench

Runs Inspector UI work on the standalone Threads state lab so the agent can see the overlay. Use when a CopilotKit employee asks an agent to fix, polish, add, or debug Inspector UI, chrome, panes, overlay actions, launcher, Home, Threads, Playground, Memory, or any visual behavior in @copilotkit/web-inspector. Don't…

CopilotKit/CopilotKit · 112 tokens

md-audit

Read-only code quality audit — scan the current working directory for common issues (bugs, dead code, security hotspots, missing error handling) and return a prioritised findings report. No files are edited. Use when asked to "audit the code", "quick audit", "find issues", "code scan", or "what's wrong with this…

chaitanyagiri/munder-difflin · 85 tokens

potpie-debug-memory

Use while debugging or troubleshooting failures, flaky tests, incidents, production alerts, CI failures, local dev setup issues, repeated bugs, prior fixes, failed attempts, and verification history.

potpie-ai/potpie · 41 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens