repo-audit

repo-audit is a skill for Claude Code, Codex from Megaprompting/torque-loop. It costs 79 tokens per session (570 once invoked), scanned A, original, MIT.

An evidence-based inventory of what a codebase actually offers, including user features, workflows, routes, APIs, configuration, and tests. A route is a web address handled by the application, while an API is an interface used by software to communicate.

In plain words
What is it for?
Use it to map features and their code locations, describe expected behaviour and edge cases, find undocumented screens and workflows, and identify testing gaps.
Why use it?
It replaces assumptions and incomplete documentation with findings tied to the code, while showing what is undocumented or untested.

Skill for Claude CodeCodex

Part of the ratchet plugin — 23 skills, 3 agents, 3 hooks shipped together

Install

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.

agentmods
npx agentmods add skills/megaprompting/torque-loop/repo-audit
Any agent
npx skills add Megaprompting/torque-loop --skill repo-audit
Clone the repo
git clone --depth 1 https://github.com/Megaprompting/torque-loop

Made for: Claude Code, Codex.

Or install ratchet, the plugin that ships this one along with the rest of its 23 skills, 3 agents, 3 hooks.

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 repo-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/megaprompting/torque-loop/repo-audit.svg)](https://agentmods.dev/skills/megaprompting/torque-loop/repo-audit)
Your own site
<a href="https://agentmods.dev/skills/megaprompting/torque-loop/repo-audit"><img src="https://agentmods.dev/badge/skills/megaprompting/torque-loop/repo-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 570 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00079 $0.00570
Opus 5 $0.00039 $0.00285
Sonnet 5 $0.00016 $0.00114
Haiku 4.5 $0.00008 $0.00057

Measured 4d ago against content hash 6062c45e0db4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

repo-audit 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 4d 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.

skills/repo-audit/SKILL.md · 61 lines

How it starts

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

/ratchet:repo-audit — evidence-based feature discovery

A codebase is a claim about what it does. This command verifies the claim by evidence. It discovers user-facing features from the code itself — not from the README, not from memory — and marks the gaps between what exists and what is tested.

Step 0 — Load state and ground truth

ratchet snapshot repo

Then read for real: routes, entrypoints, handlers, UI components, API definitions, config, and existing tests. Use Grep/Glob to find route tables, exported handlers, and test files. Do not infer a feature you cannot point to in code.

Procedure

For each user-facing feature discovered by evidence, capture:

  • Feature ID and name
  • User story — who does what, and why
  • Evidence in code — file:line where it lives
  • Expected behavior — what it should do
  • Edge cases — the inputs that stress it
  • Test cases — what would verify it
  • Dependencies — what it relies on
  • Known assumptions — what it takes for granted
  • Current risk level — critical / high / medium / low

Then identify the gaps:

  1. Screens / routes / workflows not yet documented.
  2. APIs or state transitions that need tests.
  3. The highest-risk feature — most user-facing × least tested.
  4. The first test suite to write.
  5. The smallest fix likely to improve user trust.

Rules

  • Do not declare coverage complete unless every route, screen, workflow, and API interaction has evidence. Missing evidence is a finding, not a rounding error.
  • A feature with no test is a defect waiting to happen — record it.

Output contract

Return the feature inventory as a table, then the five gap findings. Then serialize:

ratchet ledger create
ratchet ledger update features '{"name":"...","area":"...","routes":"...","status":"discovered"}'
ratchet defect add '{"severity":"high","summary":"<highest-risk feature> has no test coverage"}'

Next: /ratchet:qa-ledger to formalize the canonical ledger, then /ratchet:verify.

Read the full file on GitHub · 61 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. 4d ago First seen · 61 lines · 79 tokens per session scan A 6062c45e0db4

Subscribe to this mod's changes

repo-audit is a skill published in the GitHub repository Megaprompting/torque-loop (5 stars, last pushed 1mo ago), licensed MIT. It adds 79 tokens to every session and 570 once invoked, about $0.0004 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

new-plugin

Factory line for adding a new HAR verification plugin (like playwright or rocketsim) for any framework — research the framework docs, build the template under src/templates/plugins/, register it everywhere, validate on a real repository, and open a PR. Use when asked to add/create a plugin, plugin template, or…

os-factory/har · 89 tokens

factory-line

Factory line for executing one station of a declared multi-station program — read the installed line bundle (har line status), plan parallel work into isolated HAR slots, run the cumulative gate with har line gate, and hand off for human review. Use when asked to "run a factory line", "run the next station", "execute…

os-factory/har · 101 tokens

v1-milestone

Factory line for executing one milestone of the HAR v1.0.0 refactor (epic os-factory/har#225) — plan the wave of parallel subagents, implement each issue in its own HAR slot, ship stacked PRs, run the fixture-e2e milestone gate, and hand off for review. Use when asked to "run the next v1 milestone", "work on v1.0.0"…

os-factory/har · 110 tokens

ctx

Codebase intelligence and evidence-driven governance with the indexed ctx CLI. Use when exploring an unfamiliar repository, locating symbols or callers, checking for existing implementations, estimating change impact, enforcing architecture rules, scoring a branch, finding hotspots or duplication, or analyzing…

agentis-tools/ctx · 60 tokens

ctx

Codebase intelligence and evidence-driven governance with the indexed ctx CLI. Use when exploring an unfamiliar repository, locating symbols or callers, checking for existing implementations, estimating change impact, enforcing architecture rules, scoring a branch, finding hotspots or duplication, or analyzing…

agentis-tools/ctx · 60 tokens

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens