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.
npx agentmods add commands/justdvp/claude-code-templates/flask-routegit clone --depth 1 https://github.com/Justdvp/claude-code-templatesWrote 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.
[](https://agentmods.dev/commands/justdvp/claude-code-templates/flask-route)<a href="https://agentmods.dev/commands/justdvp/claude-code-templates/flask-route"><img src="https://agentmods.dev/badge/commands/justdvp/claude-code-templates/flask-route.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01357 |
| Opus 5 | $0.00000 | $0.00678 |
| Sonnet 5 | $0.00000 | $0.00271 |
| Haiku 4.5 | $0.00000 | $0.00136 |
Grade A, and why
flask-route 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 4d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Flask Route Generator
Create Flask routes with proper structure and error handling.
Purpose
This command helps you quickly create Flask routes with validation, error handling, and best practices.
Usage
/flask-route
What this command does
- Creates route functions with proper decorators
- Adds request validation and error handling
- Includes JSON responses and status codes
- Implements authentication if needed
- Follows Flask conventions and best practices
Example Output
# routes.py or app.py
from flask import Flask, request, jsonify, abort
from flask_sqlalchemy import SQLAlchemy
from werkzeug.exceptions import BadRequest
app = Flask(__name__)
@app.route('/users', methods=['GET'])
def get_users():
"""Get all users with optional pagination."""
try:
page = request.args.get('page', 1, type=int)
per_page = request.args.get('per_page', 10, type=int)
users = User.query.paginate(
page=page,
per_page=per_page,
error_out=False
)
return jsonify({
'users': [user.to_dict() for user in users.items],
'total': users.total,
'pages': users.pages,
'current_page': page
}), 200
except Exception as e:
return jsonify({'error': 'Failed to fetch users'}), 500
@app.route('/users/<int:user_id>', methods=['GET'])
def get_user(user_id):
"""Get a specific user by ID."""
try:
user = User.query.get_or_404(user_id)
return jsonify(user.to_dict()), 200
except Exception as e:
return jsonify({'error': 'User not found'}), 404
@app.route('/users', methods=['POST'])
def create_user():
"""Create a new user."""
try:
data = request.get_json()
if not data:
return jsonify({'error': 'No data provided'}), 400
# Validate required fields
required_fields = ['name', 'email']
for field in required_fields:
if field not in data:
return jsonify({'error': f'{field} is required'}), 400
# Check if email already exists
if User.query.filter_by(email=data['email']).first():
return jsonify({'error': 'Email already exists'}), 409
# Create new user
user = User(
name=data['name'],
email=data['email'],
phone=data.get('phone'),
address=data.get('address')
)
db.session.add(user)
db.session.commit()
return jsonify(user.to_dict()), 201
except BadRequest:
return jsonify({'error': 'Invalid JSON data'}), 400
except Exception as e:
db.session.rollback()
return jsonify({'error': 'Failed to create user'}), 500
@app.route('/users/<int:user_id>', methods=['PUT'])
def update_user(user_id):
"""Update an existing user."""
try:
user = User.query.get_or_404(user_id)
data = request.get_json()
if not data:
return jsonify({'error': 'No data provided'}), 400
# Update fields
if 'name' in data:
user.name = data['name']
if 'email' in data:
# Check if new email already exists
existing_user = User.query.filter_by(email=data['email']).first()
if existing_user and existing_user.id != user_id:
return jsonify({'error': 'Email already exists'}), 409
user.email = data['email']
if 'phone' in data:
user.phone = data['phone']
if 'address' in data:
user.address = data['address']
db.session.commit()
return jsonify(user.to_dict()), 200
except BadRequest:
return jsonify({'error': 'Invalid JSON data'}), 400
except Exception as e:
db.session.rollback()
return jsonify({'error': 'Failed to update user'}), 500
@app.route('/users/<int:user_id>', methods=['DELETE'])
def delete_user(user_id):
"""Delete a user."""
try:
user = User.query.get_or_404(user_id)
db.session.delete(user)
db.session.commit()
return jsonify({'message': 'User deleted successfully'}), 200
except Exception as e:
db.session.rollback()
return jsonify({'error': 'Failed to delete user'}), 500
# Error handlers
@app.errorhandler(404)
def not_found(error):
return jsonify({'error': 'Resource not found'}), 404
@app.errorhandler(400)
def bad_request(error):
return jsonify({'error': 'Bad request'}), 400
@app.errorhandler(500)
def internal_error(error):
return jsonify({'error': 'Internal server error'}), 500
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.
- 4d ago First seen · 217 lines · 0 tokens per session scan A 475aaf0eb90d
flask-route is a command published in the GitHub repository Justdvp/claude-code-templates (7 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,357 tokens. 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-08-31.
Other commands, from other repositories
audit-steps
Audit one or all pipelines against layout, frontmatter, topology, and runtime-safety standards — produces a severity-classified report (SEV-0/1/2/3) with cited evidence.
init-deep
Initiates a repository traversal to create localized PIPELINE-CONTEXT.md hierarchical context files.
migrate-pipeline
Migrate an existing pre-v2 per-tier pipeline (.claude/, .opencode/, .agents/codex/) into the unified data-only .superpipelines/ layout — select legacy pipeline, translate frontmatter to canonical agent defs, stage, delta-audit, gate on human approval, then atomically promote, rewrite the registry, and move the legacy…
delete-step
Delete a step from an existing pipeline — select pipeline, select step, perform gap analysis, optionally rewire, audit the delta, then gate on human approval before any deletion.
new-pipeline
Design and scaffold a new named multi-agent pipeline with git preflight, scope selection, pre-gate audit, and entry-skill generation.
new-step
Add a new step to an existing pipeline — select pipeline, choose insertion point, design component, audit the delta, then gate on human approval.