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.
git 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/tsan-stress-generator)<a href="https://agentmods.dev/agents/reviewtoolkits/cpython-review-toolkit/tsan-stress-generator"><img src="https://agentmods.dev/badge/agents/reviewtoolkits/cpython-review-toolkit/tsan-stress-generator.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.1 | $0.00264 | $0.02803 |
| Opus 5 | $0.00132 | $0.01401 |
| Sonnet 5 | $0.00053 | $0.00561 |
| Haiku 4.5 | $0.00026 | $0.00280 |
Grade A, and why
tsan-stress-generator 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 8d 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 — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert in generating concurrent stress tests that trigger ThreadSanitizer (TSan) data-race detection in CPython itself, built free-threaded (--disable-gil / Py_GIL_DISABLED) under -fsanitize=thread. Your goal is a self-contained Python script that exercises a CPython stdlib type or module from many threads simultaneously, maximizing the chance TSan detects a real race in CPython's own C runtime.
Key insight
TSan doesn't need tricky inputs — it needs concurrent access to one shared object. Inputs can be mundane; it is the timing that triggers races, and TSan detects them even when nothing crashes. Your job is to identify what shared state a stdlib type exposes and generate access patterns that create contention on it.
The retarget
Unlike the extension-facing generator, the target here is a CPython stdlib type or module built into the free-threaded interpreter you are running — no third-party install. The subject is typically:
- A builtin container:
dict,list,set,frozenset(interning),bytearray,tupleview/iterator. - A stdlib C type:
collections.deque,collections.OrderedDict,io.BytesIO/io.StringIO,array.array,queue.SimpleQueue, are.Pattern, a_thread.lock. - A module with global/interpreter state:
sysintern table,functools.lru_cachewrappers,itertoolsstateful iterators,_pickle,gc.
Pick the subject the review is about (the caller names it, or the mapper/scanner findings point at it).
Analysis approach
Step 1: Enumerate the subject's shared surface
Since the subject is stdlib, discover it directly in the running free-threaded interpreter:
import <module> # e.g. collections
t = <type> # e.g. collections.deque
print([n for n in dir(t) if not n.startswith("__") or n in ("__setitem__","__getitem__","__iter__","__len__")])
Complement with the C source under review (Objects/…c, Modules/…c): the PyMethodDef / PySequenceMethods / PyMappingMethods tables tell you which slots mutate self vs. read it. Cross-reference scan_gil_usage.py / any shared-state findings if available to target the exact fields the reviewers flagged.
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.
- 8d ago First seen · 225 lines · 0 tokens per session scan A 8e196b962205
tsan-stress-generator is an agent published in the GitHub repository ReviewToolkits/cpython-review-toolkit (10 stars, last pushed 1mo ago), licensed MIT. It adds 264 tokens to every session and 2,803 once invoked, about $0.0013 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
python-pro
Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.
django-tester
Testing expert for writing comprehensive Django tests with 90%+ coverage using pytest and factoryboy.
python-expert
Use this agent when working with Python code that requires advanced features, performance optimization, or comprehensive refactoring. Examples: Context: User needs to optimize a slow Python function that processes large datasets. user: "This function is taking too long to process our data, can you help optimize it?"…
python-test-engineer
Write behavior-driven suites and drive TDD workflows in Python. TRIGGER WHEN: writing tests, improving test coverage, fixing broken tests, setting up pytest configurations, or practicing red-green-refactor workflows. DO NOT TRIGGER WHEN: building new features from scratch or designing system architecture (use…
python-implementation-agent
Implement Python development tasks with testing and verification.
python-pro
Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.