61 skills · 19 categories

Claude Code skills for Python

Python skills for services, data work and automation: typed modern Python, packaging with uv, pytest suites that stay fast, FastAPI and Django backends, and pandas or Polars analysis that survives messy input. Many AI engineering skills here are Python-first too.

Start with these

  1. 1

    Modern Python

    uv, ruff, strict types, one pyproject.toml

    Claude builds Python projects the 2025 way: uv manages interpreters, venvs and the lockfile, dev tools live in dependency groups, ruff replaces black, isort and flake8, and new code ships with strict type hints using 3.12 generics. It migrates requirements.txt, poetry or setup.py projects without breaking installs and knows when to reach for dataclasses versus Pydantic.

  2. 2

    Python Profiling

    Find the slow line before rewriting anything

    Claude sets up a fixed benchmark with an output hash, picks the profiler that fits the situation (cProfile for scripts, py-spy for live processes, pyinstrument for async, memray for memory), and classifies the bottleneck before touching code. Fixes follow payoff order: data structures, vectorization, caching, then processes or compiled extensions, with identical output verified.

  3. 3

    pytest Suites

    Strict, fast pytest suites with clean fixtures

    Claude sets pytest up strictly so typos in markers and config fail loudly, then designs fixtures with the narrowest safe scope, rollback-per-test database sessions, and factory fixtures instead of shared mutable data. Tests use parametrize with readable ids, tmp_path and monkeypatch, and the suite is proven green in random order and in parallel.

All 61 Python skills

Grouped by category. Each card opens the full playbook, example prompts and install commands.

Claude Code Mastery 3

No. 002

Agent SDK Builder

Ship a custom agent on Claude Code's own loop

Builds agents on the Claude Agent SDK that are safe to run inside a product. Claude starts with a read-only loop that logs every message type, adds domain tools as in-process MCP servers, gates risky calls with canUseTool or hooks, chooses the system prompt preset and settingSources on purpose so CLAUDE.md and skills load only when intended, and bounds every run by turns, time and logged cost.

agent-sdk-builder 232 lines
No. 009

MCP Server Builder

Connect Claude to your systems with tools it picks right

Builds Model Context Protocol servers that Claude can actually use well. Instead of mirroring every REST endpoint, Claude designs a few task-level tools with bounded schemas, compact outputs and fixable error messages, wires stdio or Streamable HTTP with the official SDKs, tests each tool in the Inspector and a scripted client, and registers the server for you or your team without leaking secrets.

mcp-server-builder 235 lines · 2 files
No. 021

Status Line Scripts

Context, cost and branch at a glance, under 50 ms

Claude builds a status line from the documented stdin contract instead of guessing field names, treats every optional field as possibly absent, caches git calls per session so the bar stays fast, and pipe-tests full, empty and malformed payloads before registering it. Ships a stdlib Python status line with a color-coded context bar, cost and 5-hour limit you can adapt.

statusline-scripts 165 lines · 2 files

Backend & APIs 4

No. 081

Django Apps

Constant query counts and migrations safe on live data

Claude measures queries before touching a Django view, then fixes N+1 with select_related, prefetch_related and annotations, and locks the result in with assertNumQueries. Migrations are read as SQL and planned for live tables, tasks are enqueued in on_commit, and DRF viewsets are scoped per user so list endpoints never leak other customers' rows.

django-apps 178 lines
No. 083

FastAPI Services

Async APIs that never block the event loop

Claude builds FastAPI apps that keep blocking calls off the event loop, separate Pydantic v2 schemas from ORM models, and manage clients and engines in a lifespan rather than deprecated startup hooks. Sessions and auth come from Annotated dependencies that tests override, so route tests run fast against httpx without touching production resources.

fastapi-service 200 lines
No. 084

Flask Apps

App factory, 2.0-style models, gunicorn in prod

Claude structures Flask projects around create_app with lazily bound extensions, environment config that fails fast on missing secrets, blueprints with JSON error handlers, and SQLAlchemy 2.0 typed models queried with select instead of legacy Model.query. It explains context errors instead of papering over them, tests with a fresh app per test, and serves production through tuned gunicorn workers behind a correctly counted ProxyFix.

flask-apps 303 lines
★ No. 098

Temporal Workflows

Durable processes that survive deploys and replays

