python_pro

Writes type-safe, async-first Python 3.11+ code with pytest coverage and mypy validation.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill python-pro-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python_pro
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/python_pro
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill python-pro-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Python codebases often suffer from missing type annotations, inconsistent formatting, blocking I/O patterns, and insufficient test coverage, leading to runtime bugs and maintenance debt. This Skill enforces a disciplined workflow that produces idiomatic, type-safe, production-grade Python 3.11+ code with verified quality gates. ## Core Features & Use Cases - Type-Safe Implementation: Generates fully annotated code using modern syntax like X | None unions, dataclasses, Protocols, and generics that passes mypy --strict. - Async & Testing Patterns: Implements async/await with asyncio or anyio for I/O-bound work, plus pytest suites with fixtures, mocking, and parametrization targeting over 90% coverage. - Modern Tooling Workflow: Standardizes on uv for package management, Ruff for linting and formatting, and pyproject.toml for unified configuration. - Use Case: When building a new data pipeline service, invoke this Skill to scaffold typed modules, async fetchers, structured logging with structlog, and a complete pytest suite that passes Ruff and mypy checks. ## Quick Start Ask the agent to write a type-safe async Python module with pytest tests that passes mypy strict mode and Ruff checks.

Frequently Asked Questions about python_pro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write type-safe Python code that passes mypy strict mode?

Annotate all function signatures and class attributes, use `X | None` instead of Optional, and prefer Protocols and generics for abstractions. Run `mypy --strict` after implementation and resolve every reported error rather than ignoring them.

How to structure async Python code with asyncio?

Use async/await for all I/O-bound operations and avoid mixing sync and async calls improperly. Task groups in Python 3.11+ or anyio provide structured concurrency for managing concurrent coroutines safely.

What is the difference between Ruff and Black for Python formatting?

Ruff is a single Rust-based tool that replaces Flake8, isort, and Black, handling both linting and formatting via `ruff check` and `ruff format`. It is significantly faster and consolidates configuration into pyproject.toml.

Does pytest support mocking and fixtures for test suites?

Yes, pytest provides built-in fixtures for setup and teardown, and pytest-mock wraps unittest.mock for patching dependencies. Combined with parametrize, these tools help achieve coverage above 90 percent.

When should I use dataclasses instead of regular Python classes?

Use dataclasses whenever a class primarily stores data, since they auto-generate __init__, __repr__, and equality methods. Avoid mutable default arguments and prefer field(default_factory=...) for mutable defaults.