api-deprecation-tracker

api-deprecation-tracker is an agent for coding agents from ReviewToolkits/cpython-review-toolkit. It costs 141 tokens per session (3,559 once invoked), scanned A, original, MIT.

A code-review agent for finding deprecated CPython C API calls, meaning older interfaces that have newer replacements or may be removed.

In plain words
What is it for?
Use it to scan CPython code for deprecated APIs, understand their urgency, and plan migrations to newer interfaces.
Why use it?
It distinguishes real uses in code from definitions, comments, and similar names, then reports replacement options and removal timelines.

Agent

Part of the cpython-review-toolkit plugin — 7 commands, 23 agents shipped together

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 agents/reviewtoolkits/cpython-review-toolkit/api-deprecation-tracker
Clone the repo
git clone --depth 1 https://github.com/ReviewToolkits/cpython-review-toolkit

Or install cpython-review-toolkit, the plugin that ships this one along with the rest of its 7 commands, 23 agents.

Wrote 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.

agentmods badge for api-deprecation-tracker

README.md
[![agentmods](https://agentmods.dev/badge/agents/reviewtoolkits/cpython-review-toolkit/api-deprecation-tracker.svg)](https://agentmods.dev/agents/reviewtoolkits/cpython-review-toolkit/api-deprecation-tracker)
Your own site
<a href="https://agentmods.dev/agents/reviewtoolkits/cpython-review-toolkit/api-deprecation-tracker"><img src="https://agentmods.dev/badge/agents/reviewtoolkits/cpython-review-toolkit/api-deprecation-tracker.svg" alt="Measured on agentmods" height="20"></a>
Per session 141 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,559 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.00141 $0.03559
Opus 5 $0.00071 $0.01780
Sonnet 5 $0.00028 $0.00712
Haiku 4.5 $0.00014 $0.00356

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

Security

Grade A, and why

api-deprecation-tracker 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 3d 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.

plugins/cpython-review-toolkit/agents/api-deprecation-tracker.md · 248 lines

How it starts

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

You are an expert in CPython C API evolution, specializing in API deprecation and migration. Your mission is to find usage of deprecated APIs within CPython's own codebase.

Scope

Analyze the scope provided. Default: the entire project.

Script-Assisted Analysis

python <plugin_root>/scripts/scan_deprecated_apis.py [scope]

The vocabulary lives in data/deprecated_c_apis.json, verified entry-by-entry against a CPython checkout (Py_DEPRECATED markers in Include/, .. deprecated:: / .. soft-deprecated:: directives in Doc/c-api/, and Doc/deprecations/c-api-pending-removal-in-*.rst). Do not hand-grep for a list from memory — the previous version of this agent did exactly that and scored 0 real hits out of 13 on Objects/: every match was the API's own definition site, comment prose, or a substring false positive (PyUnicode_AsUnicode matching the live PyUnicode_AsUnicodeEscapeString).

Key fields per finding: api, tier, deprecated_in, removed_in, replacement, drop_in, caveat, severity, code (the source line), detail.

Order the report by removed_in, soonest first

Use the summary.by_removal map, which is sorted by deadline. Do not hard-code a priority family: which family matters depends on the scope. On Objects/ the _PyUnicodeWriter_* family (removal 3.18) dominates; on anything touching Python/, the 21 Py_*Flag global configuration variables outrank it, because they are removed in 3.16 — the release under development, and the nearest deadline in the vocabulary. Let the data pick the family.

drop_in / caveat — read these before recommending anything

replacement alone is not enough, and trusting it caused the one FIX of the Modules/ run to point at a regression. When drop_in is false, the named replacement is not a mechanical substitution and caveat says what breaks and what the verified drop-in actually is. Three shapes recur:

  • Different type check. _PyUnicodeWriter_WriteStr names PyUnicodeWriter_WriteStr, which tests type == &PyUnicode_Type exactly (Objects/unicode_writer.c:364), so a str subclass falls through to PyObject_Str and runs user code. That was gh-148241, and Modules/_json.c:407 carries a comment saying so. The verified drop-in is PyUnicodeWriter_WriteSubstring(w, s, 0, PyUnicode_GET_LENGTH(s)).
  • Inverted polarity. Six of the Py_*Flag globals map to a PyConfig member with the opposite sense — CPython's own bridge table marks them GLOBAL(&Py_NoSiteFlag, 1) where the second field is literally named not. A rename inverts the behaviour.
  • Different refcount semantics. PyModule_AddObject steals only on success.

Read the full file on GitHub · 248 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. 3d ago First seen · 248 lines · 0 tokens per session scan A 46c5a4ae86c8

Subscribe to this mod's changes

api-deprecation-tracker is an agent published in the GitHub repository ReviewToolkits/cpython-review-toolkit (10 stars, last pushed 1mo ago), licensed MIT. It adds 141 tokens to every session and 3,559 once invoked, about $0.0007 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.

Related

Other agents, from other repositories

ROCKETRIDE_python_API

A Python SDK for executing RocketRide pipelines using the Debug Adapter Protocol (DAP). This client provides a simplified interface for connecting to RocketRide DAP servers, executing pipelines, managing data transfer operations, and interacting with AI services.

rocketride-org/rocketride-server · 0 tokens

ROCKETRIDE_typescript_API

A TypeScript/JavaScript SDK for executing RocketRide pipelines using the Debug Adapter Protocol (DAP). This client provides a simplified interface for connecting to RocketRide DAP servers, executing pipelines, managing data transfer operations, and interacting with AI services.

rocketride-org/rocketride-server · 0 tokens

ROCKETRIDE_COMPONENT_REFERENCE

Agent "ROCKETRIDE_COMPONENT_REFERENCE" from rocketride-org/rocketride-server, covering rocketride component reference, how component information is organized, reading the catalog, reading component schemas and pipeline file format.

rocketride-org/rocketride-server · 0 tokens

kernel-cuda-specialist

Hand-writes raw CUDA C/C++ code (.cu files) with pybind11 bindings (binding.cpp) to build custom PyTorch C++ extensions. Delegate ONLY when the user explicitly asks to write .cu/.cpp files compiled via torch.utils.cppextension. Do NOT delegate for: Triton, TileIR, or any other kernel DSL/framework. NOT for CUDA…

NVIDIA/TensorRT-LLM · 96 tokens

CppCoder

Use when: writing or modifying C++ implementation code, refactoring internal logic, implementing features behind the C ABI layer, writing tests, fixing bugs in .cc/.h files, optimizing performance, reviewing code for C++ Core Guidelines compliance, serializing/deserializing JSON, reducing code duplication.

microsoft/foundry-local · 58 tokens

PortCSharpToCpp

Use when: analyzing C# source code to understand intent, mapping C# patterns to C++ idioms, identifying what to port vs. redesign, documenting behavioral contracts from C# implementation, gap analysis between C# and C++ SDKs, contract types inventory.

microsoft/foundry-local · 52 tokens