Use this skill when working in the CPython repository for any development task—fixing bugs, adding features, understanding code, or making contributions. It provides codebase orientation and coordinates loading of specialized skills (build, style, docs) as your workflow progresses.
You are working in the CPython repository - the implementation of the Python language runtime and standard library itself.
Run all Python code with the locally-built interpreter — never python or python3 from $PATH:
build/pythonbuild/python.exeThis applies to any execution of code you are changing or testing — running tests, testing snippets, verifying behavior, importing modules. The system Python is a different build and won't reflect your changes. If the build directory doesn't exist yet, load the build skill and compile first.
One exception: build and regeneration tooling under Tools/ (e.g. Tools/jit/build.py, regen targets) is designed to run under a pre-existing Python and may use python3 — that tooling generates sources rather than executing your changes.
This skill provides orientation. Load additional skills when your task requires them:
build skill when: compiling CPython, running tests, verifying changes work, debugging test failures, or checking if your fix is correctstyle skill when: preparing commits, running pre-commit hooks, checking code style, or validating changes before pushingdocs skill when: editing files in Doc/, adding version markers, creating NEWS entries, or updating documentationjit skill when: working on the JIT compiler, modifying Tools/jit/ or Python/jit.c, debugging JIT-specific failures, or changing bytecodes that affect stencil generationbackport skill when: backporting a merged change to a maintenance branch (3.14, 3.13, ...), or redoing a failed automated miss-islington backportPrefer these tools when available: rg, gh, jq
Lib/ - Python standard library (pure Python). Example: Lib/zipfile.py
Modules/ - C extension modules for performance/low-level access. Example: Modules/_csv.c
Objects/ and Python/ - Core types (list, dict, int), builtins, runtime, interpreter loop
Include/ - C header files for public and internal C APIs
Lib/test/ - All unittests
test_{module_name}.py or test_{module_name}/Lib/zipfile.py → Lib/test/test_zipfile/ (a test package), Modules/_csv.c → Lib/test/test_csv.pyload_tests() in test_package/__init__.py to work with python -m testDoc/ - Documentation in .rst format (source for python.org docs), builds to Doc/build/
InternalDocs/ - Maintainer documentation (InternalDocs/README.md is the starting point)
Tools/ - Build tools like Argument Clinic, development utilities
**/clinic/** subdirectories are auto-generated - never edit these directly. Load the build skill for regeneration commands.
Load and maintain a notebook whenever working on a feature or PR. Notebooks are how project state survives context compaction and session restarts — the next session (or the next model) picks up where this one left off instead of rediscovering everything:
.claude/pr-{PR_NUMBER}.md.claude/branch-{branch_name_without_slashes}.md (when not on main)Keep notebooks updated with learnings and project state as you work and after commits. Include: problem statement, key findings, file locations, design decisions, testing strategy, and status. (.claude/ is in CPython's .gitignore, so notebooks never pollute commits.)
Put exploration files, test scripts, and prototypes in .claude/sandbox/, never in the repo root or source tree.
REPO_ROOT/../devguide/ exists, see developer-workflow/ and documentation/ subdirectoriesREPO_ROOT/../peps/ tree - reference relevant PEPs when working on changesSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer