Skip to content
Agentmart
Submit a tool

audit-rotation

Run ONE quota-gated audit-and-fix cycle against the next subsystem in a rotation.

Skill by nengoxx

IndexedMIT
Write a review

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/nengoxx-audit-rotation

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.

We use your email only for this newsletter. Privacy

About

Run ONE quota-gated audit-and-fix cycle against the next subsystem in a rotation. First drains any open findings left over from previous audits (debug before auditing), then audits a different subsystem each invocation (rotating through all of them, then restarting the cycle), then — if usage quota allows — fixes ALL of that subsystem's findings inline, most important first, committing after each, until the 5-hour quota block reaches a cost cap (~80% of plan). Use this when the user wants an automated, rotating codebase-hardening loop. Designed to be driven by `/loop` (self-paced) so it repeats across cycles.

Use cases: security

No 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. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/audit-rotation

What's inside

Skill name
audit-rotation
Description
Run ONE quota-gated audit-and-fix cycle against the next subsystem in a rotation. First drains any open findings left over from previous audits (debug before auditing), then audits a different subsystem each invocation (rotating through all of them, then restarting the cycle), then — if usage quota allows — fixes ALL of that subsystem's findings inline, most important first, committing after each, until the 5-hour quota block reaches a cost cap (~80% of plan). Use this when the user wants an automated, rotating codebase-hardening loop. Designed to be driven by `/loop` (self-paced) so it repeats across cycles.
License
MIT
Instructions
258 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (3)

  • SKILL.md
  • rotation.py
  • state.json

SKILL.md (first lines)

# Audit Rotation

One invocation = **one cycle**: first fix any findings still open from earlier
audits, then pick the next subsystem in the rotation, audit it once, then fix
**all** of that audit's findings — most important first, one commit each — until
the findings run out or the quota budget is spent. Then advance the rotation.
Driven by `/loop` (self-paced), it walks every subsystem, restarts when the
rotation completes, and pauses fixing whenever quota is spent.

**Audit once, then fix the whole report in one go** — do *not* re-audit between
fixes (no "audit, bugfix, audit, bugfix" churn). All auditing and fixing happens
**directly in this session**.

This skill is **self-contained**. Its only external dependency is the helper
`rotation.py` next to this file (rotation bookkeeping + quota gate); never
hand-roll ccusage parsing or cursor math. All paths below are relative to the
repo root. Run the helper with the repo's `.venv\Scripts\python.exe` or any
Python 3.14+.

## Procedure (one cycle)

### 0. Quota pre-check — bail early if spent

```
python .agents/skills/audit-rotation/rotation.py quota --json
```

- Exit **0** (under cap): proceed to step 1.
- Exit **1** (at/over cap): do **not** debug, audit, or fix this iteration.
  Report that quota is spent, note the `block_end` from the JSON, and end the
  cycle. If driven by `/loop`, schedule the next wake near `block_end` (the
  5-hour block reset), not sooner — auditing also costs quota.
- Exit **2** (unknown — ccusage failed): treat as spent. Skip fixing; you may
  still run the audit if the user wants read-only progress, but default to
  pausing and report the error.

### 1. Debug leftovers FIRST — drain the existing backlog before any new audit

Before auditing anything new, check whether previous audits left findings that
still need debugging:

```
python .agents/skills/audit-rotation/rotation.py findings --json
```

- Empty / exit **1** → no backlog. Go to step 2.
- Non-empty → there is unfinished debugging from a prior audit. **Fix it now,
  before auditing anything new.** Run the **Fix procedure** (below) over these
  findings, most-important-first, re-checking quota before each. If the quota
  gate trips while draining the backlog, **stop the cycle here**: report the
  remaining backlog and do *not* start a new audit (auditing also costs quota).

Only once the backlog is empty (or there was none) do you proceed to a fresh
audit. Track how many backlog findings you fixed.

### 2. Pick the scope

```
python .agents/skills/audit-rotation/rotation.py next --json
```

Gives `{name, paths, note}` for the subsystem to audit now (this does **not**
advance the cursor — that happens in step 5, so an interrupted cycle resumes on
the same scope).

### 3. Audit (read-only)

Audit exactly `paths` per the **Auditing** section below. Write the report to
`docs/audit/<scope>_audit_<YYYYMMDD>.md`, using the scope `name` so filenames
stay stable across cycles (a same-day re-audit gets a `_v2` suffix). Do not fix
anything in this step.

Commit the report on its own:

```
git add docs/audit/<scope>_audit_<date>.md
git commit -m "docs(audit): <scope> rotation audit <date>"
```

If the audit found **no actionable findings** (only N/design notes), skip to
step 5 with `--fixed 0` (plus any backlog fixes from step 1).

### 4. Fix EVERY finding from this audit — most important first, quota-gated

Run the **Fix procedure** (below) over the findings in the report from step 3,
repeating until the findings run out or the quota gate trips. Fix the whole
report in this one cycle, **in-session** — do not re-audit between fixes.

Keep a count of findings fixed this cycle (backlog + this report).

### 5. Advance the rotation

```
python .agents/skills/audit-rotation/rotation.py complete --report docs/audit/<scope>_audit_<date>.md --fixed <N>
```

`<N>` is the number fixed from **this cycle's audit** (step 4). This records
history and advances the cursor (wrapping to the next cycle when the last
subsystem is done). Commit the state bump on its own:

```
git add .agents/skills/audit-rotation/state.json
git commit -m "chore(audit-rotation): advance past <scope> (cycle <c>, fixed <N>)"
```

### 6. Report the cycle

State: how many backlog findings were drained first (and from which reports),
which scope was audited, the report path, severity counts, which findings were
fixed (by ID) with commit hashes, how many were left unfixed and why (quota vs
none-actionable), current quota (`$cost / $cap`), and the next scope.

If driven by `/loop`: when quota is healthy, self-pace a short delay before the
next cycle; when quota tripped mid-cycle, self-pace a long wait until `block_end`.

## Auditing (read-and-reason, do not fix)

Used by step 3. Examine the code as it exists and produce a prioritized,
evidence-backed report of what could break, what is fragile, and what could be

From nengoxx/ctrl-b, MIT.

More from nengoxx/ctrl-b

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jul 2, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from nengoxx

Cite this page

audit-rotation skill. Agent Mart. https://agentmart.dev/skills/nengoxx-audit-rotation (last updated 2026-10-24)