# Python Pro

Use when building Python 3.11+ applications requiring type safety, async programming...

- Repository: https://github.com/Jeffallan/claude-skills (12164 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Jeffallan/claude-skills --skill python-pro -g -a claude-code -y`
Codex: `npx skills add Jeffallan/claude-skills --skill python-pro -g -a codex -y`
Cursor: `npx skills add Jeffallan/claude-skills --skill python-pro -g -a cursor -y`
Gemini CLI: `npx skills add Jeffallan/claude-skills --skill python-pro -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Jeffallan/claude-skills`

## 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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

| Topic | Reference | Load When |
|-------|-----------|-----------|
| Type System | `references/type-system.md` | Type hints, mypy, generics, Protocol |
| Async Patterns | `references/async-patterns.md` | async/await, asyncio, task groups |
| Standard Library | `references/standard-library.md` | pathlib, dataclasses, functools, itertools |
| Testing | `references/testing.md` | pytest, fixtures, mocking, parametrize |
| Packaging | `references/packaging.md` | poetry, pip, pyproject.toml, distribution |

## Constraints

The rest: https://github.com/Jeffallan/claude-skills/blob/HEAD/skills/python-pro/SKILL.md
