rule-api-routes

Enforce standardized API route handler patterns in Python domain files.

1|1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/btabaska/simpler-grants-documentation-automation --skill rule-api-routes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rule-api-routes
Source: https://github.com/btabaska/simpler-grants-documentation-automation/tree/main/.claude/skills/rule-api-routes
Command: npx skills add https://github.com/btabaska/simpler-grants-documentation-automation --skill rule-api-routes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

API route governance ensures consistent, safe, and scalable endpoint implementations across the codebase by codifying routing patterns and security practices.

Core Features & Use Cases

  • Enforces a standardized file structure for API domains under api/src/api/ with domain_blueprint.py, domain_routes.py, and domain_schema.py.
  • Enforces decorator stack order, thin route handlers, and explicit doc and auth patterns to minimize business logic in routes.
  • Promotes consistent error handling, logging, and schema validation across endpoints.

Quick Start

Edit or add new API route handlers under api/src/api following the domain convention and the decorator order described above to ensure compliance.

Frequently Asked Questions about rule-api-routes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce consistent API route patterns across my codebase?

To enforce consistent API route patterns, apply standardized file structures like domain_blueprint.py, domain_routes.py, and domain_schema.py. This ensures route handlers follow mandated decorator stack order, authentication, error handling, and logging practices.

What is the mandated file structure for API domain routes?

The mandated file structure for API domain routes requires three files per domain: domain_blueprint.py, domain_routes.py, and domain_schema.py. This convention enforces standardized routing patterns, schema validation, and shared utilities for logging and error handling.

How do I standardize decorator order and authentication in route handlers?

Standardize decorator order and authentication by applying mandated decorator stack sequences to thin route handlers. This minimizes business logic in routes and enforces explicit doc and auth patterns across all endpoints for consistent security.

Why should API route handlers be thin with minimal business logic?

API route handlers should be thin to minimize business logic in routes, ensuring standardized processing. Thin handlers enforce explicit doc and auth patterns, consistent error handling, and shared logging utilities across all API endpoints.

Can I use this approach to enforce soft delete practices in API routes?

Yes, this approach enforces soft delete practices in API routes by codifying routing patterns and security practices. It standardizes endpoint implementations through explicit decorator order, shared utilities, and consistent error handling across the codebase.

What's the best way to standardize error handling and logging in API endpoints?

The best way to standardize error handling and logging in API endpoints is using shared utilities within a mandated domain file structure. This codifies routing patterns to ensure consistent, safe, and scalable endpoint implementations across the codebase.