Agent skill

Python Pro

by Jeffallan in Jeffallan/claude-skills

Writes type-annotated Python 3.11+ with async patterns, dataclasses and pytest suites, validated with mypy in strict mode, black and ruff.

MITAuto-check passedDevelopment

Install Python Pro

skills CLI
$ npx skills add Jeffallan/claude-skills --skill python-pro -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Jeffallan/claude-skills python-pro --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/python-pro .claude/skills/python-pro && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
python-pro
GitHub stars
12k
Token cost
~1.6k tokens
SKILL.md length
385 words
Files
6 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

Writes type-annotated Python 3.11+ with async patterns, dataclasses and pytest suites, validated with mypy in strict mode, black and ruff.

  • Works in 5 steps: Analyze codebase — Review structure,… → Design interfaces — Define protocols,… → Implement — Write Pythonic code with… → …
  • Adding type hints to an untyped Python module and getting mypy strict to pass
  • SKILL.md covers When to Use This Skill, Core Workflow, Reference Guide and Constraints, plus 3 more sections
  • Calls mypy

What it does

The agent reviews code structure, dependencies, type coverage and tests, defines protocols, dataclasses and type aliases, implements with full type hints and error handling, writes a pytest suite aiming for coverage above 90%, and validates with mypy --strict, black and ruff. Each kind of failure has its own loop: fix reported type errors and re-run, debug assertions and update fixtures until the tests pass, and apply auto-fixes before validating again.

The rules call for type hints on all signatures and class attributes, Google-style docstrings, X | None over Optional, async/await for I/O, dataclasses, context managers and pathlib. They rule out mutable default arguments, bare except clauses, hardcoded secrets and ignored mypy errors. Reference files cover the type system, asyncio and task groups, the standard library, pytest, and packaging with Poetry and pyproject.toml.

When your agent uses it

  • Adding type hints to an untyped Python module and getting mypy strict to pass
  • Converting blocking I/O code to async/await
  • Building a pytest suite with fixtures, mocking and parametrize
  • Packaging a Python project with Poetry and pyproject.toml
  • Replacing hand-written __init__ methods with dataclasses

Example prompts

  • “Add type annotations to the billing package and make mypy --strict pass.”
  • “Rewrite the downloader to use asyncio with a task group instead of threads.”
  • “Write pytest tests for the config loader with fixtures and parametrized cases.”
  • “Set up pyproject.toml with Poetry, ruff and black for this library.”

Requirements

  • Python 3.11 or later
  • `mypy`, `black`, `ruff` and `pytest`

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Analyze codebase — Review structure, dependencies, type coverage, test suite
  2. Design interfaces — Define protocols, dataclasses, type aliases
  3. Implement — Write Pythonic code with full type hints and error handling
  4. Test — Create comprehensive pytest suite with >90% coverage
  5. Validate — Run mypy --strict, black, ruff

What it can do on your machine

Read from SKILL.md and the folder at commit 1be15d8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • mypy

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • synergetic.solutions
    • jeffallan.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Python Pro loads about 1.6k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 105 tokens; SKILL.md has 385 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~105
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Jeffallan/claude-skills at commit 1be15d8, republished under its MIT licence (© Jeffallan). 385 words, ~1,565 tokens.

Download SKILL.mdSave it as .claude/skills/python-pro/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
python-pro
description
Use when building Python 3.11+ applications requiring type safety, async programming, or robust error handling. Generates type-annotated Python code, configures mypy in strict mode, writes pytest test suites with fixtures and mocking, and validates code with black and ruff. Invoke for type hints, async/await patterns, dataclasses, dependency injection, logging configuration, and structured error handling.
license
MIT
metadata.author
https://github.com/Jeffallan
metadata.company
https://synergetic.solutions
metadata.version
1.1.0
metadata.domain
language
metadata.triggers
Python development, type hints, async Python, pytest, mypy, dataclasses, Python best practices, Pythonic code
metadata.role
specialist
metadata.scope
implementation
metadata.output-format
code
metadata.related-skills
fastapi-expert, devops-engineer

Python Pro

Modern Python 3.11+ specialist focused on type-safe, async-first, production-ready code.

When to Use This Skill

  • Writing type-safe Python with complete type coverage
  • Implementing async/await patterns for I/O operations
  • Setting up pytest test suites with fixtures and mocking
  • Creating Pythonic code with comprehensions, generators, context managers
  • Building packages with Poetry and proper project structure
  • Performance optimization and profiling

