Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

fastapi-project-structure

verified

Production-ready FastAPI project scaffolding templates including directory structure, configuration files, settings management, dependency injection, MCP server integration, and development/production setup patterns. Use when creating FastAPI projects, setting up project structure, configuring FastAPI applications, implementing settings management, adding MCP integration, or when user mentions FastAPI setup, project scaffold, app configuration, environment management, or backend structure.

View on GitHub

Marketplace

ai-dev-marketplace

vanman2024/ai-dev-marketplace

Plugin

fastapi-backend

development

Repository

vanman2024/ai-dev-marketplace
2stars

plugins/fastapi-backend/skills/fastapi-project-structure/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/vanman2024/ai-dev-marketplace/blob/main/plugins/fastapi-backend/skills/fastapi-project-structure/SKILL.md -a claude-code --skill fastapi-project-structure

Installation paths:

Claude
.claude/skills/fastapi-project-structure/
Powered by add-skill CLI

Instructions

# FastAPI Project Structure Skill

Production-ready FastAPI project scaffolding templates and best practices for building scalable, maintainable backend applications with MCP integration support.

## Instructions

### 1. Choose Project Template

Select the appropriate project template based on your use case:

- **minimal**: Basic FastAPI app structure (single file, quick prototypes)
- **standard**: Standard production structure (API routes, models, services)
- **mcp-server**: FastAPI app with MCP server integration
- **full-stack**: Complete backend with auth, database, background tasks
- **microservice**: Microservice-ready structure with health checks, metrics

### 2. Generate Project Structure

Use the setup script to scaffold a new FastAPI project:

```bash
cd /home/gotime2022/.claude/plugins/marketplaces/ai-dev-marketplace/plugins/fastapi-backend/skills/fastapi-project-structure
./scripts/setup-project.sh <project-name> <template-type>
```

**Template types:** `minimal`, `standard`, `mcp-server`, `full-stack`, `microservice`

**Example:**
```bash
./scripts/setup-project.sh my-api-service standard
```

**What This Creates:**
- Complete directory structure
- Configuration files (pyproject.toml, .env.example)
- Main application entry point
- Settings management system
- Docker configuration (for production templates)
- README with setup instructions

### 3. Configure Application Settings

The skill uses Pydantic Settings for configuration management:

**Settings Structure:**
```python
# app/core/config.py
from pydantic_settings import BaseSettings

class Settings(BaseSettings):
    # App Configuration
    PROJECT_NAME: str = "FastAPI App"
    VERSION: str = "1.0.0"
    DEBUG: bool = False

    # Server Configuration
    HOST: str = "0.0.0.0"
    PORT: int = 8000

    # Database Configuration (if needed)
    DATABASE_URL: str

    # Security
    SECRET_KEY: str
    ALLOWED_ORIGINS: list[str] = ["*"]

    class Config:
        env_file = ".env"
        case_sensitiv

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
11407 chars