Skip to content
Back to skills

Flask

ASecurity

Flask Python microframework. Use when building Flask apps, blueprints for modular routes, Jinja2 templates, SQLAlchemy ORM, Flask-RESTful APIs, or using extensions.

  • 47 stars
  • 0 votes
  • 0 copies
  • 9 views
  • Added September 12, 2026
databasespythonsqlflaskapi

Works with

  • api

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add skeletorflet/opencode-supreme-setup --skill flask --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Flask?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Flask
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/skeletorflet-flask/badge)](https://www.skillsdirectory.com/skills/skeletorflet-flask)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: flask
description: Flask Python microframework. Use when building Flask apps, blueprints for modular routes, Jinja2 templates, SQLAlchemy ORM, Flask-RESTful APIs, or using extensions.
---

## flask

Lightweight Python microframework with minimal core and rich extension ecosystem.

### Core Concepts
- Blueprints: modular route organization with `Blueprint` objects, mounted at URL prefixes
- Jinja2 templates: server-side rendering with template inheritance, filters, and macros
- SQLAlchemy ORM: `db.Model` for declarative models, `db.session` for transactional queries
- App factory: `create_app()` function for configurable, testable application instances

### Common Patterns
- Flask-RESTful: `Resource` subclasses with method-based routing for REST endpoints
- Error handlers: `@app.errorhandler(404)` for custom JSON or HTML error responses
- Extensions: Flask-Login for auth, Flask-Migrate for schema changes, Flask-Mail for email
- Request hooks: `before_request`/`after_request` for cross-cutting concerns like DB sessions

### Best Practices
- Use the app factory pattern to enable multiple config profiles (dev, test, production)
- Keep configuration in environment variables with `app.config.from_prefixed_env()`
- Organize views into blueprints by domain rather than dumping all routes in one file
- Use `g` object sparingly for request-scoped data, clean up with `teardown_appcontext`

### Common Code Patterns
- `Blueprint("auth", __name__, url_prefix="/auth")` with `register_blueprint` in factory
- `db.relationship("Post", backref="author", lazy="dynamic")` for one-to-many ORM access

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.