Claude keeps Temporal workflow code deterministic and pushes every side effect into idempotent activities with explicit timeouts, heartbeats and non-retryable business errors. It models sagas with compensations, uses signals, queries and updates correctly, continues long loops as new, and treats every workflow code change as a versioning decision proven by replaying stored production histories in CI.

temporal-workflows 261 lines · 2 files

Languages 5

No. 115

Modern Python

uv, ruff, strict types, one pyproject.toml

Claude builds Python projects the 2025 way: uv manages interpreters, venvs and the lockfile, dev tools live in dependency groups, ruff replaces black, isort and flake8, and new code ships with strict type hints using 3.12 generics. It migrates requirements.txt, poetry or setup.py projects without breaking installs and knows when to reach for dataclasses versus Pydantic.

python-modern 220 lines · 2 files
No. 101

Bash Scripting

Shell scripts that fail loudly and clean up after

Claude starts every script from a hardened template with set -Eeuo pipefail, an ERR trap that names the failing line, temp-dir cleanup, getopts parsing and a dry-run mode. It knows where set -e silently does nothing, builds commands as arrays instead of strings, guards destructive steps against empty variables, and says when a task should be Python instead.

bash-scripting 194 lines · 2 files
No. 107

Go Idioms

Go that passes review on the first round

Claude writes Go the way experienced Go reviewers expect: consumer-side interfaces, errors wrapped with context and checked via errors.Is and errors.As, generics only where they remove real duplication, and goroutines that always have an exit path through context and errgroup. Tests are table-driven and every change is checked with vet, staticcheck and the race detector.

go-idioms 232 lines
No. 110

Julia Scientific Computing

Type-stable Julia, measured before and after

Claude writes Julia kernels in functions with concrete types, then proves they are fast with BenchmarkTools, @code_warntype and JET instead of trusting the language's reputation. Projects get their own Project.toml and Manifest.toml, DataFrames work uses transform and combine rather than row loops, and first-call latency is handled with PrecompileTools or a sysimage when users feel it.

julia-scientific 236 lines · 2 files
No. 117

Regex Crafting

Patterns with test cases and no ReDoS surprises

Claude writes regexes test-first: a cases file of must-match, must-not-match and expected captures, then the simplest anchored pattern that passes. It knows where PCRE, JavaScript, Python, Java, Go and grep disagree, rewrites nested quantifiers and overlapping alternations, and runs a bundled script that pumps inputs to expose catastrophic backtracking before it ships.

regex-crafting 184 lines · 2 files

Testing 9

No. 139

pytest Suites

Strict, fast pytest suites with clean fixtures

Claude sets pytest up strictly so typos in markers and config fail loudly, then designs fixtures with the narrowest safe scope, rollback-per-test database sessions, and factory fixtures instead of shared mutable data. Tests use parametrize with readable ids, tmp_path and monkeypatch, and the suite is proven green in random order and in parallel.

pytest-suites 213 lines
No. 126

Benchmark Testing

Faster means significant, not one lucky run

Claude stops quoting single-run timings. It uses the right harness per language, guards against dead-code elimination, quiets the machine, measures noise with an A/A run, and compares 10 or more samples per side with a significance test and confidence interval. CI gates get thresholds derived from measured noise, or instruction counts when shared runners are too jittery.

benchmark-testing 259 lines · 2 files
No. 130

Flaky Test Triage

Find flakes from CI data and fix the cause

Claude treats flakiness as a measurable defect. It aggregates JUnit reports from many CI runs to find tests that flip, ranks them by pipeline cost, quarantines the worst into a non-blocking job with an owner, reproduces them under repeat, shuffle and CPU stress, and only calls a fix done when the failure rate drops to zero over an equal number of runs.

flaky-test-triage 149 lines · 2 files
No. 138

Property-Based Testing

Let the generator find the edge case you missed

Claude writes properties that state true facts about your domain, such as round-trips, invariants, and comparisons to a simple oracle, instead of restating the code. Generators build valid inputs directly rather than filtering, every shrunk counterexample becomes a pinned example test, and stateful components get model-based command sequences.

property-based-testing 213 lines · 2 files
No. 143

Unit Testing

Tests that survive refactors and catch real bugs

Claude stops writing tests that mirror the implementation. It lists observable behaviors first, picks boundary and error inputs on purpose, writes behavior-named arrange-act-assert tests with literal expected values, and breaks the code once to prove each new test can go red. Mocks stay at out-of-process edges, so the suite survives refactors.

unit-testing 188 lines · 2 files
No. 125

API Testing

Prove every endpoint's contract, including who can't call it

Claude picks one API test format for the repo, builds an endpoint-by-case matrix that includes validation errors, expired tokens, wrong roles and cross-tenant access, and writes self-contained tests that create their own data. Responses are checked against the OpenAPI schema plus the fields each case is about, and CI runs the suite against a fresh container with JUnit output and service logs.

api-testing 254 lines
No. 131

Fuzz Testing

Throw hostile bytes at parsers before attackers do

Claude picks the input boundaries worth fuzzing, writes fast deterministic harnesses with real invariants such as round-trip equality, and seeds them with real inputs and format dictionaries. Crashes get reproduced, minimized, classified by sanitizer report and deduplicated by stack, then committed as regression inputs, and CI runs short fuzz jobs with a cached corpus.

fuzz-testing 259 lines · 2 files
No. 136

Mutation Testing

Find out if your tests would notice a real bug

Claude runs mutation testing where it pays off, on critical modules or changed files, and triages every surviving mutant: missing boundary case, weak assertion, untested error path, equivalent mutant, or dead code. Survivors turn into small behavior-named tests, ignores carry a written reason, and CI gates only the modules that matter.

mutation-testing 167 lines
No. 141

Testcontainers

Real databases in tests, started once and reset fast

Claude replaces database mocks and H2 stand-ins with the production engine in a container, started once per run rather than per test. It runs the real migrations, picks rollback, truncation, template databases or snapshots for isolation, gives each parallel worker its own database, and sets up GitHub Actions or GitLab Docker-in-Docker so the suite passes cold, shuffled and in parallel.

testcontainers 202 lines · 2 files

Databases 3

No. 196

DuckDB Analytics

SQL over Parquet and CSV files, no warehouse needed

Claude queries data files directly with DuckDB instead of loading them into pandas first. It inspects schemas with DESCRIBE and SUMMARIZE, pins types that auto-detection gets wrong such as zip codes and day-first dates, writes analysis with GROUP BY ALL, QUALIFY and ASOF JOIN, sets memory limits so big jobs spill to disk, and checks row counts and totals against the source.

duckdb-analytics 219 lines
No. 211

SQLAlchemy ORM

Typed models, owned sessions, loads you chose on purpose

Makes Claude write SQLAlchemy 2.x the way it is meant to be used: Mapped and mapped_column models with named constraints, one Session per request or task with short transactions, select() queries with deliberate selectinload or joinedload, and lazy="raise" to catch accidental lazy loads. It also reviews Alembic autogenerate output for the renames and enum changes it misses, and sets up rollback-per-test fixtures.

sqlalchemy-orm 350 lines
No. 212

SQLite in Production

One file, real pragmas, no more database is locked

Claude configures SQLite like a server database: WAL mode, busy_timeout and foreign_keys on every connection, BEGIN IMMEDIATE for writes so SQLITE_BUSY becomes a short wait, STRICT tables, and user_version migrations with the official table-rebuild procedure. A bundled stdlib Python script reports integrity, FK violations, WAL growth and unindexed foreign keys, and backups use VACUUM INTO or Litestream.

sqlite-local-first 213 lines · 2 files

Data Engineering 8

No. 227

Jupyter Notebooks

Restart, run all, same answer every time

Claude restructures notebooks into a fixed layout with one tagged parameters cell, removes absolute paths and in-notebook installs, pins the environment behind a named kernel, and moves reusable logic into modules with tests. It sets up stripped outputs or jupytext pairing for clean diffs and proves reproducibility with a headless run from a fresh kernel.

jupyter-notebooks 188 lines
No. 230

Pandas Analysis

Every row accounted for, every number reproducible

Claude loads data with explicit dtypes, profiles nulls, keys and ranges before touching anything, and logs row counts through every filter and join. Merges use validate and indicator so duplicate keys cannot inflate totals, aggregations use named groupby, and the analysis ends with assertions, a cross-check against an independent number and a findings note with caveats.

pandas-analysis 202 lines
No. 231

Polars DataFrames

Lazy plans, pushed-down filters, no row loops

Claude writes Polars as lazy plans built from expressions, checks with explain that filters and column selection reach the scan, and collects once, streaming when data outgrows memory. When migrating pandas code it uses a mapping reference, keeps the pandas output as an oracle, and compares frames until null, NaN and ordering differences are resolved.

polars-dataframes 193 lines · 2 files
No. 215

Airflow DAGs

