Flask patterns -- application factory, blueprints, error handlers, extensions, request lifecycle, configuration, logging, CLI commands
98
98%
Does it follow best practices?
Impact
98%
1.28xAverage score across 5 eval scenarios
Passed
No known issues
{
"instruction": "Extensions use the init_app pattern, defined in a separate extensions.py file",
"relevant_when": "Agent configures Flask extensions (CORS, rate limiting, etc.)",
"context": "Flask extensions must be created as bare instances in app/extensions.py with no app argument. They are bound to the app via ext.init_app(app) inside create_app(). This allows multiple app instances (testing, production) to share extension definitions and avoids circular imports.",
"sources": [
{
"type": "file",
"filename": "skills/flask-best-practices/SKILL.md",
"tile": "tessl-labs/flask-best-practices@0.2.0"
}
],
"checklist": [
{
"name": "extensions-in-separate-file",
"rule": "Extension instances are created in app/extensions.py -- not inline in create_app() or at module level in __init__.py",
"relevant_when": "Agent sets up Flask extensions"
},
{
"name": "init-app-pattern",
"rule": "Extensions are created without an app argument (e.g., cors = CORS()) and bound later with ext.init_app(app) inside create_app()",
"relevant_when": "Agent initializes Flask extensions"
},
{
"name": "no-app-in-constructor",
"rule": "Extension constructors in extensions.py do NOT receive the Flask app as an argument -- no CORS(app) or Limiter(app)",
"relevant_when": "Agent creates Flask extension instances"
}
]
}