flask-conventions

Enforces app factory patterns, blueprints, Marshmallow/WTForms validation, authentication options for Flask projects.

9|1|Updated Jun 16, 2026
One-click install
npx skills add https://github.com/AratKruglik/antigravity-sdlc --skill flask-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flask-conventions
Source: https://github.com/AratKruglik/antigravity-sdlc/tree/main/plugins/flask-plugin/skills/flask-conventions
Command: npx skills add https://github.com/AratKruglik/antigravity-sdlc --skill flask-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inconsistent Flask projects hinder maintainability, making it hard to enforce scalable architecture and shared conventions across teams.

Core Features & Use Cases

  • App factory with create_app() to instantiate configurable app instances.
  • Per-feature Blueprints with explicit url_prefix to keep routes modular.
  • Marshmallow validation for JSON APIs and WTForms for server-rendered forms.
  • Flask-Login for session-based authentication and flask-jwt-extended for token-based auth.
  • Jinja2 template conventions and centralized error handling to deliver consistent responses.

Quick Start

Create a Flask app using the factory pattern, register per-feature blueprints, and wire up Marshmallow validation and optional JWT or session-based authentication.

Frequently Asked Questions about flask-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Flask app using the factory pattern and blueprints?

Structure a Flask app by implementing a create_app() factory function and registering per-feature blueprints with explicit url_prefix values to keep routes modular and maintainable.

What is the best way to add validation to Flask JSON APIs and server-rendered forms?

Add validation to Flask APIs using Marshmallow for JSON payloads and WTForms for server-rendered forms to enforce data integrity and consistent error handling across the application.

Does this Flask convention support both JWT and session-based authentication?

Yes, this Flask convention supports token-based authentication using flask-jwt-extended and session-based authentication using Flask-Login to secure API back-ends and server-rendered apps.

How do I centralize error handling in a Flask application?

Centralize error handling in Flask by implementing consistent response logic within the app factory structure, ensuring uniform JSON or template error delivery across all registered blueprints.

When should I use Marshmallow versus WTForms in a Flask project?

Use Marshmallow for validating JSON API request payloads and WTForms for server-rendered form validation, ensuring structured data handling across different Flask application interfaces.