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.
npx skills add majiayu000/spellbook --skill codebase-auditgit clone --depth 1 https://github.com/majiayu000/spellbookWrote 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.
[](https://agentmods.dev/skills/majiayu000/spellbook/codebase-audit)<a href="https://agentmods.dev/skills/majiayu000/spellbook/codebase-audit"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/codebase-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.
<a href="https://agentmods.dev/skills/majiayu000/spellbook/codebase-audit"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/codebase-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00176 | $0.02550 |
| Opus 5.5 | $0.00070 | $0.01020 |
| Sonnet 5.5 | $0.00035 | $0.00510 |
| Haiku 4.5 | $0.00018 | $0.00255 |
Grade A, and why
codebase-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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codebase Audit — Adaptive Deep Analysis
Comprehensive codebase audit that adapts its agent configuration to the project's tech stack, forces structured findings, adversarially verifies Critical/High findings before they enter the report, diffs against the previous audit's ledger (resolved / still-open / new), and outputs a severity-sorted report plus a phased repair roadmap.
Core Principles
- READ-ONLY — Audit agents must never create, modify, or delete files in the target. Every agent prompt starts with the read-only preamble in
references/agent-prompts.md. - Inherit the session model — Omit the
modelparam on all agents so they inherit the session model (usually the strongest available). Only override upward if the session model is clearly weak for cross-file reasoning. Never hardcode a specific model name in this skill. - Depth over breadth — Fewer agents with broader merged scopes beat many shallow agents. Each agent traces issues across file boundaries.
- Adaptive — Agent count and dimensions vary by stack and mode.
- Verified findings — Critical/High findings must survive an adversarial verify pass. Medium findings pass through but are labeled
unverifiedin the report.
Operating Contract
- Direct actions: read-only inspection, local dependency audits, report writing under the target, and ledger updates under
<target>/.audit/after the user invokes this skill. - Escalate before: editing audited project source files, dependency manifests,
.gitignore, CI config, remote issues, PR state, or anything outside the requested audit/report scope. - Secret evidence: retain file:line and the surrounding code, but replace credential values with
[REDACTED]in findings, reports, and ledger entries; never reproduce the literal. This redacted snippet satisfies the code-evidence requirement. - Evidence-backed pushback: challenge "all clear" or "resolved" only with file evidence, dependency-audit output, verifier results, or ledger spot-checks.
- Feedback loop: promote repeated misses into prompt updates, ledger matching rules, or fixture eval cases rather than leaving them as session-only notes.
What ships with it
19 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- evals/evals.json 2.6 KB
- evals/expected-findings.json 3.6 KB
- evals/fixture/app/__init__.py 0 B runs code
- evals/fixture/app/config.py 548 B runs code
- evals/fixture/app/handlers.py 587 B runs code
- evals/fixture/app/main.py 787 B runs code
- evals/fixture/app/pipeline.py 807 B runs code
- evals/fixture/app/registry.py 983 B runs code
- evals/fixture/app/storage.py 669 B runs code
- evals/fixture/app/tasks.py 510 B runs code
- evals/fixture/config.yaml 72 B
- evals/fixture/README.md 406 B
- evals/fixture/requirements.txt 42 B
- evals/fixture/tests/test_pipeline.py 418 B runs code
- evals/README.md 2.6 KB
- references/agent-prompts.md 18 KB
- references/ledger-format.md 2.3 KB
- references/stack-patterns.md 2.8 KB
- references/workflow-template.md 5.2 KB
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.
- 12d ago Changed · +1 lines 77bbe19ddedd
- 1mo ago First seen · 150 lines · 176 tokens per session scan A f7113c99023c
codebase-audit is a skill published in the GitHub repository majiayu000/spellbook (288 stars, last pushed yesterday), licensed MIT. It adds 176 tokens to every session and 2,550 once invoked, about $0.0007 per session on Opus 5.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.
Other skills, from other repositories
ai-development-guide
Applies language-agnostic and backend technical decision criteria, anti-pattern detection, debugging, and quality gates. Use when reviewing general/backend implementation choices, code smells, failures, or implementation completeness.
workflow
A workflow skill for embedded-device projects that plans and runs building, flashing, debugging, observing, and diagnosis tasks.
cheese
Route an idea, path, pull request, issue, failure, question, or bare /cheese to the correct workflow skill. Use this skill for /cheese, routing requests, help requests, or opening messages without a named workflow skill.
x-bug2rag
A knowledge-capture tool that turns reusable bug explanations into a local RAG collection, meaning a searchable store of text that an agent can retrieve later. It records the trigger, incorrect implementation, correct implementation, and observable difference.
x-cr
A software-correctness investigation skill for finding why code behaves differently from what was expected. It uses evidence from code paths, specifications, tests, logs, and changes to assess possible causes.
x-fix
A bug-fixing skill with separate paths for directly reported bugs, correctness-review findings, and failed verification or quality-gate reports. It records completed fixes and their validation in project reports.