PY

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.zip

Installs 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).
260 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

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

You give it
Project requirements including scope, scale, and async needs
You get back
A recommendation for a Python framework, async/sync approach, and architectural layering

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)

#QuestionOptions
1Target Scope?Single Script / API / Full-Stack / Workers
2Project Scale?MVP / Production / FAANG Scale
3Current Framework?Green field vs Legacy modification?
4Async Requirements?High I/O throughput vs CPU heavy?
5DB Dependencies?Relational vs NoSQL, Async DB drivers?

When to Use

SituationApproach
Choosing Python frameworkUse decision tree
API-first / microservicesConsider FastAPI
Full-stack web / CMSConsider Django
Async vs sync decisionCheck I/O vs CPU classification

System Boundaries

Owned by This SkillNOT Owned
Framework selection (5 branches)API design (→ api-architect)
Async/sync classificationTesting strategy (→ test-architect)
Type hint rulesDatabase schema (→ data-modeler)
Architecture layeringCode 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)

WorkloadDecisionRationale
I/O-bound (HTTP, DB, file)asyncWaiting for external
CPU-bound (compute)sync + multiprocessingNumber crunching
MixedAsync with sync offloadrun_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)

RuleScope
Type hints on all public APIsFunctions, methods, return types
Pydantic for validationAll input/output boundaries
No Any in public signaturesUse 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

CodeRecoverableTrigger
ERR_INVALID_REQUEST_TYPENoRequest type not supported
ERR_UNKNOWN_PROJECT_TYPEYesProject type not one of 5
ERR_UNKNOWN_FRAMEWORKYesFramework not fastapi/django/flask

Zero internal retries. Same context = same recommendation.


Audit Logging (OpenTelemetry)

EventMetadata PayloadSeverity
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 APIsChoose framework per context
Use sync libraries in async codeUse async-compatible libraries
Skip type hints on public APIsAnnotate all public functions
Put business logic in routes/viewsSeparate: routes → services → repos
Always pick the same frameworkAsk user, evaluate context

📑 Content Map

FileDescriptionWhen to Read
framework-selection.mdFramework comparisonChoosing framework
async-patterns.mdAsync/sync patternsConcurrency decisions
type-hints.mdType annotation rulesType strategy
project-structure.mdDirectory layoutsNew project
fastapi-patterns.mdFastAPI specificsFastAPI project
django-patterns.mdDjango specificsDjango project
testing-patterns.mdPython testingWriting tests
engineering-spec.mdFull specArchitecture review

Selective reading: Load ONLY the reference file matching your current decision.


🔗 Related

ItemTypePurpose
api-architectSkillAPI design
test-architectSkillTesting
data-modelerSkillDatabase

⚡ 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.

SkillInstallsUpdatedSafetyDifficulty
python-pro (this skill)02moNo flagsIntermediate
python-configuration52moReviewBeginner
python-development-python-scaffold14moReviewBeginner
backend-architect104moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

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.

542

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

14

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.

1014

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".

00

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.

5201,086

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.

79181

Search skills

Search the agent skills registry