python-pro
Provides architectural decision trees and best practices for Python backend framework selection.
Install
mkdir -p .claude/skills/python-pro-pikakit && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13829" && unzip -o skill.zip -d .claude/skills/python-pro-pikakit && rm skill.zipInstalls to .claude/skills/python-pro-pikakit
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Python development with FastAPI, Django, or Flask. Async patterns, type hints, project structure. Use when building Python backends, scripts, or choosing Python frameworks. NOT for Node.js projects (use nodejs-pro) or general AI agents (use google-adk-python).Key capabilities
- →Select the appropriate Python framework based on project scope and scale.
- →Classify workloads as I/O-bound or CPU-bound to decide between async and sync.
- →Define architecture layering with routes, services, and repositories.
- →Enforce type hints on all public APIs.
- →Utilize Pydantic for input/output validation.
- →Provide recommendations for background tasks using Celery.
How it works
The skill uses a decision tree and classification rules to recommend Python frameworks and architectural patterns based on project requirements. It provides guidelines for type hinting and project structure.
Inputs & outputs
When to use python-pro
- →Choosing a Python framework
- →Structuring a Python backend
- →Planning async architectures
About this skill
Python Pro — Framework Selection & Architecture
Decision-making principles. Not patterns to copy. Ask, classify, decide.
5 Must-Ask Questions (Before Decision)
| # | Question | Options |
|---|---|---|
| 1 | Target Scope? | Single Script / API / Full-Stack / Workers |
| 2 | Project Scale? | MVP / Production / FAANG Scale |
| 3 | Current Framework? | Green field vs Legacy modification? |
| 4 | Async Requirements? | High I/O throughput vs CPU heavy? |
| 5 | DB Dependencies? | Relational vs NoSQL, Async DB drivers? |
When to Use
| Situation | Approach |
|---|---|
| Choosing Python framework | Use decision tree |
| API-first / microservices | Consider FastAPI |
| Full-stack web / CMS | Consider Django |
| Async vs sync decision | Check I/O vs CPU classification |
System Boundaries
| Owned by This Skill | NOT Owned |
|---|---|
| Framework selection (5 branches) | API design (→ api-architect) |
| Async/sync classification | Testing strategy (→ test-architect) |
| Type hint rules | Database schema (→ data-modeler) |
| Architecture layering | Code implementation |
Expert decision skill: Produces recommendations. Does not write code.
Framework Decision Tree (Deterministic)
What are you building?
│
├── API-first / Microservices → FastAPI
├── Full-stack web / CMS → Django
├── Simple / Script / Learning → Flask
├── AI/ML API serving → FastAPI
└── Background workers → Celery + any
If user has explicit preference → respect it. Ask when unclear.
Async vs Sync (Deterministic)
| Workload | Decision | Rationale |
|---|---|---|
| I/O-bound (HTTP, DB, file) | async | Waiting for external |
| CPU-bound (compute) | sync + multiprocessing | Number crunching |
| Mixed | Async with sync offload | run_in_executor |
Constraints: Never use sync libraries in async code. Never force async for CPU work.
Architecture Layering (Fixed)
Routes (HTTP handlers)
└→ Services (business logic)
└→ Repositories (data access)
Rule: No business logic in routes/views. Routes delegate to services.
Type Hints & Validation (Mandatory)
| Rule | Scope |
|---|---|
| Type hints on all public APIs | Functions, methods, return types |
| Pydantic for validation | All input/output boundaries |
No Any in public signatures | Use specific types or generics |
Decision Checklist
- Asked user about framework preference?
- Chosen framework for THIS context?
- Decided async vs sync?
- Planned type hint strategy?
- Defined project structure?
- Considered background tasks (Celery)?
Error Taxonomy
| Code | Recoverable | Trigger |
|---|---|---|
ERR_INVALID_REQUEST_TYPE | No | Request type not supported |
ERR_UNKNOWN_PROJECT_TYPE | Yes | Project type not one of 5 |
ERR_UNKNOWN_FRAMEWORK | Yes | Framework not fastapi/django/flask |
Zero internal retries. Same context = same recommendation.
Audit Logging (OpenTelemetry)
| Event | Metadata Payload | Severity |
|---|---|---|
decision_started | {"project_type": "...", "scale": "..."} | INFO |
framework_selected | {"framework": "fastapi", "rationale": "..."} | INFO |
async_sync_classified | {"mode": "async", "mix_workload": false} | WARN |
arch_recommendation_provided | {"layer_complexity": "high"} | INFO |
All architectural decision outputs MUST emit a decision_started and arch_recommendation_provided event.
Anti-Patterns
| ❌ Don't | ✅ Do |
|---|---|
| Default to Django for simple APIs | Choose framework per context |
| Use sync libraries in async code | Use async-compatible libraries |
| Skip type hints on public APIs | Annotate all public functions |
| Put business logic in routes/views | Separate: routes → services → repos |
| Always pick the same framework | Ask user, evaluate context |
📑 Content Map
| File | Description | When to Read |
|---|---|---|
| framework-selection.md | Framework comparison | Choosing framework |
| async-patterns.md | Async/sync patterns | Concurrency decisions |
| type-hints.md | Type annotation rules | Type strategy |
| project-structure.md | Directory layouts | New project |
| fastapi-patterns.md | FastAPI specifics | FastAPI project |
| django-patterns.md | Django specifics | Django project |
| testing-patterns.md | Python testing | Writing tests |
| engineering-spec.md | Full spec | Architecture review |
Selective reading: Load ONLY the reference file matching your current decision.
🔗 Related
| Item | Type | Purpose |
|---|---|---|
api-architect | Skill | API design |
test-architect | Skill | Testing |
data-modeler | Skill | Database |
⚡ PikaKit v3.9.213
When not to use it
- →When working on Node.js projects.
- →When the task is general AI agent development.
- →When the task involves API design, testing strategy, or database schema.
Limitations
- →The skill focuses on Python development with FastAPI, Django, or Flask.
- →The skill produces recommendations and does not write code.
- →The skill does not cover API design, testing strategy, or database schema.
How it compares
This skill provides deterministic recommendations for Python framework selection and architecture based on specific criteria, unlike general programming advice.
Compared to similar skills
python-pro side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| python-pro (this skill) | 0 | 2mo | No flags | Intermediate |
| python-configuration | 5 | 2mo | Review | Beginner |
| python-development-python-scaffold | 1 | 4mo | Review | Beginner |
| backend-architect | 10 | 4mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by pikakit
View all by pikakit →You might also like
python-configuration
wshobson
Python configuration management via environment variables and typed settings. Use when externalizing config, setting up pydantic-settings, managing secrets, or implementing environment-specific behavior.
python-development-python-scaffold
sickn33
You are a Python project architecture expert specializing in scaffolding production-ready Python applications. Generate complete project structures with modern tooling (uv, FastAPI, Django), type hint
backend-architect
sickn33
Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems. Masters REST/GraphQL/gRPC APIs, event-driven architectures, service mesh patterns, and modern backend frameworks. Handles service boundary definition, inter-service communication, resilience patterns, and observability. Use PROACTIVELY when creating new backend services or APIs.
design
matteocervelli
Design component architecture, REST API contracts, and data models (Pydantic schemas) before implementation. Use when planning how to build a feature, defining endpoints, or modeling data. Trigger on "design the architecture", "design the API", "data model", "how should I structure this feature".
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
fastapi-pro
sickn33
Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.