python-coder

Modern Python 3.12+ development with uv, ruff, pydantic, FastAPI, async patterns, and production-ready practices.

⭐13stars🔀0forks📁View on GitHub🕐Updated Jan 3, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill accelerates modern Python 3.12+ development by integrating high-performance tools like uv and ruff. It enables the creation of production-ready, type-safe codebases using asynchronous patterns, FastAPI, and strict architectural standards to ensure scalability and maintainability.

Use Cases

  • Rapid Project Initialization: Quickly bootstrap new Python projects with optimized pyproject.toml configurations, uv package management, and ruff linting rules.
  • Modernizing Legacy Code: Upgrade older Python scripts to utilize version 3.12+ features such as structural pattern matching, modern type hints, and improved async/await syntax.
  • Building Scalable Web APIs: Develop robust FastAPI services with Pydantic data validation, ensuring high performance and comprehensive error handling.
  • Enforcing Code Quality: Automatically apply PEP 8 standards, strict type checking with pyright, and maintain high test coverage using pytest.
namepython-coder
descriptionModern Python 3.12+ development with uv, ruff, and production-ready practices. Routes to specialized skills for frameworks and testing.
allowed-toolsRead, Write, Edit, Grep, Glob, Bash

Python-Coder

Modern Python 3.12+ development patterns.

Skill Use When
fastapi-coder Building FastAPI services
django-coder Django web applications
pytest-coder Writing comprehensive tests
python-debugger Debugging Python code

Modern Tooling Quick Reference

Package Management (uv)

# Project setup
uv init my-project
uv add fastapi pydantic
uv add --dev pytest ruff mypy

# Run commands
uv run python main.py
uv run pytest

Code Quality (ruff)

# pyproject.toml
[tool.ruff]
line-length = 100
target-version = "py312"

[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]

[tool.ruff.format]
quote-style = "double"

Type Checking (pyright/mypy)

[tool.pyright]
pythonVersion = "3.12"
typeCheckingMode = "strict"

Python 3.12+ Patterns

Pattern Matching

match command:
    case {"action": "create", "item": item}:
        create(item)
    case {"action": "delete", "id": int(id)}:
        delete(id)
    case _:
        raise ValueError("Unknown command")

Modern Async

async def fetch_all(urls: list[str]) -> list[dict]:
    async with aiohttp.ClientSession() as session:
        tasks = [fetch(session, url) for url in urls]
        return await asyncio.gather(*tasks)

Type Hints

from typing import TypeVar, Protocol

T = TypeVar("T")

class Repository(Protocol[T]):
    def get(self, id: int) -> T | None: ...
    def save(self, entity: T) -> T: ...

Behavioral Standards

  • PEP 8 + ruff formatting
  • Type hints throughout
  • Tests with pytest (>90% coverage target)
  • Prefer stdlib before external deps
  • Comprehensive error handling with custom exceptions