flask

flask is a skill for Claude Code from alivirgo/Major-AI-Skills. It costs 25 tokens per session (778 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, 7 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, 7 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 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 778 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.00025 $0.00778
Opus 5 $0.00013 $0.00389
Sonnet 5 $0.00005 $0.00156
Haiku 4.5 $0.00003 $0.00078

Measured today against content hash 654f0f5cb8ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 today.

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 · 110 lines

How it starts

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

Flask Python Web AI Skill Guide

Overview & Engine Architecture

Flask is a WSGI microframework with explicit application factories, blueprints for modular routes, and a request/app context stack. Agents prefer factory + blueprint layout over a single global app, keep config in environment-backed objects, and run production traffic behind gunicorn/uwsgi - not the built-in server.

WSGI server (gunicorn)
        |
   create_app()
   +----+----+----+
   | blueprints    |
   | extensions    |
   | errorhandlers |
   +---------------+

When to use this skill

  • Building small-to-medium Python HTTP APIs or server-rendered apps
  • Structuring multi-module Flask projects
  • Adding auth, DB, or migrations via extensions
  • Writing route tests with the Flask test client

Operational directives

  1. Use create_app() so tests and CLI can construct fresh apps.
  2. Register blueprints with URL prefixes; avoid circular imports via late imports or extension init.
  3. Load secrets from env (SECRET_KEY, DB URLs) - never hardcode.
  4. Prefer JSON error handlers with correct status codes for APIs.
  5. Use the production WSGI server in deploy; app.run() is local-only.

App factory sketch

from flask import Flask, Blueprint, jsonify, request

api = Blueprint("api", __name__)

@api.get("/health")
def health():
    return jsonify(ok=True)

@api.post("/items")
def create_item():
    body = request.get_json(silent=True) or {}
    sku = body.get("sku")
    if not isinstance(sku, str) or not sku:
        return jsonify(error="sku required"), 400
    return jsonify(id=1, sku=sku), 201

def create_app() -> Flask:
    app = Flask(__name__)
    app.config.from_mapping(SECRET_KEY="dev-only-change-me")
    app.register_blueprint(api, url_prefix="/api")
    return app

Commands

flask --app "app:create_app" run --debug
gunicorn "app:create_app()"
pytest -q

Testing sketch

from app import create_app

def test_health():
    app = create_app()
    client = app.test_client()
    r = client.get("/api/health")
    assert r.status_code == 200
    assert r.get_json()["ok"] is True

Read the full file on GitHub · 110 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. today Changed · -5 tokens per session 654f0f5cb8ad
  2. 6d 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 (1 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 778 once invoked, about $0.0001 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-09-05.

Related

Other skills, from other repositories

python-api

Professional Python API Expert skill. Build performant, secure, and scalable backend logic and RESTful or GraphQL APIs.

AtulPurohit/Antigravity-Awesome-Skills · 26 tokens

fastapi

Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…

ericrisco/rsc-harness · 94 tokens

api-endpoint-builder-v2

API Endpoint Builder workflow skill. Use this skill when the user needs Builds production-ready REST API endpoints with validation, error handling, authentication, and documentation. Follows best practices for security and scalability and the operator should preserve the upstream workflow, copied support files, and…

diegosouzapw/awesome-omni-skills · 66 tokens

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

async-python-patterns

Master Python asyncio, concurrent programming, and async/await patterns for high-performance applications. Use when building async APIs, concurrent systems, or I/O-bound applications requiring non-...

rootcastleco/rei-skills · 40 tokens