Python Pro
Use when building Python 3.11+ applications requiring type safety, async programming, or robust error handling.
Before & after
Same prompt, same agent — the only difference is the skill.
I can write Python code for you. I'll make sure it works correctly and is reasonably well-structured. For type hints, I can add basic type annotations to function arguments and return values. For testing, I'll write some test cases to make sure the code works. If you have specific requirements like async support or error handling patterns, I can include those too. Just let me know what you're building and I'll write the code with best practices in mind.
PYTHON PRO: PRODUCTION CHECKLIST
CODE STYLE
✓ Type hints: strict mode enabled (mypy --strict on all files)
✓ All functions annotated: params + return types
✓ Dataclasses used for models (frozen=True for immutable)
✓ Black formatting applied (line length 88)
✓ Ruff checks pass (all categories)
ASYNC PATTERNS
✓ Async functions: use async/await, no blocking calls in event loop
✓ Dependency injection: accept clients as params, never global singletons
✓ Error handling: custom exceptions (inherit from base exception class)
✓ Logging: structured JSON logs (include context, trace_id)
TEST SUITE
✓ Pytest fixtures: isolated test database, mock clients
✓ Mocking: external APIs mocked (requests-mock), no live calls
✓ Coverage: 85% minimum, gaps flagged in CI
✓ Parametrized tests: test multiple inputs in 1 test function
✓ Slow tests: marked with @pytest.mark.slow, skipped in fast mode
SCRIPT EXAMPLE OUTPUT
# models.py
@dataclass(frozen=True)
class User:
id: int
name: str
email: str
async def fetch_user(user_id: int, db: Database) -> User:
"""Fetch user from database. Raises UserNotFoundError if missing."""
result = await db.query("SELECT * FROM users WHERE id = ?", user_id)
if not result:
raise UserNotFoundError(f"User {user_id} not found")
return User(**result)
# tests/test_models.py
@pytest.mark.asyncio
async def test_fetch_user_success(mock_db):
mock_db.query.return_value = {"id": 1, "name": "Alice", "email": "alice@x.com"}
user = await fetch_user(1, mock_db)
assert user.id == 1About this skill
name: python-pro description: Use when Use when building Python 3.11+ applications requiring type safety, async programming, or robust error handling.
Python Pro
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.
What you get
- Public GitHub repo
- the skills/python-pro folder with SKILL.md and references.
Customize your output
- Fork the repo and extend the skill's reference files for your own stack conventions.
Example output
Activates on a matching request (e.g. building or reviewing Python Pro code) and can chain with other skills in the pack.
Best for
Full-stack developers and engineering teams using Claude Code.
SKILL.md preview
---
name: python-pro
description: Use this skill when building Python 3.11+ applications that need type safety, async programming, or robust error handling.
version: 1.0.0
category: Development / Languages
author: AgentVolt
license: proprietary
tags:
- development
- languages
---
# Python Pro
Writes type-annotated, strictly-checked Python with proper async patterns, structured error handling, and a real test suite instead of untyped scripts.
## When to use
… (sign up to view the full skill)More development skills
View all Development skills →SQL Pro
Optimizes SQL queries, designs database schemas, and troubleshoots performance issues.
Csharp Developer
Use when building C# applications with .NET 8+, ASP.NET Core APIs, or Blazor web apps.
Rust Engineer
Writes, reviews, and debugs idiomatic Rust code with memory safety and zero-cost abstractions.
PHP Pro
Use when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks.