By devdanzin
Free-threading migration toolkit for CPython C extensions. Finds thread-safety bugs (data races, unprotected shared state, unsafe API usage, lock discipline issues), plans migrations to free-threaded Python (PEP 703), triages ThreadSanitizer reports, generates concurrent stress tests for TSan, and produces readiness assessments. 9 agents, 6 scripts, 3 commands. Tree-sitter-powered C/C++ parsing.
Quick free-threading readiness scorecard. Use when the user asks for a quick overview, readiness score, or assessment of how close a C extension is to being free-threading safe.
Full free-threading thread-safety analysis. Finds data races, unprotected shared state, unsafe API usage, lock discipline issues, and atomic candidates. Use when the user wants a comprehensive analysis or to find thread-safety bugs.
Produce a phased migration plan for adopting free-threading in a C extension. Runs all analysis agents, then the migration-planner to create an actionable plan. Use when the user asks for a migration plan, how to add free-threading support, or how to get started with free-threading.
Use this agent to produce a phased migration plan for adopting free-threaded Python in a C extension. Consumes findings from all other agents and produces actionable steps organized into phases. <example> User: Create a migration plan for my extension to support free-threading. Agent: I will read all available analysis findings, assess the current state, and produce a phased plan: Prerequisites → Declare Intent → Protect Shared State → Update APIs → Verify → Maintain. </example>
Use this agent to find shared variables in C extension code that should use atomic operations for free-threading safety — non-atomic bools, counters, and pointers accessed across threads. <example> User: Find variables that need atomic operations for free-threading. Agent: I will run the atomic candidate scanner, cross-reference with shared-state-auditor findings if available, verify each candidate's access pattern across functions, and suggest appropriate atomic types. </example>
Use this agent for temporal analysis of a C extension's free-threading migration journey — finding free-threading related commits, incomplete migrations, reverted attempts, TSan fix patterns, and similar unfixed patterns. Uses a 2-year window to capture the full PEP 703 era. <example> User: Has this extension started working on free-threading support? What's been done? Agent: I will run the free-threading history analyzer with a 2-year window, classify commits by type (TSan fixes, atomic migrations, lock additions), detect incomplete migrations, and identify reverted attempts. </example> <example> User: We just fixed a data race — did we miss any similar bugs elsewhere? Agent: I will analyze the fix commit pattern and search the entire codebase for structurally similar code that might have the same vulnerability. </example>
Use this agent to audit lock acquire/release pairing in C extension code — missing releases on error paths, nested lock risks, and functions that should use Py_BEGIN_CRITICAL_SECTION. <example> User: Check the lock handling in my C extension. Agent: I will run the lock discipline scanner, verify acquire/release pairing on all paths (including error paths and gotos), check for nested lock risks, and identify functions that should use per-object critical sections. </example>
Use this agent to find global/static shared mutable state in C extension code that becomes unsafe under free-threaded Python. Identifies unprotected global PyObject* variables, non-atomic shared flags, static types, and module state stored in globals. <example> User: Check my C extension for shared state that would be unsafe under free-threading. Agent: I will run the shared state scanner, triage each finding by checking write patterns and lock protection, then review for patterns the script may miss like lazy-init singletons and cache variables. </example>
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A Claude Code plugin for analyzing and migrating CPython C extensions to free-threaded Python (PEP 703).
Make your C extension free-threading safe.
Install as a Claude Code plugin:
claude plugins add /path/to/ft-review-toolkit/plugins/ft-review-toolkit
pip install tree-sitter tree-sitter-c
# Optional: pip install tree-sitter-cpp (for C++ extensions)
| Command | Purpose |
|---|---|
/ft-review-toolkit:assess [path] | Quick readiness scorecard |
/ft-review-toolkit:explore [path] | Full thread-safety analysis |
/ft-review-toolkit:plan [path] | Phased migration plan |
| Tag | Meaning |
|---|---|
| RACE | Confirmed or highly likely data race |
| UNSAFE | Operation unsafe without the GIL |
| PROTECT | Shared state needing protection |
| MIGRATE | Pattern needing structural changes |
| SAFE | Confirmed safe pattern |
MIT
npx claudepluginhub devdanzin/ft-review-toolkit --plugin ft-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.
CPython C code exploration and analysis agents: refcount auditing, error path analysis, GIL discipline checking, C complexity measurement, include graph mapping, PEP 7 style checking, NULL safety scanning, API deprecation tracking, macro hygiene review, and memory pattern analysis
Codebase exploration and analysis agents for existing code: architecture mapping, git history analysis, fix propagation detection, churn-based risk assessment, consistency auditing, complexity analysis, test coverage, error handling, documentation, project documentation accuracy, type design, dead code detection, tech debt inventory, pattern consistency, and API surface review
CPython 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.
Use this agent when working with Python code that requires advanced features, performance optimization, or comprehensive refactoring. Examples: <example>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?" assistant: "I'll use the python-expert agent to analyze and optimize your Python code with advanced techniques and performance profiling."</example> <example>Context: User wants to implement async/await patterns in their existing synchronous Python code. user: "I need to convert this synchronous code to use async/await for better performance" assistant: "Let me use the python-expert agent to refactor your code with proper async/await patterns and concurrent programming techniques."</example> <example>Context: User needs help implementing complex Python design patterns. user: "I want to implement a factory pattern with decorators for my API endpoints" assistant: "I'll use the python-expert agent to implement advanced Python patterns with decorators and proper design principles."</example>
Comprehensive Python code security skill combining static analysis tools (Bandit, pip-audit, safety) with LLM-powered dynamic analysis. Claude actively reviews code for injection vulnerabilities, path traversal, insecure deserialization, secrets exposure, auth bypasses, and logic flaws that static tools miss.
Modern Python development suite - testing, performance optimization, async patterns, and packaging
Automated code review with severity levels and actionable feedback
This skill should be used when the model needs to ensure code quality through comprehensive linting and formatting. It provides automatic linting workflows for orchestrators (format → lint → resolve via concurrent agents) and sub-agents (lint touched files before task completion). Prevents claiming "production ready" code without verification. Includes linting rules knowledge base for ruff, mypy, and bandit, plus the linting-root-cause-resolver agent for systematic issue resolution.