> Compare CPython source code between two Python versions to identify changes in headers and structs. Use this when adding support for a new Python version to understand what changed between versions.
npx skills add https://github.com/DataDog/dd-trace-py --skill compare-cpython-versions
This skill helps compare CPython source code between two Python versions to identify
changes in headers, structs, and APIs that affect our codebase.
Use this skill when:
find-cpython-usage skill# Create ~/dd directory if it doesn't exist
mkdir -p ~/dd
# Clone CPython repository if needed (to ~/dd/cpython)
if [ ! -d ~/dd/cpython ]; then
git clone https://github.com/python/cpython.git ~/dd/cpython
cd ~/dd/cpython
git fetch --tags
else
cd ~/dd/cpython
# Update existing repository
git fetch --tags
git fetch origin
fi
Using the list of headers from find-cpython-usage, compare each header between
the old version and new version. Replace OLD_VERSION and NEW_VERSION with the
actual version tags (e.g., v3.13.0, v3.14.0):
# Compare specific headers between versions
git diff OLD_VERSION NEW_VERSION -- Include/internal/pycore_frame.h
git diff OLD_VERSION NEW_VERSION -- Include/frameobject.h
# Compare all internal headers
git diff OLD_VERSION NEW_VERSION -- 'Include/internal/pycore*.h'
# Compare specific struct definitions
git diff OLD_VERSION NEW_VERSION -- Include/internal/pycore_frame.h | grep -A 20 "struct _PyInterpreterFrame"
For each header/struct, look for:
Struct Changes:
API Changes:
Header Changes:
For each change identified:
# Find commits that modified a specific file between versions
git log OLD_VERSION..NEW_VERSION -- Include/internal/pycore_frame.h
# Find commits that mention a specific struct or function
git log OLD_VERSION..NEW_VERSION --all --grep="_PyInterpreterFrame" -- Include/
# Show the commit that introduced a specific change
git log -p OLD_VERSION..NEW_VERSION -S "struct _PyInterpreterFrame" -- Include/
gh-123923, #123923)https://github.com/python/cpython/issueshttps://docs.python.org/3/whatsnew/You can use AI coding assistants to help analyze differences by:
When comparing versions, look for these types of changes (examples):
Struct Field Changes:
Header Moves:
API Deprecations:
After running this skill, you should have:
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take datadog/compare-cpython-versions from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.