python-patterns · davila7 — Claude Code skill: what it does, how to install
Architectural principles for Python in Claude Code: framework trade-offs, async versus sync decisions, project layouts, and Pydantic validation.
npx claude-code-templates@latest --skill development/python-patternsWhat python-patterns does
This skill guides Claude Code to reason through Python system design rather than pasting canned snippets. It directs the assistant to pick frameworks intentionally: Django for apps needing a built-in admin, FastAPI for microservices, or Flask for lightweight scripts.
Execution models stay strictly segregated. The guidance pairs I/O-bound workflows with async drivers such as httpx and asyncpg. CPU-bound jobs remain synchronous because mixing blocking calls into asynchronous loops stalls execution.
The rules cover directory layouts grouped by feature or layer, Pydantic schemas, and background processing options spanning Celery, ARQ, and FastAPI background tasks. The assistant prompts for team preferences whenever the requirements leave room for ambiguity.
What it helps with
- choose between FastAPI, Django, and Flask based on workload
- separate async I/O from CPU-bound synchronous logic
- organize backend repositories by feature or technical layer
- select background job runners from in-process tasks to distributed queues
Example prompts for the agent
- Organize our new FastAPI service by domain feature instead of technical layers.
- Help me decide between Celery and ARQ for handling delayed tasks.
- Refactor this synchronous database script to use asyncpg without blocking the loop.
How to install python-patterns
1claude-code-templates
npx claude-code-templates@latest --skill development/python-patterns2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill python-patterns -a claude-code3Manually: put the files in place
~/.claude/skills/python-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/python-patterns/
Manually: put the files in place
.agents/skills/python-patterns/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/python-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates python-patterns2Manually: put the files in place
.github/skills/python-patterns/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/python-patternsManually: put the files in place
.devin/skills/python-patterns/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about python-patterns
How do I install python-patterns in Claude Code?
Run npx claude-code-templates@latest --skill development/python-patterns in your terminal.
What does the python-patterns skill do?
It provides architectural decision trees for Python development. Claude Code uses it to evaluate framework trade-offs, async libraries, typing discipline, and error handling conventions.
When does the skill favor async over synchronous Python?
It prescribes async exclusively for external I/O operations and high-concurrency network endpoints. Heavy CPU computations are kept synchronous with multiprocessing to avoid locking the runtime.
Similar skills
All skills for Backend and APIs →python-patterns by other authors comes first.