backend

Generate FastAPI backend scaffolding with modular config, models, services, and API routes.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/nera0875/BUILDER --skill backend-nera0875
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend
Source: https://github.com/nera0875/BUILDER/tree/main/.claude/skills/backend
Command: npx skills add https://github.com/nera0875/BUILDER --skill backend-nera0875

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fastapi, uvicorn, pydantic, pydantic-settings, psycopg2-binary, python-jose, passlib, python-dotenv, python-multipart, pytest, pytest-asyncio, black, ruff.

What problem does it solve?

This Skill automates the creation of structured, maintainable Python backend APIs using FastAPI, adhering to 12-Factor App principles and Google Python Style Guide. It eliminates boilerplate, enforces best practices, and ensures scalable, error-resilient backend services.

Core Features & Use Cases

  • Structured Project Generation: Sets up a clean architecture with dedicated layers for configuration, models, services, and API routes, promoting separation of concerns.
  • Centralized Configuration: Enforces a single config.py for all settings, loaded from .env for environment-specific values, ensuring consistency.
  • Service Layer for Business Logic: Promotes thin controllers and fat services, ensuring business logic is isolated, testable, and reusable.
  • Pydantic Validation & Error Handling: Automatically generates Pydantic models for strict input validation and implements standardized error handling with custom exceptions.
  • Use Case: Ask the AI "Create a Python FastAPI backend for user authentication with JWT" and it will generate the necessary routes, services, models, and middleware, all following strict architectural guidelines.

Quick Start

Create a new FastAPI backend with a /users API endpoint that supports creating and listing users.

Frequently Asked Questions about backend

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

FAQPage Schema
How do I structure a Python FastAPI backend following clean architecture principles?

Clean architecture separates your FastAPI backend into distinct layers: configuration, models, services, and API routes. This Skill automates setup with a modular structure that isolates business logic in services, keeps controllers thin, centralizes config in a single module loaded from .env, and enforces type-safe Pydantic validation—resulting in testable, maintainable code aligned with 12-Factor App principles.

Can I use FastAPI with PostgreSQL and Pydantic validation for a production API?

Yes. This Skill generates production-ready FastAPI backends with PostgreSQL integration via psycopg2, strict Pydantic model validation for all inputs, centralized configuration management, and standardized error handling. It includes JWT authentication with python-jose and passlib, async request handling via Uvicorn, and testing scaffolding with pytest and pytest-asyncio for reliable deployment.

What's the best way to organize routes, services, and models in a FastAPI project?

Organize your FastAPI project into dedicated modules: config for environment settings, models for Pydantic schemas, services for business logic using the singleton pattern, api for route handlers, utils for helpers, and tests for validation. This Skill automates this layout, ensuring separation of concerns so routes remain thin, services stay testable and reusable, and configuration stays centralized.

How do I add database operations and authentication to a FastAPI backend?

This Skill scaffolds FastAPI backends with integrated PostgreSQL operations via psycopg2, JWT-based authentication using python-jose and passlib, Pydantic model validation, and centralized config management. It generates route handlers, service-layer database logic, middleware for token verification, and test fixtures—all following 12-Factor principles for scalable, secure APIs.

Do I need to know microservices architecture to use this for backend development?

No. While this Skill supports microservices patterns through modular structure and 12-Factor principles, it works equally well for monolithic FastAPI backends. The centralized config, service layer isolation, and clean routing apply to any project size. Microservices support means you can scale to that pattern later without restructuring.

What testing and linting tools are included for FastAPI development?

This Skill includes pytest with pytest-asyncio for async test writing, black for code formatting, and ruff for linting. These enforce style consistency and catch errors early. Combined with the modular service layer, they enable comprehensive unit and integration testing of your FastAPI routes and business logic.