Core Workflow

  1. Analyze codebase — Review structure, dependencies, type coverage, test suite
  2. Design interfaces — Define protocols, dataclasses, type aliases
  3. Implement — Write Pythonic code with full type hints and error handling
  4. Test — Create comprehensive pytest suite with >90% coverage
  5. Validate — Run mypy --strict, black, ruff
    • If mypy fails: fix type errors reported and re-run before proceeding
    • If tests fail: debug assertions, update fixtures, and iterate until green
    • If ruff/black reports issues: apply auto-fixes, then re-validate

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Type Systemreferences/type-system.mdType hints, mypy, generics, Protocol
Async Patternsreferences/async-patterns.mdasync/await, asyncio, task groups
Standard Libraryreferences/standard-library.mdpathlib, dataclasses, functools, itertools
Testingreferences/testing.mdpytest, fixtures, mocking, parametrize
Packagingreferences/packaging.mdpoetry, pip, pyproject.toml, distribution

Constraints

MUST DO
  • Type hints for all function signatures and class attributes
  • PEP 8 compliance with black formatting
  • Comprehensive docstrings (Google style)
  • Test coverage exceeding 90% with pytest
  • Use X | None instead of Optional[X] (Python 3.10+)
  • Async/await for I/O-bound operations
  • Dataclasses over manual init methods
  • Context managers for resource handling
Show full SKILL.md (152 more words)Show less
MUST NOT DO
  • Skip type annotations on public APIs
  • Use mutable default arguments
  • Mix sync and async code improperly
  • Ignore mypy errors in strict mode
  • Use bare except clauses
  • Hardcode secrets or configuration
  • Use deprecated stdlib modules (use pathlib not os.path)

Code Examples

Type-annotated function with error handling
python
from pathlib import Path

def read_config(path: Path) -> dict[str, str]:
    """Read configuration from a file.

    Args:
        path: Path to the configuration file.

    Returns:
        Parsed key-value configuration entries.

    Raises:
        FileNotFoundError: If the config file does not exist.
        ValueError: If a line cannot be parsed.
    """
    config: dict[str, str] = {}
    with path.open() as f:
        for line in f:
            key, _, value = line.partition("=")
            if not key.strip():
                raise ValueError(f"Invalid config line: {line!r}")
            config[key.strip()] = value.strip()
    return config
Dataclass with validation
python
from dataclasses import dataclass, field

@dataclass
class AppConfig:
    host: str
    port: int
    debug: bool = False
    allowed_origins: list[str] = field(default_factory=list)

    def __post_init__(self) -> None:
        if not (1 <= self.port <= 65535):
            raise ValueError(f"Invalid port: {self.port}")
Async pattern
python
import asyncio
import httpx

async def fetch_all(urls: list[str]) -> list[bytes]:
    """Fetch multiple URLs concurrently."""
    async with httpx.AsyncClient() as client:
        tasks = [client.get(url) for url in urls]
        responses = await asyncio.gather(*tasks)
        return [r.content for r in responses]
pytest fixture and parametrize
python
import pytest
from pathlib import Path

@pytest.fixture
def config_file(tmp_path: Path) -> Path:
    cfg = tmp_path / "config.txt"
    cfg.write_text("host=localhost\nport=8080\n")
    return cfg

@pytest.mark.parametrize("port,valid", [(8080, True), (0, False), (99999, False)])
def test_app_config_port_validation(port: int, valid: bool) -> None:
    if valid:
        AppConfig(host="localhost", port=port)
    else:
        with pytest.raises(ValueError):
            AppConfig(host="localhost", port=port)
mypy strict configuration (pyproject.toml)
toml
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true

Clean mypy --strict output looks like:

Success: no issues found in 12 source files

Any reported error (e.g., error: Function is missing a return type annotation) must be resolved before the implementation is considered complete.

Output Templates

When implementing Python features, provide:

  1. Module file with complete type hints
  2. Test file with pytest fixtures
  3. Type checking confirmation (mypy --strict passes)
  4. Brief explanation of Pythonic patterns used

Knowledge Reference

Python 3.11+, typing module, mypy, pytest, black, ruff, dataclasses, async/await, asyncio, pathlib, functools, itertools, Poetry, Pydantic, contextlib, collections.abc, Protocol

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

© Jeffallan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/python-pro of Jeffallan/claude-skills.

  • SKILL.md
  • references/async-patterns.md
  • references/packaging.md
  • references/standard-library.md
  • references/testing.md
  • references/type-system.md

Open the folder on GitHubat commit 1be15d8

Compare with similar skills

Python Pro next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Python Pro compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Python Pro this skillJeffallan/claude-skills12k—~1.6kAutomated safety check: PassMIT
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence
Modern Pythonantoinebou12/uml-mcp105—~1kAutomated safety check: PassMIT
Specx Project Toolingmaksimzayats/specx202—~965Automated safety check: PassMIT
Pythonalinaqi/maggy707—~1.1kAutomated safety check: PassMIT
Pythonericrisco/rsc-harness174—~3.8kAutomated safety check: PassMIT

