claude-flask-builderlisted
Install: claude install-skill taimour1446/claude-flask-builder
# claude-flask-builder
This skill builds and extends production-grade Flask REST APIs that follow ONE
fixed architecture, ONE strict coding standard, and ~330 corrections derived
from a 26-pass audit of a real production Flask codebase. The skill never
asks the user to pick libraries — the stack is locked.
The skill is self-contained — every rule lives in this skill's files.
## When this skill applies
- Scaffold a new Flask REST API (ships Swagger UI at `/api/v1/docs` by
default — OpenAPI spec auto-generated from Marshmallow schemas).
- Extend an existing app of this architecture — add a Controller, Service,
Validation, DTO, Model, Migration, Seeder, pytest. New endpoints get
documented in the OpenAPI spec automatically via `@blp.arguments` +
`@blp.response` decorators (R150).
- Review Flask code against the standard.
- Build, migrate, run pytest, deploy.
- Auto-generate / update API documentation — every Marshmallow schema is
already an OpenAPI source.
## Locked stack
| Concern | Choice |
| --- | --- |
| Language | Python 3.11+ |
| Framework | Flask (app factory + blueprints) |
| Package manager | pipenv |
| ORM | SQLAlchemy via Flask-SQLAlchemy |
| Migrations | Alembic via Flask-Migrate |
| Seeders | Flask-Seeder (idempotent) |
| DB | PostgreSQL default, MySQL switchable at scaffold |
| Validation | Marshmallow request schemas (error_messages set) |
| Serialization | Marshmallow DTO (`@post_dump` may NOT query DB) |
| Auth | JWT (pyjwt) with `exp` claim + re