Core Python development concepts, idioms, best practices, and language features. Covers Python 3.10+ features, type hints, async/await, and Pythonic patterns. For running scripts, see uv-run. For project setup, see uv-project-management. Use when user mentions Python, type hints, async Python, decorators, context managers, or writing Pythonic code.
View on GitHublaurigates/claude-plugins
python-plugin
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/laurigates/claude-plugins/blob/main/python-plugin/skills/python-development/SKILL.md -a claude-code --skill python-developmentInstallation paths:
.claude/skills/python-development/# Python Development
Core Python language concepts, idioms, and best practices.
## Core Expertise
- **Python Language**: Modern Python 3.10+ features and idioms
- **Best Practices**: Pythonic code, design patterns, SOLID principles
- **Debugging**: Interactive debugging and profiling techniques
- **Performance**: Optimization strategies and profiling
- **Async Programming**: async/await patterns and asyncio
## Modern Python Features (3.10+)
### Type Hints
```python
# Modern syntax (Python 3.10+)
def process_items(
items: list[str], # Not List[str]
mapping: dict[str, int], # Not Dict[str, int]
optional: str | None = None, # Not Optional[str]
) -> tuple[bool, str]: # Not Tuple[bool, str]
"""Process items with modern type hints."""
return True, "success"
# Type aliases
type UserId = int
type UserDict = dict[str, str | int]
def get_user(user_id: UserId) -> UserDict:
return {"id": user_id, "name": "Alice"}
```
### Pattern Matching (3.10+)
```python
def handle_command(command: dict) -> str:
match command:
case {"action": "create", "item": item}:
return f"Creating {item}"
case {"action": "delete", "item": item}:
return f"Deleting {item}"
case {"action": "list"}:
return "Listing items"
case _:
return "Unknown command"
```
### Structural Pattern Matching
```python
def process_response(response):
match response:
case {"status": 200, "data": data}:
return process_success(data)
case {"status": 404}:
raise NotFoundError()
case {"status": code} if code >= 500:
raise ServerError(code)
```
## Python Idioms
### Context Managers
```python
# File handling
with open("file.txt") as f:
content = f.read()
# Custom context manager
from contextlib import contextmanager
@contextmanager
def database_connection():
conn = create_connection()