Similar skills

  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Modern Python

    antoinebou12/uml-mcp

    Modern Python tooling and best practices using uv, ruff, ty, and pytest.

    105 GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check passed
  • Specx Project Tooling

    maksimzayats/specx

    Add strict Python project tooling for a specx service. An agent skill from maksimzayats/specx.

    202 GitHub stars~965 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Python

    alinaqi/maggy

    Python development with ruff, mypy, pytest - TDD and type safety

    707 GitHub stars~1.1k tokensUpdated 15 days ago
    DevelopmentAuto-check passed
  • Python

    ericrisco/rsc-harness

    A skill your agent uses when the task is Python itself, in any framework or none: PEP 695 generics, mypy --strict typing, dataclass/Protocol/TypedDict/Enum choices, asyncio.TaskGroup, stdlib idioms…

    174 GitHub stars~3.8k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Check

    av1155/houndarr

    Run Houndarr's full quality gate (ruff lint, ruff format check, mypy, bandit, pytest) and report results in a single table.

    292 GitHub stars~366 tokensUpdated 4 days ago
    Testing & QAAuto-check passed

More from Jeffallan/claude-skills

All 58 skills in this repo
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • CLI Developer

    Jeffallan/claude-skills

    Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.

    12k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Kubernetes Specialist

    Jeffallan/claude-skills

    Creates and checks Kubernetes manifests, Helm charts, RBAC and network policies, and helps debug pod problems, with kubectl checks and rollback steps.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Laravel Specialist

    Jeffallan/claude-skills

    Builds Laravel 10+ applications with Eloquent models, Sanctum authentication, Horizon queues, API resources and Livewire components, tested with Pest or PHPUnit.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Pandas Pro

    Jeffallan/claude-skills

    Handles pandas DataFrame work: cleaning, merging, groupby aggregation, pivots, time-series resampling and memory tuning, with checks on dtypes, shapes and nulls.

    12k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Apache Spark Engineer

    Jeffallan/claude-skills

    Guides writing and tuning Apache Spark jobs: DataFrame and RDD code, Spark SQL, partitioning, caching, shuffle tuning and structured streaming.

    12k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed

Categories

Questions about Python Pro

What does Python Pro do?

Writes type-annotated Python 3.11+ with async patterns, dataclasses and pytest suites, validated with mypy in strict mode, black and ruff. The agent reviews code structure, dependencies, type coverage and tests, defines protocols, dataclasses and type aliases, implements with full type hints and error handling, writes a pytest suite aiming for coverage above 90%, and validates with mypy --strict, black and ruff. Each kind of failure has its own loop: fix reported type errors and re-run, debug assertions and update fixtures until the tests pass, and apply auto-fixes before validating again.

When should I use Python Pro?

Python Pro fits situations like: adding type hints to an untyped Python module and getting mypy strict to pass; converting blocking I/O code to async/await; building a pytest suite with fixtures, mocking and parametrize; packaging a Python project with Poetry and pyproject.toml.

How do I install Python Pro in Claude Code?

Run `npx skills add Jeffallan/claude-skills --skill python-pro -a claude-code`. Or copy the skill folder (skills/python-pro in Jeffallan/claude-skills) into .claude/skills/python-pro in your project. Claude Code loads it when a task matches its description.

How do I install Python Pro in Codex?

Run `npx skills add Jeffallan/claude-skills --skill python-pro -a codex`. Or copy the skill folder (skills/python-pro in Jeffallan/claude-skills) into .agents/skills/python-pro in your project. Codex loads it when a task matches its description.

Can I use Python Pro in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jeffallan/claude-skills --skill python-pro -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-pro, .gemini/skills/python-pro, .github/skills/python-pro and .opencode/skills/python-pro in your project.

What does Python Pro need to run?

Going by SKILL.md and its folder, Python Pro needs the command-line tools its instructions call (mypy). Our summary lists: Python 3.11 or later; `mypy`, `black`, `ruff` and `pytest`.

Does Python Pro access the network?

SKILL.md names 3 domains. As links in the text: github.com, synergetic.solutions and jeffallan.github.io. This is read from the text; nothing was executed.

Is Python Pro safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Python Pro use?

Python Pro is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Python Pro use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 11k tokens, read only when the agent opens those files.

What are the alternatives to Python Pro?

Skills that share tags, products or a category with Python Pro: Kedro Babysit (kedro-org/kedro, 11k stars), Modern Python (antoinebou12/uml-mcp, 105 stars), Specx Project Tooling (maksimzayats/specx, 202 stars) and Python (alinaqi/maggy, 707 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Python Pro?

Jeffallan (a GitHub user) maintains it in Jeffallan/claude-skills, which has 11,788 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 3, 2026.

Source: Jeffallan/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.