Development
python-standards - Claude MCP Skill
Modern Python development with uv, ruff, mypy, and pytest. Use when: - Writing or reviewing Python code - Setting up Python projects or pyproject.toml - Choosing dependency management (uv, poetry, pip) - Configuring linting, formatting, or type checking - Organizing Python packages Keywords: Python, pyproject.toml, uv, ruff, mypy, pytest, type hints, virtual environment, lockfile, package structure
SEO Guide: Enhance your AI agent with the python-standards tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to modern python development with uv, ruff, mypy, and pytest. use when: - writing or reviewing python c... Download and configure this skill to unlock new capabilities for your AI workflow.
Documentation
SKILL.md# Python Standards
Modern Python with uv + ruff + mypy + pytest. All config in pyproject.toml.
## Toolchain
| Tool | Purpose |
|------|---------|
| **uv** | Dependencies + virtual envs (lockfile: `uv.lock`) |
| **ruff** | Linting + formatting (replaces black, isort, flake8) |
| **mypy** | Type checking (strict mode) |
| **pytest** | Testing + coverage |
```bash
# Setup
uv init && uv add <deps> && uv sync
# Daily workflow
uv run ruff check . --fix && uv run ruff format .
uv run mypy . && uv run pytest
```
## Type Hints
**All functions and classes must have explicit type hints:**
```python
def fetch_user(user_id: str) -> User | None:
"""Fetch user by ID."""
...
def process_items(items: list[Item]) -> dict[str, int]:
...
```
**mypy strict mode:**
```toml
[tool.mypy]
strict = true
disallow_untyped_defs = true
disallow_any_generics = true
```
## Package Structure
Feature-based, not layer-based:
```
src/myproject/
users/ # Domain
__init__.py # Public API: __all__ = ['User', 'UserService']
models.py
services.py
orders/ # Another domain
shared/ # Cross-cutting concerns
```
## Error Handling
**Catch specific exceptions with context:**
```python
try:
result = parse_config(path)
except FileNotFoundError:
logger.warning(f"Config not found: {path}")
return defaults
except json.JSONDecodeError as e:
raise ConfigError(f"Invalid JSON in {path}") from e
```
Never: bare `except:`, silent swallowing, `except Exception`.
## pyproject.toml
Single source of truth (no setup.py, requirements.txt):
```toml
[project]
name = "myproject"
version = "1.0.0"
requires-python = ">=3.11"
dependencies = ["httpx", "pydantic"]
[project.optional-dependencies]
dev = ["pytest", "mypy", "ruff"]
[tool.ruff]
select = ["E", "W", "F", "I", "B", "UP", "SIM", "S", "ANN"]
line-length = 88
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = ["--cov=src", "--cov-fail-under=85"]
```
## Anti-Patterns
- `Any` without documented justification
- Layer-based folders (`/controllers`, `/models`, `/views`)
- Circular imports
- Legacy tools (pip, black+isort, flake8)
- Multiple config files
- `noqa` comments without justification
## References
- [testing-patterns.md](references/testing-patterns.md) - pytest, fixtures, parametrize
- [ruff-config.md](references/ruff-config.md) - Complete ruff rule configurationSignals
Information
- Repository
- phrazzld/claude-config
- Author
- phrazzld
- Last Sync
- 3/2/2026
- Repo Updated
- 3/1/2026
- Created
- 1/18/2026
Reviews (0)
No reviews yet. Be the first to review this skill!
Related Skills
CLAUDE
Claude-Mem: AI Development Instructions
cursorrules
CrewAI Development Rules
firecrawl-build-interact
Integrate Firecrawl `/interact` into product code for dynamic pages and browser actions after scraping. Use when a feature needs clicks, form fills, pagination, authentication-aware flows, or other multi-step interactions that plain `/scrape` cannot complete.
firecrawl-build
Integrate Firecrawl into application code whenever a product, agent, or workflow needs web data inside the app — web search, live search results, page scraping, structured extraction, or browser interaction. Use when building any feature that needs data from the web in code, even if the user does not mention Firecrawl explicitly and only describes wanting web data, website content, search, scraping, or interaction in an application. Trigger for Firecrawl requests, "fire girl" shorthand, and generic app-level web-data needs that should map to `/scrape`, `/search`, or `/interact`. Do not use this skill for one-off terminal-only web tasks during the current session; use `firecrawl/cli` for those.
Related Guides
Bear Notes Claude Skill: Your AI-Powered Note-Taking Assistant
Learn how to use the bear-notes Claude skill. Complete guide with installation instructions and examples.
OpenAI Whisper API Claude Skill: Complete Guide to AI-Powered Audio Transcription
Learn how to use the openai-whisper-api Claude skill. Complete guide with installation instructions and examples.
Mastering the Oracle CLI: A Complete Guide to the Claude Skill for Database Professionals
Learn how to use the oracle Claude skill. Complete guide with installation instructions and examples.