flask-conventions

flask-conventions is a skill for Claude Code from AratKruglik/claude-sdlc. It costs 215 tokens per session (3,249 once invoked), scanned A, original, MIT.

A set of conventions for structuring Flask applications, Python web projects that can render HTML or return JSON. It covers application factories, feature-based route groups, validation, authentication, templates, errors, and database extensions.

In plain words
What is it for?
Use it when adding Flask routes, class-based views, forms, JSON API validation, session or token login, Jinja templates, error handling, SQLAlchemy, or database migrations.
Why use it?
It provides clear choices for common Flask components based on the libraries already installed in the project. This reduces inconsistent setup and avoids creating application-wide side effects during testing.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the flask-plugin plugin — 1 skill, 2 agents shipped together

Good fit Use it when adding Flask routes, class-based views, forms, JSON API validation, session or token login, Jinja templates, error handling, SQLAlchemy, or database migrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aratkruglik/claude-sdlc/flask-conventions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AratKruglik/claude-sdlc --skill flask-conventions
Clone the repo
git clone --depth 1 https://github.com/AratKruglik/claude-sdlc

Made for: Claude Code.

Or install flask-plugin, the plugin that ships this one along with the rest of its 1 skill, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flask-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/aratkruglik/claude-sdlc/flask-conventions/github.svg)](https://agentmods.dev/skills/aratkruglik/claude-sdlc/flask-conventions)
Your own site
<a href="https://agentmods.dev/skills/aratkruglik/claude-sdlc/flask-conventions"><img src="https://agentmods.dev/badge/skills/aratkruglik/claude-sdlc/flask-conventions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flask-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/aratkruglik/claude-sdlc/flask-conventions"><img src="https://agentmods.dev/badge/skills/aratkruglik/claude-sdlc/flask-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 215 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,249 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00215 $0.03249
Opus 5 $0.00108 $0.01625
Sonnet 5 $0.00043 $0.00650
Haiku 4.5 $0.00021 $0.00325

Measured 11d ago against content hash f850fe97b5e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

flask-conventions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/flask-plugin/skills/flask-conventions/SKILL.md · 493 lines

How it starts

The opening of the file, as written. The whole thing — 493 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Flask Conventions

Detection

Read pyproject.toml or requirements.txt before writing any Flask code:

grep -E "flask|Flask" requirements.txt pyproject.toml

Determine the installed extensions:

Check Meaning
flask-login present Session-based auth — use @login_required, login_user(), logout_user()
flask-jwt-extended present Token-based auth — use @jwt_required(), create_access_token()
marshmallow or flask-marshmallow present JSON API validation — use Schema.load() / Schema.dump()
flask-wtf present HTML form validation — use FlaskForm with validate_on_submit()
flask-sqlalchemy present ORM — use db.Model, db.session
flask-migrate present Migrations — flask db migrate, flask db upgrade

App factory

Define create_app() in app/__init__.py. Never instantiate Flask at module level in a way that creates side effects — the factory pattern allows multiple app instances for testing.

# app/__init__.py
from flask import Flask

from app.config import config_by_name
from app.extensions import db, login_manager, migrate


def create_app(config_name: str = "development") -> Flask:
    app = Flask(__name__)
    app.config.from_object(config_by_name[config_name])

    _init_extensions(app)
    _register_blueprints(app)
    _register_error_handlers(app)

    return app


def _init_extensions(app: Flask) -> None:
    db.init_app(app)
    migrate.init_app(app, db)
    login_manager.init_app(app)


def _register_blueprints(app: Flask) -> None:
    from app.auth.views import auth_bp
    from app.users.views import users_bp
    from app.orders.views import orders_bp

    app.register_blueprint(auth_bp)
    app.register_blueprint(users_bp)
    app.register_blueprint(orders_bp)


def _register_error_handlers(app: Flask) -> None:
    from app.errors import register_error_handlers
    register_error_handlers(app)

Initialize extensions at module level in app/extensions.py, then call .init_app(app) in the factory. This avoids circular imports.

Read the full file on GitHub · 493 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 493 lines · 215 tokens per session scan A f850fe97b5e7

Subscribe to this mod's changes

flask-conventions is a skill published in the GitHub repository AratKruglik/claude-sdlc (33 stars, last pushed 7d ago), licensed MIT. It adds 215 tokens to every session and 3,249 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.