$git clone https://github.com/gpshead/cpython-skillsA Claude Code marketplace and skill for working in the cpython repo.
| 1 | # CPython Skills Marketplace |
| 2 | |
| 3 | A Claude Code marketplace providing specialized skills for working with the CPython repository - the reference implementation of the Python programming language. |
| 4 | |
| 5 | ## Overview |
| 6 | |
| 7 | This marketplace hosts Claude Code plugins with AI-agent skills for CPython development. Includes one comprehensive plugin with multiple skills providing deep knowledge about CPython's codebase structure, build system, testing infrastructure, and coding standards. |
| 8 | |
| 9 | Skills are now invoked as `cpython:dev`, `cpython:build`, `cpython:style`, `cpython:docs`, `cpython:jit`, and `cpython:backport`. |
| 10 | |
| 11 | ## Installation |
| 12 | |
| 13 | To use these skills in Claude Code within a CPython repository checkout: |
| 14 | |
| 15 | 1. Add the marketplace: |
| 16 | ``` |
| 17 | /plugin marketplace add gpshead/cpython-skills |
| 18 | ``` |
| 19 | |
| 20 | 2. Install the plugin: |
| 21 | ``` |
| 22 | /plugin install cpython |
| 23 | ``` |
| 24 | |
| 25 | 3. In your CPython repository, ask Claude: |
| 26 | ``` |
| 27 | write a CLAUDE.local.md that instructs you to load and use all of the cpython plugin skills in this repo. |
| 28 | ``` |
| 29 | |
| 30 | ## Available Plugins |
| 31 | |
| 32 | ### CPython Skills |
| 33 | |
| 34 | **Name**: `cpython` |
| 35 | **Description**: Skills for working with the CPython repository - helping with building, testing, and contributing to Python's implementation |
| 36 | |
| 37 | This plugin provides six specialized skills with a meta-skill that coordinates loading: |
| 38 | |
| 39 | #### 1. dev (Entry Point) |
| 40 | **When to use**: Starting any CPython development task - fixing bugs, adding features, understanding code |
| 41 | |
| 42 | Provides: |
| 43 | - Codebase orientation and source code structure |
| 44 | - Workflow coordination - guides you to load other skills as needed |
| 45 | - Recommended tools (`rg`, `gh`, `jq`) |
| 46 | - Engineering notebook management for PRs and branches |
| 47 | - Scratch space usage |
| 48 | |
| 49 | #### 2. build |
| 50 | **When to use**: Compiling CPython, running tests, verifying changes work, debugging test failures |
| 51 | |
| 52 | Includes: |
| 53 | - Build directory setup with ccache support |
| 54 | - Platform-specific configuration (Linux, macOS, Windows) |
| 55 | - Argument Clinic code generation |
| 56 | - Build verification and troubleshooting |
| 57 | - unittest-based testing (not pytest!) |
| 58 | - Using `--match` for test filtering (not `-k`!) |
| 59 | - Code coverage collection |
| 60 | - Interactive debugging with tmux |
| 61 | |
| 62 | #### 3. style |
| 63 | **When to use**: Preparing commits, running pre-commit hooks, validating changes |
| 64 | |
| 65 | Covers: |
| 66 | - PEP 7 (C code) and PEP 8 (Python code) compliance |
| 67 | - Trailing whitespace and file ending rules |
| 68 | - Type annotation policy (no annotations in Lib/!) |
| 69 | - Pre-commit hooks (via `prek` if available, else `pre-commit`) and patchcheck |
| 70 | - Comment quality - avoiding PR-indexed comments that won't age well |
| 71 | |
| 72 | #### 4. docs |
| 73 | **When to use**: Editing documentation in Doc/, adding version markers, creating NEWS entries |
| 74 | |
| 75 | Covers: |
| 76 | - Documentation in ReST format in Doc/ tree |
| 77 | - Documentation tooling setup and validation |
| 78 | - Version markers (always use `next`) |
| 79 | - NEWS file entries for bug fixes and features |
| 80 | |
| 81 | #### 5. jit |
| 82 | **When to use**: Working on CPython's experimental JIT compiler - modifying build scripts in Tools/jit/, editing Python/jit.c, changing bytecodes that affect stencils, debugging JIT failures |
| 83 | |
| 84 | Covers: |
| 85 | - LLVM 21 toolchain setup |
| 86 | - JIT configure flags (`--enable-experimental-jit` options) |
| 87 | - Copy-and-patch compilation pipeline (template.c to jit_stencils.h) |
| 88 | - Stencil regeneration workflow |
| 89 | - Runtime JIT debugging (comparing `PYTHON_JIT=0` vs `PYTHON_JIT=1`) |
| 90 | - Supported target platforms and object formats |
| 91 | - Key concepts: stencils, holes, preserve_none, musttail, GOT |
| 92 | |
| 93 | #### 6. backport |
| 94 | **When to use**: Backporting a merged change to a maintenance branch (3.14, 3.13, ...) - including redoing a failed automated miss-islington backport. Also invocable directly: `/cpython:backport 3.13 <PR URL or number>` |
| 95 | |
| 96 | Covers: |
| 97 | - The `cherry_picker` conventions the bots expect: `backport-<sha7>-<version>` branch naming, `[X.Y] title (GH-NNNN)` commit/PR titles, `(cherry picked from commit ...)` trailers |
| 98 | - Intelligent conflict resolution - translating the fix into the older branch's idioms (pre-Argument-Clinic code, missing helper APIs, split test packages) instead of failing like the automated tool |
| 99 | - Building and testing the result on the target branch before offering to push |
| 100 | - Opening the backport PR with `gh`, including "Manual backport notes" describing any hand adaptations |
| 101 | - Always asks before pushing or creating the PR (fork auth setups vary) |
| 102 | |
| 103 | ### Commands |
| 104 | |
| 105 | #### /comments |
| 106 | Audits every comment added in your current diff against a "would this still be useful in two years?" test, then rewrites or removes the ones that are over-indexed on the current PR (history references, restating-the-code, unexplained jargon). The `style` skill points here as part of the pre-commit workflow, but it's also useful to run on an existing PR you're reviewing or picking up - check out the branch and invoke `/comments` to clean up comments before merge. |
| 107 | |
| 108 | ## Advanced Usage |
| 109 | |
| 110 | ### Preventing Use of System Python |
| 111 | |
| 112 | The skills instruct Claude to always use the locally-built interpreter (`build/python`) rather than `python` or `python3` from `$PATH`. This is critical when dev |