Generate a Flask blueprint with route stubs, service, schema, and registration
Generates a Flask blueprint module with CRUD route stubs, along with the corresponding service class, Pydantic schemas, and a test file. Registers the blueprint in the app factory.
/new-blueprint projects # Creates blueprints/projects.py, services/project_service.py, schemas/project.py
/new-blueprint users # Creates blueprints/users.py, services/user_service.py, schemas/user.py
/new-blueprint blog/posts # Creates blueprints/blog/posts.py (nested path)
Read reference patterns. Load the blueprint pattern from:
patterns/flask-patterns.mdpatterns/backend-patterns.mdstyles/backend-python.mdDetermine resource name. Parse the argument to determine the resource name, file paths, and URL prefix:
projects becomes /api/projects prefix, ProjectService, ProjectCreate, etc.blog/posts becomes /api/blog/posts prefix in src/app/blueprints/blog/posts.pyGenerate the blueprint file. Create the blueprint with:
from __future__ import annotationsBlueprint with nameGenerate the service file. Create the service class with:
Generate the schema file. Create Pydantic v2 schemas:
ResourceBase, ResourceCreate, ResourceUpdate, ResourceReadGenerate the test file. Create pytest tests for the blueprint.
Register the blueprint. Add the blueprint import and register_blueprint call
to src/app/__init__.py or the register_blueprints() function.
Run quality checks.
uv run ruff format <generated_files>
uv run ruff check <generated_files>
uv run mypy <generated_files>
Report results. Show the generated files.
src/app/blueprints/<resource>.py
src/app/services/<resource>_service.py
src/app/schemas/<resource>.py
tests/blueprints/test_<resource>.py
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer