flask
- Repo stars 2,412
- License NOASSERTION
- Author updated Live
- Author repo debugpy
- Domain
- Other
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 94 / 100 · audit passed
- Author / version / license
- @microsoft · NOASSERTION
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Required · Vendor-specific
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Env read
- Network behavior
- External requests
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: flask
description: Best practices for Flask web development including routing, blueprints, and testing. Apply this…
category: other
runtime: no special runtime
---
# flask output preview
## PART A: Task fit
- Use case: Best practices for Flask web development including routing, blueprints, and testing. Apply this skill when building Flask web applications or APIs — routing, blueprints, extensions, and testing. requires Vendor-specific API key. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “When to Use / Project Structure / Routing and Views” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Best practices for Flask web development including routing, blueprints, and testing. Apply this skill when building Flask web applications or APIs — routing, blueprints, extensions, and testing. requires Vendor-specific API key. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “When to Use / Project Structure / Routing and Views” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, read environment variables; may access external network resources; requires Vendor-specific API keys.
## Running Rules
- read files, write/modify files, read environment variables; may access external network resources; requires Vendor-specific API keys.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, read environment variables.
Start with a small task and check whether the result follows “When to Use / Project Structure / Routing and Views”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: flask
description: Best practices for Flask web development including routing, blueprints, and testing. Apply this…
category: other
source: microsoft/debugpy
---
# flask
## When to use
- Best practices for Flask web development including routing, blueprints, and testing. Apply this skill when building Fl…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “When to Use / Project Structure / Routing and Views” and keep inference separate from source facts.
- read files, write/modify files, read environment variables; may access external network resources; requires Vendor-specific API keys.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "flask" {
input -> user goal + target files + boundaries + acceptance criteria
context -> When to Use / Project Structure / Routing and Views
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files, read environment variables | may access external network resources
guardrails -> requires Vendor-specific API keys + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Skill: Flask
Best practices for Flask web development including routing, blueprints, and testing.
When to Use
Apply this skill when building Flask web applications or APIs — routing, blueprints, extensions, and testing.
Project Structure
- Use the application factory pattern (
create_app()) to avoid global state and enable testing. - Organize features into Blueprints; register them in the factory.
- Keep configuration in a
config.pywith classes likeDevelopmentConfig,ProductionConfig.
Routing and Views
- Prefer explicit HTTP method decorators (
@app.get,@app.post) over generic@app.routewithmethods=[...]. - Validate request data early; return 400 errors for malformed input before processing.
- Use
flask.abort()with appropriate HTTP codes rather than returning error responses manually.
Extensions
- Initialize extensions lazily with
ext.init_app(app)inside the factory, not at module level. - Common extensions: Flask-SQLAlchemy, Flask-Migrate, Flask-Login, Flask-WTF, Flask-CORS.
Testing
- Use
app.test_client()for HTTP-level tests andapp.test_request_context()for unit tests. - Use pytest fixtures to create the app and client; scope appropriately (
sessionfor the app,functionfor the client). - Set
TESTING=Trueand use a separate test database.
Pitfalls
- Never use the development server (
app.run()) in production — use Gunicorn or uWSGI. - Avoid storing mutable state on the
appobject; usegfor request-scoped data. - Never hardcode
SECRET_KEY— load from environment variables.
Decide Fit First
Design Intent
How To Use It
Boundaries And Review