CPython C extension analysis toolkit: 10 specialized agents for refcount auditing, error path analysis, NULL safety, GIL discipline, module state validation, type slot correctness, stable ABI compliance, version compatibility, complexity measurement, and git history analysis. Tree-sitter-powered for accurate analysis of any extension style.
npx claudepluginhub devdanzin/cext-review-toolkitCPython C/C++ extension analysis agents: refcount auditing (with borrowed-ref-across-callback detection), error path analysis, NULL safety scanning, GIL discipline checking, module state validation, type slot correctness, stable ABI compliance, version compatibility scanning, PyErr_Clear auditing, resource lifecycle tracking, C/Python parity checking, complexity measurement, and git history analysis. Tree-sitter-powered C/C++ parsing with optional clang-tidy/cppcheck integration.
No description available.
Claude Code marketplace entries for the plugin-safe Antigravity Awesome Skills library and its compatible editorial bundles.
Production-ready workflow orchestration with 79 focused plugins, 184 specialized agents, and 150 skills - optimized for granular installation and minimal token usage
A Claude Code plugin for reviewing CPython C extensions -- finding API misuse, memory safety bugs, compatibility issues, and correctness problems specific to code that consumes the Python/C API.
Built for the specific concerns of C extension authors -- reference counting from the caller's perspective, borrowed reference lifetimes, module state management, type slot correctness, stable ABI compliance, and version compatibility -- not general-purpose C analysis.
| Concern | CPython internals (cpython-review-toolkit) | C extensions (this toolkit) |
|---|---|---|
| Perspective | Code that implements the C API | Code that calls the C API |
| Parsing | Regex (PEP 7 code is regular) | Tree-sitter (extension code varies wildly) |
| Top bug class | Refcount leaks in runtime code | Borrowed refs held across callbacks |
| Module state | N/A (CPython manages its own) | Core concern -- init style, global state |
| Type definitions | Part of the runtime | Must follow slot contracts correctly |
| ABI | Defines the ABI | Must comply with the ABI |
| Dependencies | stdlib only | tree-sitter, tree-sitter-c |
claude plugin marketplace add devdanzin/cext-review-toolkit
claude plugin install cext-review-toolkit@cext-review-toolkit
claude plugin install cext-review-toolkit --source github:devdanzin/cext-review-toolkit --path plugins/cext-review-toolkit
git clone https://github.com/devdanzin/cext-review-toolkit.git
claude --plugin-dir cext-review-toolkit/plugins/cext-review-toolkit
pip install tree-sitter tree-sitter-cNavigate to a C extension project, then:
/cext-review-toolkit:health # Quick health dashboard
/cext-review-toolkit:hotspots # Refcount leaks + error bugs + complexity
/cext-review-toolkit:explore # Full exploration (all 10 agents)
/cext-review-toolkit:migrate # Modernization checklist
Start with health for a quick overview, then hotspots to find the highest-impact bugs.
| Agent | What It Finds | Script |
|---|---|---|
| refcount-auditor | Leaked refs, borrowed-ref-across-callback, stolen-ref misuse, missing Py_CLEAR | scan_refcounts.py |
| error-path-analyzer | Missing NULL checks, exception clobbering, return-without-exception | scan_error_paths.py |
| null-safety-scanner | Unchecked allocations, deref-before-check | scan_null_checks.py |
| gil-discipline-checker | GIL released during Python API, blocking I/O with GIL, callback GIL issues, free-threading readiness | scan_gil_usage.py |
| Agent | What It Finds | Script |
|---|---|---|
| module-state-checker | Legacy single-phase init, global PyObject* state, missing m_traverse/m_clear, static types | scan_module_state.py |
| type-slot-checker | Missing tp_free, traverse gaps, wrong Py_NotImplemented handling, heap type issues | scan_type_slots.py |
| Agent | What It Finds |
|---|---|
| stable-abi-checker | Internal struct access, private API calls, limited API violations |
| version-compat-scanner | API calls without version guards, dead compatibility code, deprecated APIs |
| Agent | What It Finds | Script |
|---|---|---|
| c-complexity-analyzer | Functions scored by complexity, nesting, line count | measure_c_complexity.py |
| git-history-analyzer | Similar bugs elsewhere, churn-based risk prioritization | analyze_history.py |
| Command | Purpose | Agents Used |
|---|---|---|
explore | Full analysis with selectable aspects | All (configurable) |
health | Quick scored dashboard | All in summary mode |
hotspots | Find worst functions to fix first | refcount + errors + complexity |
migrate | Modernization checklist | module-state + type-slots + abi + compat |
Unlike cpython-review-toolkit (regex-based), this toolkit uses Tree-sitter for C parsing. This enables analysis that regex fundamentally cannot do: