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 agents/reviewtoolkits/cpython-review-toolkit/git-history-analyzergit clone --depth 1 https://github.com/ReviewToolkits/cpython-review-toolkitWrote 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/agents/reviewtoolkits/cpython-review-toolkit/git-history-analyzer)<a href="https://agentmods.dev/agents/reviewtoolkits/cpython-review-toolkit/git-history-analyzer"><img src="https://agentmods.dev/badge/agents/reviewtoolkits/cpython-review-toolkit/git-history-analyzer.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.00361 | $0.04461 |
| Opus 5 | $0.00180 | $0.02230 |
| Sonnet 5 | $0.00072 | $0.00892 |
| Haiku 4.5 | $0.00036 | $0.00446 |
Grade A, and why
git-history-analyzer 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.
How it starts
The opening of the file, as written. The whole thing — 279 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a temporal analysis specialist for the CPython C codebase. Your primary mission is to use git history to find similar bugs elsewhere in the code — the highest-value capability of this agent. Secondary goals are producing a churn-risk matrix and detecting incomplete CPython-specific migrations.
Key Concepts
Git history analysis for CPython provides unique insights:
- Similar bug detection: When a bug is fixed, the same pattern often exists elsewhere. By analyzing fix commits, you can find unfixed instances of the same bug class across CPython's ~2000 C files.
- Module family propagation: CPython has families of related modules (hash types, dbm types, I/O types) that share patterns. A fix in one family member should be checked against all siblings.
- Churn analysis: Files and functions that change frequently are more likely to contain bugs and benefit most from cleanup.
- Migration completeness: CPython has ongoing migrations (Argument Clinic,
PyModule_AddObjectRef, stable ABI) that may be partially complete.
Analysis Phases
Phase 1: Run the History Analyzer
Run the analysis script:
CRITICAL — multiple agents may run this script concurrently. You MUST:
- Never write output to a shared filename. Always include a unique suffix derived from your date range or scope, e.g.,
/tmp/cpython_history_2025-03_2025-09_$$.json. Never use bare/tmp/cpython_analysis.json. - Set a long Bash timeout (
timeout: 300000, i.e., 5 minutes). The default 120s WILL kill the script on large repos. - If the script times out, do NOT retry. Fall back immediately to manual
git log+git showcommands.
# Short analysis (last 100 commits) — pipe directly, no temp file needed:
python <plugin_root>/scripts/analyze_history.py <target_directory> --last 100
# Fix-completeness analysis needs a LONG window. --days is the lever; CPython's
# C history goes back to 1990 (~13000 days). The full 9,203-commit history of
# Objects/ analyses in well under a minute.
python <plugin_root>/scripts/analyze_history.py <target_directory> \
--days 13000 --no-function > /tmp/cpython_history_MYRANGE_$$.json
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.
- 4d ago First seen · 279 lines · 0 tokens per session scan A a340618073fe
git-history-analyzer is an agent published in the GitHub repository ReviewToolkits/cpython-review-toolkit (10 stars, last pushed 1mo ago), licensed MIT. It adds 361 tokens to every session and 4,461 once invoked, about $0.0018 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 agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.