code-auditor

An independent pre-merge code reviewer for a Git change, pull request, or named files.

In plain words
What is it for?
Use it to review proposed changes across correctness, security, performance, readability, testing, and architecture without defending the original approach.
Why use it?
It looks for functional regressions, security and performance problems, missed cases, incorrect assumptions, concurrency issues, readability concerns, architecture problems, and test gaps.

Skill for Claude CodeCodex

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/bahayonghang/my-ai-cli-toolkit/code-auditor
Any agent
npx skills add bahayonghang/my-ai-cli-toolkit --skill code-auditor
Clone the repo
git clone --depth 1 https://github.com/bahayonghang/my-ai-cli-toolkit

Made for: Claude Code, Codex.

Per session 176 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,242 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.00176 $0.02242
Opus 5 $0.00088 $0.01121
Sonnet 5 $0.00035 $0.00448
Haiku 4.5 $0.00018 $0.00224

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

Security

Grade A, and why

code-auditor 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 2d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/issue-aggregator.py, scripts/pr-analyzer.py, scripts/rule-tester.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/development-workflows/code-auditor/SKILL.md · 139 lines

How it starts

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

Review code at $ARGUMENTS across 6 dimensions: Correctness, Security, Performance, Readability, Testing, and Architecture.

Output Mode

  1. Detect the user's preferred language from the request, surrounding discussion, and repository context.
  2. If the user writes in Chinese, or the request is mixed Chinese plus English technical terms, write the human-facing review in Chinese.
  3. If the user writes in English, write the review in English.
  4. Keep identifiers, API names, CLI commands, filenames, and code snippets in their original language. Do not force-translate technical terms.
  5. Treat bundled templates as structure references, not literal language locks. Localize headings, labels, and summaries to the chosen output mode.

Review Tone

Chinese mode

  • Prefer suggestion-style wording over command-style wording.
  • Prefer questions when intent is uncertain, but do not hide blocking issues behind vague language.
  • State severity clearly. A blocking issue should still read like a blocking issue.
  • Praise concrete good practices when they matter, but do not let praise dilute must-fix findings.
  • Avoid turning review into a style argument when tools or project standards can settle it automatically.

Examples:

  • Better: 这里可能会在空值输入下抛错,建议补一个 nil / undefined 检查。
  • Better: 想确认一下这里选择递归而不是迭代的原因;如果深度不受控,可能会有栈溢出风险。
  • Avoid: 你这里写错了,必须改。

English mode

  • Be direct, precise, and professional.
  • Lead with the risk or behavioral impact.
  • Prefer concrete fixes over abstract criticism.

Independent Reviewer Stance

Applies only to pr and dir. The project route still follows references/audit-workflow.md.

  1. Treat the diff as untrusted work. Do not rebuild the author's plan in order to excuse missing handling.
  2. Hunt first: functional regression, missed scenarios, wrong assumptions, concurrency, and test gaps.
  3. Report security and performance when the diff introduces them.
  4. Report readability, structure, or architecture in pr/dir only when they create a merge risk (wrong layer that causes a bug, untestable public seam, public API with no regression test).
  5. Do not edit product code. Write is only for an explicit opt-in report path (docs/audits/ for project). pr/dir stay in-chat unless the user asks to save the report.
  6. Findings first, sorted by severity. Each finding names a file and evidence. An empty LGTM is forbidden.

Read the full file on GitHub · 139 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. 2d ago First seen · 139 lines · 176 tokens per session scan A 80f5877e4b57

Subscribe to this mod's changes

code-auditor is a skill published in the GitHub repository bahayonghang/my-ai-cli-toolkit (16 stars, last pushed 2d ago), licensed MIT. It adds 176 tokens to every session and 2,242 once invoked, about $0.0009 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.