flask-expert

Featured

Builds, modernizes and audits Flask 3.x applications: application factories and blueprints, Flask-SQLAlchemy 3.1 with SQLAlchemy 2.x typed models and Flask-Migrate, JSON APIs validated with Pydantic or marshmallow and JSON errors, Jinja templates with Flask-WTF CSRF, Flask-Login and Flask-JWT-Extended auth, pytest fixtures over the factory, and gunicorn or waitress deployment with Celery, RQ or APScheduler jobs. Use when code imports from flask or flask_* extensions (create_app, Blueprint, app.route, flask_sqlalchemy, flask_login, flask_wtf), when adding login, an API endpoint, forms, tests, background jobs or production deployment to a Flask app, when reviewing or upgrading an existing Flask project, or when diagnosing Flask errors such as 'Working outside of application context' or a 500 that only appears under gunicorn. Not for Django or FastAPI projects.

API & Backend 12,482 stars 1205 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Flask Expert Senior Flask engineer for Flask 3.1 and SQLAlchemy 2.x on Python 3.11+: factory-built apps that start only with real configuration, typed models, JSON APIs that never answer in HTML, and tests that build a fresh app per test. ## When to Use This Skill - Building a new Flask JSON API or server-rendered Flask app - Adding models, migrations, login, JWT auth, forms or validation to an existing Flask app - Writing pytest tests for a Flask app, or making an existing suite isolate its tests - Preparing a Flask app for production: gunicorn or waitress, reverse proxy, secure cookies, background jobs - Reviewing or modernizing legacy Flask code (module-level `app`, `db.Column`, `Model.query`, removed 2.x APIs) ## Core Workflow 1. **Structure** — Check the pinned Flask and Flask-SQLAlchemy versions and the existing layout; build new apps with `create_app(test_config=None)`, unbound extensions and blueprints, settings from `FLASK_*` environment variables 2. **Data** — `Mapped`/`mapped_column` models and `select()` queries with eager loading; schema changes go through Flask-Migrate 3. **Interface** — JSON blueprints with schema validation (Pydantic, or the project's marshmallow) and an app-level JSON error handler, or Jinja templates with Flask-WTF forms and Post/Redirect/Get 4. **Secure** — `CSRFProtect` for browser forms, Flask-Login sessions or Flask-JWT-Extended tokens, ownership checks on every row, production cookie flags 5. **Test & deploy** — pytest fixtures t...

Details

Author
Jeffallan
Repository
Jeffallan/claude-skills
Created
1 years ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Listed

fastapi-expert

Use when building or debugging FastAPI services - files importing fastapi, pydantic, or sqlalchemy.ext.asyncio; projects with pyproject.toml using uv/ruff/mypy; mentions of FastAPI, Pydantic v2, APIRouter, Depends, async endpoints, OAuth2/JWT auth, or pytest with httpx. Builds REST APIs, migrates Pydantic v1 to v2 idioms, wires async SQLAlchemy 2.0, adds auth and settings, writes async tests. Invoke for new endpoints, request/response schema design, dependency injection, lifespan/background tasks, auth flows, and test suites.

5 Updated 2 months ago
Aarvion-AI
AI & Automation Listed

fastapi-expert

Use when building high-performance async Python APIs with FastAPI and Pydantic V2. Invoke for async SQLAlchemy, JWT authentication, WebSockets, OpenAPI documentation.

3 Updated 1 months ago
zacklecon
API & Backend Listed

flask-spider

Builds and maintains Flask REST APIs. Covers the create_app factory, extensions.py, blueprints, thin routes calling class-based helpers, Pydantic request and query validation (RequestUtils), Flask-SQLAlchemy with the short-session DBService, Flask-Migrate, Flask-JWT-Extended auth with shared error responses, central error handlers, logging, and pytest with the Flask test client, with a tested starter project (auth plus an example CRUD feature). Use this whenever the user creates a Flask app, adds or changes a blueprint, route, schema or model, sets up JWT or migrations in Flask, or debugs Flask errors (circular imports, 308 redirects, migration drift, AmbiguousForeignKeysError), even if they only paste a Flask traceback. Apply together with backend-silk and sql-silk.

3 Updated 2 days ago
VivekShevale