Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Flask Python

ASecurity

Guidelines for Flask Python development with best practices for blueprints, RESTful APIs, and application factories.

248 stars
0 votes
1 copies
1 views
Added 2/10/2026
developmentpythonsqlflasktestingapidatabaseperformancedocumentation

Works with

cliapi

Security Analysis

A100/100

Scanned 2/12/2026

Install to Claude Code

$npx -y skills add Mindrally/skills --skill flask-python --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Flask Python?

Add the live security badge to your README — it updates automatically with every re-scan.

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

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: flask-python
description: Guidelines for Flask Python development with best practices for blueprints, RESTful APIs, and application factories.
---

# Flask Python Development

You are an expert in Flask and Python web development. Follow these guidelines when writing Flask code.

## Key Principles

- Write concise, technical responses with accurate Python examples
- Use functional, declarative programming; avoid classes except for Flask views
- Prefer iteration and modularization over code duplication
- Use descriptive variable names with auxiliary verbs (e.g., `is_active`, `has_permission`)
- Use lowercase with underscores for directories and files (e.g., `blueprints/user_routes.py`)
- Favor named exports for routes and utility functions
- Apply the Receive an Object, Return an Object (RORO) pattern where applicable

## Python/Flask Standards

- Use `def` for function definitions
- Implement type hints for all function signatures where possible
- Structure: Flask app initialization, blueprints, models, utilities, config
- Omit unnecessary curly braces in conditionals
- Use concise one-line syntax for simple conditional statements

## Error Handling and Validation

- Handle errors and edge cases at function entry points
- Use early returns for error conditions to prevent deep nesting
- Place successful logic last in functions for improved readability
- Avoid unnecessary `else` statements; use if-return pattern instead
- Employ guard clauses for preconditions and invalid states
- Implement proper error logging with user-friendly messages
- Use custom error types or error factories for consistent handling

## Required Dependencies

- Flask
- Flask-RESTful (RESTful API development)
- Flask-SQLAlchemy (ORM)
- Flask-Migrate (database migrations)
- Marshmallow (serialization/deserialization)
- Flask-JWT-Extended (JWT authentication)

## Flask-Specific Guidelines

- Use Flask application factories for modularity and testing
- Organize routes using Flask Blueprints
- Leverage Flask-RESTful for class-based views
- Implement custom error handlers for different exception types
- Use Flask decorators: `before_request`, `after_request`, `teardown_request`
- Utilize Flask extensions for common functionalities
- Manage configurations via Flask's config object (development, testing, production)
- Implement logging using Flask's `app.logger`
- Handle authentication/authorization with Flask-JWT-Extended

## Performance Optimization

- Use Flask-Caching for frequently accessed data
- Implement database query optimization (eager loading, indexing)
- Apply connection pooling for database connections
- Manage database sessions properly
- Use background tasks for time-consuming operations (e.g., Celery)

## Key Conventions

1. Use Flask's application context and request context appropriately
2. Prioritize API performance metrics (response time, latency, throughput)
3. Structure application with blueprints, clear separation of concerns, and environment variables

## Database Interaction

- Use Flask-SQLAlchemy for ORM operations
- Implement database migrations via Flask-Migrate
- Properly manage SQLAlchemy sessions, ensuring closure after use

## Serialization and Validation

- Use Marshmallow for object serialization/deserialization and input validation
- Create schema classes for each model for consistent handling

## Authentication and Authorization

- Implement JWT-based authentication using Flask-JWT-Extended
- Use decorators for protecting routes requiring authentication

## Testing

- Write unit tests using pytest
- Use Flask's test client for integration testing
- Implement test fixtures for database and application setup

## API Documentation

- Use Flask-RESTX or Flasgger for Swagger/OpenAPI documentation
- Document all endpoints with request/response schemas

## Deployment

- Use Gunicorn or uWSGI as WSGI HTTP Server
- Implement proper logging and monitoring in production
- Use environment variables for sensitive information and configuration

Attribution

MindrallyMindrally
View sourceMore from Mindrally →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

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 (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284722 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2192 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →