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
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
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
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
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.
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.
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.
Engineering Workflow 3
TDD Loop
See it fail, make it pass, then clean it up
Makes Claude work test-first for real: it writes a test list, runs every new test to confirm it fails on the assertion rather than a typo, writes the least code to pass, and refactors only on green. It picks the next test deliberately, checks coverage on touched files, and sabotages key code paths to prove the tests can actually catch regressions.
Dead Code Removal
Delete unused code with two kinds of proof
Claude configures the right analyzer for the stack with real entry points, triages candidates against known false-positive patterns such as dynamic imports, framework conventions and external callers, and requires a second signal like search, coverage or runtime logs before deleting. Removals land in small batches by kind with the full build and test gate after each, and confirmed false positives go into analyzer config.
Dependency Upgrades
Major version bumps without the Friday surprise
Claude upgrades in risk groups instead of bumping everything at once: a green baseline first, patch and minor updates batched, each major handled alone with its migration guide turned into a checklist, official codemods committed separately, and the lockfile changed only where intended. It also sets Renovate or Dependabot policies so routine updates merge themselves and majors wait for a plan.
Frontend 1
Backend & APIs 4
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.
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.
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.
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.
Languages 5
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.
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.
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.
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.
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.
Testing 9
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.
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.
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.
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.
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.
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.
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.
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.
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.
DevOps & SRE 2
Pulumi IaC
Real code for infra, with previews you actually read
Claude structures Pulumi projects by lifecycle, keeps secrets in encrypted config or ESC, and wraps reusable infrastructure in ComponentResources with stable type tokens. It handles Outputs without string bugs, adds aliases before renaming anything, protects stateful resources, and reads every preview for replaces and deletes before asking you to approve an update.
OpenTelemetry
One request, one connected trace
Claude starts with zero-code instrumentation and a local Jaeger so output is visible immediately, then adds manual spans around business operations, propagates W3C context through HTTP and message queues, and links logs to traces. Telemetry goes through a Collector with memory limits, attribute scrubbing and parent-based sampling, verified with one end-to-end trace.
Databases 3
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.
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.
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.
Data Engineering 8
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.
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.
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.
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.
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.
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.
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.
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.
AI Engineering 3
Hugging Face Transformers
Pinned models, right templates, correct padding
Claude uses the Hugging Face stack without the classic silent bugs. It pins model revisions, loads safetensors in an explicit dtype and device map, formats prompts with the model's own chat template, pads left for batched generation and decodes only new tokens. Datasets are mapped in batches, classifiers trained with Trainer, and every pipeline is checked against known-good outputs.
LLM App Builder
Ship LLM features with timeouts, streams, and budgets
Claude builds LLM features the way a production team would: one client module with timeouts and typed retries, streaming for anything a user waits on, a model picked by a small eval instead of reputation, and per-request cost logged from the first deploy. Every stop reason, including truncation and refusal, gets explicit handling and a test.
Structured Outputs
Schema-valid JSON, then checks on what it says
Claude replaces prompt-and-regex JSON with native constrained decoding: a JSON schema output format or strict tool generated from Pydantic or Zod models. It designs schemas with nullable fields and escape-value enums so the model never invents data, checks stop reasons before parsing, validates meaning as well as shape, and caps repair retries before routing to a human.
Security 3
Input Validation
Safe sinks first, schemas second, payload tests always
Claude stops relying on character stripping and fixes injection where it happens: bound parameters for SQL and allowlists for identifiers, context-specific encoding and sanitizers for HTML, resolved-IP checks for user-supplied URLs, resolved-path checks for file access, and argument arrays for commands. Boundary schemas in Zod or Pydantic add a second layer, and every fix ships with a payload test.
Passkeys and WebAuthn
Phishing-resistant sign-in with a recovery path to match
Claude builds passkey sign-in the way identity teams ship it: an RP ID chosen for the long term, single-use server-side challenges, verified origins, a credential table with counters, transports, and backup flags, and conditional UI so passkeys appear in autofill. It also designs fallback and account recovery so an email link does not quietly undo the phishing resistance.
Security Headers
Strict CSP shipped without breaking production
Claude ships a nonce-based CSP with strict-dynamic through a Report-Only phase instead of pasting a policy that breaks checkout. It configures HSTS in safe steps, replaces X-Frame-Options with frame-ancestors, fixes CORS that reflects origins with credentials, and knows the nginx and Next.js traps. A bundled checker grades any URL you own and fails CI on regressions.
Performance 4
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.
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.
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.
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.
Documents & Files 5
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.
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.
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.
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.
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.
Integrations 3
Sentry Error Tracking
Readable stack traces, quiet quotas, useful alerts
Guides Claude through a Sentry setup that actually helps on-call: every event tagged with release and environment, source maps uploaded from CI with the auth token kept secret, errors kept at full rate while traces and replays are sampled, and noise filtered at the SDK before it burns quota. It finishes with alert rules for new and regressed issues and a weekly triage routine.
Notion API
Notion sync scripts that page, pace and chunk
Gives Claude the Notion details that usually cause silent failures: pinned API versions and the newer data source model, cursor pagination on every list, property write shapes, the 100-block and 2,000-character limits, and Retry-After backoff for 429s. Sync jobs pull incrementally by last_edited_time, detect trashed pages, and test against a duplicated database before touching the real one.
Slack Apps
Bolt apps that ack in time and ask for few scopes
Claude builds Slack integrations from a committed app manifest, acknowledges every command, action and modal submission inside the 3-second window before doing real work, and keeps scopes minimal. It knows Block Kit limits, trigger_id expiry, event retry headers and rate-limit tiers, and wires OAuth installation stores keyed by team for apps installed beyond one workspace.
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.