flask

flask is a skill for Claude Code from alivirgo/Major-AI-Skills. It costs 31 tokens per session (2,102 once invoked), scanned A, original, MIT.

A guide to Flask, a Python web framework for building websites and HTTP APIs. It covers application factories, blueprints for splitting routes into modules, request handling, extensions, and tests.

In plain words
What is it for?
Use it to structure Flask projects, build web routes or JSON APIs, add authentication and database extensions, and test requests with pytest.
Why use it?
It helps keep Flask applications modular and testable while avoiding circular imports, hard-coded secrets, incorrect API errors, and unsafe development-server deployments.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Part of the major-ai-skills plugin — 147 skills, 8 plugins shipped together

Good fit Use it to structure Flask projects, build web routes or JSON APIs, add authentication and database extensions, and test requests with pytest.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alivirgo/major-ai-skills/flask
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 alivirgo/Major-AI-Skills --skill flask
Clone the repo
git clone --depth 1 https://github.com/alivirgo/Major-AI-Skills

Made for: Claude Code.

Or install major-ai-skills, the plugin that ships this one along with the rest of its 147 skills, 8 plugins.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/flask/github.svg)](https://agentmods.dev/skills/alivirgo/major-ai-skills/flask)
Your own site
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/flask"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/flask/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/flask"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/flask.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,102 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.
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.00031 $0.02102
Opus 5.5 $0.00012 $0.00841
Sonnet 5.5 $0.00006 $0.00420
Haiku 4.5 $0.00003 $0.00210

Measured 2d ago against content hash 95f2ac6ac94e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

flask 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 2d 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.

skills/flask/SKILL.md · 227 lines

How it starts

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

Flask Python Web AI Skill Guide (Claude)

Overview & Engine Architecture

Flask is a WSGI microframework: explicit application factories, blueprints, and a request/app context stack. Extensions (db, migrate, CSRF) are constructed once and bound with init_app(app). Production traffic runs under gunicorn (or similar)—never flask run / app.run(). Agents fail closed on missing SECRET_KEY / DATABASE_URL in prod, push app_context() only when configuring, and keep Celery/RQ workers out of the request path.

┌─────────────────────────────────────────────────────────────┐
│                 Flask factory → WSGI workers                  │
│                                                             │
│  gunicorn "app:create_app()" / wsgi:app                     │
│       → create_app(config)                                  │
│            ├── config from env (SECRET_KEY, DATABASE_URL)   │
│            ├── extensions.init_app(app)                     │
│            ├── blueprints (api / web / admin)               │
│            └── errorhandlers / CLI                          │
│                                                             │
│  Request: app context + request context → view              │
│       ├── SQLAlchemy / Alembic → @postgresql                │
│       ├── sessions / rate limits → @redis (optional)        │
│       └── background jobs → Celery/RQ worker                │
└─────────────────────────────────────────────────────────────┘

When to use / when not to

Use when

  • Building small-to-medium Python HTTP APIs or Jinja apps with clear module boundaries.
  • Structuring factories, blueprints, and Flask-SQLAlchemy + Alembic migrations.
  • Debugging “Working outside of application context” and extension init order.

Do not use when

  • You need async-first OpenAPI generation and Pydantic-native validation as defaults → @fastapi.
  • You need a full admin/ORM batteries stack → @django.
  • Someone asks to hardcode SECRET_KEY or ship the development server to prod → refuse.

Read the full file on GitHub · 227 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago Changed · +117 lines · +6 tokens per session 95f2ac6ac94e
  2. 1mo ago Changed · -5 tokens per session 654f0f5cb8ad
  3. 1mo ago First seen · 110 lines · 30 tokens per session scan A 08cc5abb0bbb

Subscribe to this mod's changes

flask is a skill published in the GitHub repository alivirgo/Major-AI-Skills (2 stars, last pushed yesterday), licensed MIT. It adds 31 tokens to every session and 2,102 once invoked, about $0.0001 per session on Opus 5.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-09-05.

Related

Other skills, from other repositories

flask

Flask - Lightweight Python web framework for microservices, REST APIs, and flexible web applications with extensive extension ecosystem.

bobmatnyc/claude-mpm-skills · 25 tokens

flask

Flask - Lightweight Python web framework for microservices, REST APIs, and flexible web applications with extensive extension ecosystem.

bobmatnyc/claude-mpm · 25 tokens

fastapi-init

Scaffold a complete, production-ready FastAPI project from scratch. Use this skill whenever the user wants to create, initialize, start, or bootstrap a FastAPI service, REST API, or Python web service — even if they just say "new service", "new API", or "new microservice". Handles uv setup, standard FastAPI directory…

robhowley/py-pit-skills · 109 tokens

alembic-migrations

Production-safe Alembic migration workflows for SQLAlchemy 2.x projects. Use this skill when adding Alembic, generating migrations, reviewing autogenerate diffs, fixing broken migrations, or establishing a safe schema evolution workflow in a Python backend.

robhowley/py-pit-skills · 56 tokens

implementation-protocol

Orchestrate feature implementation with a behavior-first, minimal-patch discipline. Use this skill whenever the user asks you to implement a feature, add functionality, build an endpoint, wire up a new capability, or make any non-trivial code change in a Python/FastAPI project. Also use when the user says "build…

robhowley/py-pit-skills · 116 tokens

pytest-service

Write disciplined backend tests for FastAPI services with pytest. Use this skill when adding tests to a Python/FastAPI service, setting up async SQLAlchemy test fixtures, wiring AsyncClient with DI overrides, mocking external clients, or improving test maintainability. Covers fixture design, factory patterns, async…

robhowley/py-pit-skills · 79 tokens