Airflow 3 DAGs that parse fast and rerun cleanly

Gives Claude the Airflow 3 rules it tends to miss: airflow.sdk imports, removed SLAs and execution_date, and the cron default that makes data_interval_start equal data_interval_end. It writes tasks that read their window from the run, keeps DAG files free of parse-time I/O, makes waits deferrable with explicit timeouts, and ships a stdlib checker that flags Airflow 2 leftovers before they reach the scheduler.

airflow-dags 318 lines · 2 files
No. 218

CSV Cleaning

From mojibake and shifted columns to clean UTF-8

Claude preserves the raw file, runs a bundled profiler that detects encoding, BOM, delimiter, ragged rows, ambiguous dates and European number formats, then repairs structure and parses every column explicitly. Duplicates are removed by a stated rule, bad lines go to a rejects file, and a cleaning log records rows in and out for each step.

csv-cleaning 206 lines · 2 files
No. 234

Streamlit Apps

Data apps that do not re-query on every click

Claude designs Streamlit apps around the rerun model: data loaders cached with TTLs, shared clients in cache_resource, multi-input filters inside forms, and live panels in fragments so one widget does not refresh the world. State lives in session_state with stable keys and callbacks, secrets come from st.secrets, and an AppTest suite covers the main path before deploy.

streamlit-apps 210 lines
No. 222

Data Visualization

Charts that make one point, honestly

Claude starts from the takeaway sentence and picks the chart form for that question, then builds it with zero-based bar axes, small multiples instead of dual axes, a highlighted series against gray, direct labels and a title that states the finding. Before export it checks values against the data, grayscale and colorblind readability, and writes alt text.

data-visualization 179 lines
No. 232

PySpark Jobs

Fewer shuffles, no stragglers, right-sized files

Claude writes PySpark with explicit schemas and built-in functions instead of Python row UDFs, checks the physical plan before running, and reads Spark UI stage metrics to find spill, skew and extra shuffles. It picks broadcast or salted joins from evidence, caches only reused data, and writes idempotent partition overwrites or MERGE into Delta Lake or Iceberg with sane file sizes.

pyspark-jobs 187 lines

Performance 4

No. 304

Python Profiling

Find the slow line before rewriting anything

Claude sets up a fixed benchmark with an output hash, picks the profiler that fits the situation (cProfile for scripts, py-spy for live processes, pyinstrument for async, memray for memory), and classifies the bottleneck before touching code. Fixes follow payoff order: data structures, vectorization, caching, then processes or compiled extensions, with identical output verified.

python-profiling 194 lines
No. 302

N+1 Queries

Query counts that stay flat as data grows

Claude counts queries per request before touching code, finds the repeated statement that differs only by ID, and traces it to the serializer, template or resolver that triggers it. It picks join loading for to-one relations, separate IN queries for collections, SQL aggregates for counts and DataLoader for resolvers, then adds a test that fails if the count grows again.

n-plus-one-queries 218 lines
No. 293

Async Concurrency

Parallel I/O with limits, timeouts, and backpressure

Claude turns sequential awaits into concurrent work without overloading anything: it finds the binding limit (rate limit, DB pool, memory), derives a cap from throughput times latency, and implements bounded fan-out in TypeScript, Python or Go with timeouts, cancellation and per-item error handling. Retries use jittered backoff and producers get real backpressure.

async-concurrency 209 lines
No. 301

Memory Leak Hunting

From growing heap to the exact retaining reference

Claude separates real leaks from warming caches by repeating one action with forced GC, then uses the three-snapshot comparison to find object types that grow per round. It follows the retainer chain to the first reference your code owns, such as a listener, timer, unbounded Map or uncleaned effect, fixes it, and reruns the same loop to show flat memory.

memory-leak-hunting 159 lines · 2 files

Documents & Files 5

No. 368

Word Documents (.docx)

Styled, editable Word files that survive review

Claude builds Word files the way a careful editor would: named styles and real headings instead of bold Normal text, tables and images sized for the page, and templates that keep branding intact. Before editing, a bundled inspector reports tracked changes, comments and fields, so revisions are never silently mangled, and replacements that span split runs keep their formatting.

docx-documents 216 lines · 2 files
No. 379

PowerPoint Decks (.pptx)

On-brand slides you've actually looked at

Claude writes a takeaway-titled outline first, then builds slides from your template's layouts by name, filling placeholders rather than scattering text boxes. Charts are native and editable, notes carry the detail, and theme fonts stay intact. A bundled linter flags missing titles, overflow and empty placeholders, and every deck is rendered to images and reviewed before handoff.

