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 agentmods add commands/axiomantic/spellbook/advanced-code-review-reportgit clone --depth 1 https://github.com/axiomantic/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/commands/axiomantic/spellbook/advanced-code-review-report)<a href="https://agentmods.dev/commands/axiomantic/spellbook/advanced-code-review-report"><img src="https://agentmods.dev/badge/commands/axiomantic/spellbook/advanced-code-review-report.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00020 | $0.03534 |
| Opus 5 | $0.00010 | $0.01767 |
| Sonnet 5 | $0.00004 | $0.00707 |
| Haiku 4.5 | $0.00002 | $0.00353 |
Grade A, and why
advanced-code-review-report 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 5d 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 — 433 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Phase 5: Report Generation
Invariant Principles
- Signal over noise: Only verified findings appear in the final report. REFUTED findings are excluded. Quality of findings matters more than quantity.
- Actionable output: Every finding must have clear next steps. Findings without suggestions or context are not actionable.
- Machine-readable artifacts for automation: JSON summary enables CI/CD integration, automated triage, and tooling. Human-readable Markdown is not sufficient alone.
Purpose: Produce final deliverables including Markdown report and machine-readable JSON summary.
5.1 Finding Filtering
Filter to verified and inconclusive findings only:
def filter_findings_for_report(findings: list[dict]) -> list[dict]:
"""Filter out REFUTED findings for final report."""
return [
f for f in findings
if f.get("verification_status") != "REFUTED"
]
5.2 Severity Sorting
Sort findings by severity (most critical first):
SEVERITY_ORDER = {
"CRITICAL": 0,
"HIGH": 1,
"MEDIUM": 2,
"LOW": 3,
"NIT": 4,
"QUESTION": 5,
"PRAISE": 6
}
# QUESTION is a legal severity and MUST be present. Omitting it routes every
# QUESTION finding through the .get(..., 99) fallback, where it sorts last and
# disappears from by_severity. This dict must match the one in the
# advanced-code-review skill key for key.
def sort_by_severity(findings: list[dict]) -> list[dict]:
"""Sort findings by severity, most critical first."""
return sorted(findings, key=lambda f: SEVERITY_ORDER.get(f["severity"], 99))
5.3 Verdict Determination
Determine overall review verdict:
BLOCKING = {"CRITICAL", "HIGH"}
DISCUSS = {"MEDIUM"}
NON_BLOCKING = {"LOW", "NIT", "QUESTION", "PRAISE"}
KNOWN_SEVERITIES = BLOCKING | DISCUSS | NON_BLOCKING
def determine_verdict(findings: list[dict]) -> str:
"""
Determine review verdict based on findings.
This is a MERGE GATE, so it FAILS CLOSED. Two ways it used to fail open:
exact-uppercase membership testing (a finding emitted as `Critical` matched
nothing and fell through to APPROVE), and treating an UNRECOGNISED severity
as non-blocking. Both let a blocking finding merge under
"No blocking issues found."
Returns: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"
"""
severities = {
str(f.get("severity", "")).strip().upper()
for f in findings
if f.get("verification_status") != "REFUTED"
}
# An unrecognised severity is NOT evidence of harmlessness. It means a
# producer is speaking a vocabulary this gate does not know, so the gate
# cannot rank it -- block and make a human look.
unknown = severities - KNOWN_SEVERITIES - {""}
if unknown:
return "REQUEST_CHANGES"
if severities & BLOCKING:
return "REQUEST_CHANGES"
if severities & DISCUSS:
return "COMMENT"
return "APPROVE"
def verdict_rationale(verdict: str, findings: list[dict]) -> str:
"""Generate rationale for verdict."""
by_severity = {}
for f in findings:
# Normalise the same way determine_verdict does. Counting raw strings
# here would report "0 blocking issue(s)" alongside REQUEST_CHANGES.
sev = str(f.get("severity", "")).strip().upper()
by_severity[sev] = by_severity.get(sev, 0) + 1
unknown = sorted(set(by_severity) - KNOWN_SEVERITIES - {""})
if verdict == "REQUEST_CHANGES":
if unknown:
return (
f"unrecognised severity value(s) {unknown} -- the gate cannot "
"rank them and blocks rather than assuming they are harmless"
)
critical = by_severity.get("CRITICAL", 0)
high = by_severity.get("HIGH", 0)
return f"{critical + high} blocking issue(s) require attention"
elif verdict == "COMMENT":
medium = by_severity.get("MEDIUM", 0)
return f"{medium} medium-severity issue(s) worth discussing"
else:
return "No blocking issues found"
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.
- 5d ago First seen · 433 lines · 20 tokens per session scan A 9ec1032a00f1
advanced-code-review-report is a command published in the GitHub repository axiomantic/spellbook (10 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 3,534 once invoked, about $0.0001 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.
Other commands, from other repositories
audit-agents-skills
Audit quality of agents, skills, and commands in a Claude Code project.
boldguy-linkedin-answer
Draft a LinkedIn comment on a post, referencing the guide's relevant section, in Flow style with AI markers removed.
security-audit
Comprehensive security audit of your project AND Claude Code configuration. Analyzes secrets exposure, injection surfaces, dependencies, hook security, and produces a scored security posture assessment.
audit-quiz-coverage
Find quiz coverage gaps from recent guide/CHANGELOG/CC-releases changes and propose new questions.
worktree
Create a git worktree for isolated feature/fix work.
sync
Check guide/landing synchronization status.