repo-audit

repo-audit is a command for Claude Code from Lee-W/maigo. It costs 110 tokens per session (2,237 once invoked), scanned A, original, MIT.

A read-only repository health check for finding merged branches, open GitHub pull requests, TODO or FIXME comments, and possible issues among the repository's skills.

In plain words
What is it for?
Use it to inspect repository leftovers, identify code backlogs, check for unused or overlapping skills, and list open pull requests when the GitHub CLI is available.
Why use it?
It gathers scattered maintenance information in one report without deleting branches, closing pull requests, or changing code.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Codex.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the maigo plugin — 24 skills, 15 commands, 5 agents, 5 hooks shipped together

Good fit Use it to inspect repository leftovers, identify code backlogs, check for unused or overlapping skills, and list open pull requests when the GitHub CLI is available.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Lee-W/maigo
Claude Code
/plugin install maigo

Made for: Claude Code.

Or install maigo, the plugin that ships this one along with the rest of its 24 skills, 15 commands, 5 agents, 5 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/commands/lee-w/maigo/repo-audit/github.svg)](https://agentmods.dev/commands/lee-w/maigo/repo-audit)
Your own site
<a href="https://agentmods.dev/commands/lee-w/maigo/repo-audit"><img src="https://agentmods.dev/badge/commands/lee-w/maigo/repo-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for repo-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/lee-w/maigo/repo-audit"><img src="https://agentmods.dev/badge/commands/lee-w/maigo/repo-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,237 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.00110 $0.02237
Opus 5 $0.00055 $0.01118
Sonnet 5 $0.00022 $0.00447
Haiku 4.5 $0.00011 $0.00224

Measured today against content hash 2a6a86b74d60, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 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.

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.

commands/repo-audit.md · 156 lines

How it starts

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

/maigo:repo-audit

🌙 Doloris:讓我們看清楚,這個 repo 裡還留著什麼。

read-only 內部健診——不刪 branch、不關 PR、不改 code。 只掃描、彙整,把可執行的處置選項交回給你。

使用

/maigo:repo-audit

無參數。對當前所在的 git repo 執行。

五個資料源(全 read-only)

A. 已合併可刪的 branch

git branch --merged main

過濾掉 main 與當前 branch 自身,列出其餘已合入 main 的本地 branch。 → 列出,不刪除。

限制:假設 main-based 工作流(main 為基準 branch)。detached HEAD 或其他分支策略的邊界情況暫不處理。

B. 未關 PR(需要 gh CLI)

gh pr list --state open

列出 open 狀態的 PR。 → 列出,不關閉。

gh 未安裝或未登入:跳過本段,🌑 Mortis 一句告知,A / C / D 照跑,整輪不中斷。

C. 程式碼積壓(TODO / FIXME)

grep -rn -E "TODO|FIXME" agents/ commands/ skills/ scripts/ docs/ hooks/

限定 repo 自有目錄,排除 .venv/node_modules/ 等第三方目錄,避免第三方套件 TODO 噪音。 → 列出,不修改。

D. Skill 健診

orchestrator 讀 skills/*/SKILL.md(不開新 agent),三類檢查:

  1. 孤兒 skill:對每個 skills/<name>/,grep commands/agents/skills/(排除自身)、 hooks/ 找 inbound 引用;零引用 → 孤兒候選。但部分 skill 純靠 frontmatter description 被 model 觸發(repo-detect 型,如 airflow-awarecommitizen-aware),不靠文字引用—— 這類即使零 grep 命中也標註「model-triggered,非引用型」,不當真孤兒。
  2. 重疊候選:讀所有 SKILL.md 的 description + Consumers,用判斷力標出兩個 description 幾乎互相涵蓋、consumer 集合高度重疊的配對 → 列為「考慮合併」候選,附一句理由。 注意:co-load(同一命令常同時載入兩個 skill)不等於重疊——先確認兩者是刻意分工 (如各自負責不同關注點)還是內容真的重複,分工型不列為候選。
  3. 指向失效:grep 各 SKILL.md 內文的 inline code 路徑(skills/...scripts/...${CLAUDE_PLUGIN_ROOT}/...),確認目標存在——markdown link 已由 validate_plugin.pycheck_relative_links 擋,這裡只補它不查的 inline code 指向類。

三類都只列出,不合併、不刪除、不改指向——advisory,判斷與執行留給使用者或後續 /maigo:crystallize

E. 已合併可清的 sibling worktree

git worktree list --porcelain

列出所有 linked worktree(不能用「目錄名長得像 <repo>-*」去猜——ring / ring-codex 是兩個各自獨立的 clone,不是彼此的 worktree,必須用 git worktree list --porcelain 這種權威來源)。對每個 worktree 的 branch 名,比照 A 段既有的 「已合併」判斷方法(squash-merge 場景用 gh search prs 而非 git branch --merged,見 skills/git-workflow/references/worktree-hygiene.md) 判斷是否已合併,命中就把 git worktree remove <path> + git branch -D <branch> 加進處置 checklist。

Read the full file on GitHub · 156 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. today Changed · +22 lines · +11 tokens per session 2a6a86b74d60
  2. 9d ago First seen · 134 lines · 99 tokens per session scan A 3d91640c78b4

Subscribe to this mod's changes

repo-audit is a command published in the GitHub repository Lee-W/maigo (14 stars, last pushed today), licensed MIT. It adds 110 tokens to every session and 2,237 once invoked, about $0.0006 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-30.