home / skills / yugasun / skills / server
This skill helps you scaffold and maintain a FastAPI backend in server/ with Async SQLAlchemy, migrations, and AI tooling.
npx playbooks add skill yugasun/skills --skill serverReview the files below or copy the command above to add this skill to your agents.
---
name: dev-server
description: Create and manage Python backend services using uv, FastAPI, Pydantic, SQLAlchemy, and AI libraries. Use this skill when the user asks to build a backend, API, or server-side application.
metadata:
author: Yuga Sun
version: "2026.01.29"
---
# Server Development Skill
## Instructions
Use this skill to scaffold and maintain backend services in the `server/` directory. Follow the stack preferences and configuration details below.
### Quick Start
1. **Initialize**: `uv init`.
2. **Manager**: Use `uv` for all dependency operations.
3. **Framework**: Setup `FastAPI` with `Pydantic`.
4. **Database**: configure `SQLAlchemy` (Async) + `Alembic`.
## Core Stack Preferences
### Project Management (uv)
Use **uv** for all Python project management (scaffolding, dependency management, virtual environments).
| Command | Description |
|---------|-------------|
| `uv init` | Initialize a new project |
| `uv add <pkg>` | Add dependency |
| `uv add --dev <pkg>` | Add development dependency |
| `uv run <cmd>` | Run command in virtual environment |
| `uv venv` | Create virtual environment |
### Project Location
The backend project should be initialized in the `server/` directory.
### Framework (FastAPI)
Use **FastAPI** for building APIs.
- Use `APIRouter` for modularizing routes.
- Use `pydantic-settings` for configuration management.
### Database (SQLAlchemy + Alembic)
Use **SQLAlchemy 2.0+** with **AsyncIO** support.
Use **Alembic** for database migrations.
### AI & LLM (LiteLLM + Docling)
- **LiteLLM**: For standardized access to various LLM providers.
- **Docling**: For parsing and processing documents.
---
## References
### Setup & Configuration
| Topic | Description | Reference |
|-------|-------------|-----------|
| Project Setup | Using uv, strict python versioning, and environment variables | [setup](references/setup.md) |
| API Development | FastAPI structure, error handling, and validation | [api](references/api.md) |
### Data & Architecture
| Topic | Description | Reference |
|-------|-------------|-----------|
| Database Access | Async SQLAlchemy strategies and Alembic migrations | [database](references/database.md) |
| AI Integration | using LiteLLM and Docling for AI features | [ai](references/ai.md) |
This skill creates and manages Python backend services using uv, FastAPI, Pydantic, SQLAlchemy, and AI libraries. It scaffolds a server/ project, configures async SQLAlchemy with Alembic migrations, and wires in lightweight AI integrations. Use it to bootstrap production-ready APIs with clear conventions and maintainable structure.
The skill initializes projects under the server/ directory with uv and uses uv for all dependency and virtual environment operations. It scaffolds FastAPI app structure with APIRouter modules, Pydantic settings for configuration, and async SQLAlchemy plus Alembic for database access and migrations. Optional AI features are prepared using LiteLLM for model access and Docling for document parsing, integrated into service layers or background jobs.
Do I have to use uv for everything?
Yes: this skill uses uv as the canonical project manager for scaffolding, dependency management, and venv handling to ensure reproducible workflows.
Can I use a different LLM provider?
Absolutely. LiteLLM provides a standardized adapter layer; swap providers by changing configuration and adapter implementation without touching business logic.