pptx-decks 194 lines · 2 files
No. 371

Google Sheets Automation

Batched, idempotent Sheets jobs that respect quotas

Claude reads and writes Google Sheets in a few batched calls with unformatted values, keeps code-owned ranges separate from columns people edit, and upserts by key instead of row position. Apps Script code works on arrays with one read and one write, uses LockService and continuation triggers to stay under the 6-minute limit, and every job retries 429s with backoff.

google-sheets-automation 187 lines
No. 378

PDF Toolkit

Inspect first, then extract, merge, fill or generate

Claude inspects every PDF before touching it, checking for a text layer, encryption, form fields and XFA, then picks the right library for the job. Tables come out as clean CSV rows with totals checked, merges keep outlines, forms get filled using their exact field names, and new documents are built with reportlab. Every output is reopened and verified rather than assumed.

pdf-toolkit 210 lines · 2 files
No. 381

Excel Spreadsheets (.xlsx)

Live formulas, real number formats, zero #REF!

Claude writes workbooks a finance analyst would trust: real dates and numbers with formats, totals as auditable formulas, frozen headers, tables, dropdown validation and charts. It knows openpyxl never calculates, so it never saves over a data_only load, flags formulas without cached values, and runs a bundled audit for error cells and external links before reporting numbers.

xlsx-spreadsheets 207 lines · 2 files

Install

Every Python skill in one command

Installs into ~/.claude/skills/. Add --project after -- to install into the current repository.

curl -fsSL https://claudeskills.page/install.sh | sh -s -- python-modern python-profiling pytest-suites django-apps fastapi-service jupyter-notebooks pandas-analysis polars-dataframes agent-sdk-builder mcp-server-builder statusline-scripts tdd-loop htmx-hypermedia flask-apps benchmark-testing flaky-test-triage property-based-testing pulumi-iac duckdb-analytics huggingface-transformers llm-app-builder structured-outputs n-plus-one-queries docx-documents pptx-decks sentry-error-tracking raspberry-pi-projects reproducible-research unit-testing sqlalchemy-orm airflow-dags csv-cleaning streamlit-apps input-validation notion-api temporal-workflows passkeys-webauthn resilience-patterns dead-code-removal dependency-upgrades bash-scripting go-idioms julia-scientific regex-crafting api-testing fuzz-testing mutation-testing testcontainers opentelemetry azure-functions sqlite-local-first data-visualization pyspark-jobs security-headers async-concurrency memory-leak-hunting google-sheets-automation pdf-toolkit xlsx-spreadsheets slack-apps cli-tool-building

Python skills FAQ

What is the best Claude Code skill for Python?

Start with Modern Python: uv, ruff, strict types, one pyproject.toml. Then add Python Profiling and pytest Suites, which cover the next most common Python requests.

How do I install all 61 Python skills at once?

Pass every name to the installer in one command: curl -fsSL https://claudeskills.page/install.sh | sh -s -- python-modern python-profiling pytest-suites django-apps fastapi-service jupyter-notebooks pandas-analysis polars-dataframes agent-sdk-builder mcp-server-builder statusline-scripts tdd-loop htmx-hypermedia flask-apps benchmark-testing flaky-test-triage property-based-testing pulumi-iac duckdb-analytics huggingface-transformers llm-app-builder structured-outputs n-plus-one-queries docx-documents pptx-decks sentry-error-tracking raspberry-pi-projects reproducible-research unit-testing sqlalchemy-orm airflow-dags csv-cleaning streamlit-apps input-validation notion-api temporal-workflows passkeys-webauthn resilience-patterns dead-code-removal dependency-upgrades bash-scripting go-idioms julia-scientific regex-crafting api-testing fuzz-testing mutation-testing testcontainers opentelemetry azure-functions sqlite-local-first data-visualization pyspark-jobs security-headers async-concurrency memory-leak-hunting google-sheets-automation pdf-toolkit xlsx-spreadsheets slack-apps cli-tool-building. Add --project to install them into the current repository's .claude/skills/ folder so your team gets them too.

Do these Python skills work outside Claude Code?

Yes. Each skill uses only the portable Agent Skills frontmatter, so the same folder works on claude.ai, through the Claude API and in the Agent SDK. Skills that run bundled scripts need an environment with code execution.

esc