Skip to content
Back to skills

Backend Development

ASecurity

Use when building or structuring a Python backend on FastAPI + SQLAlchemy 2.0 (async) + Alembic + Pydantic v2. Provides the opinionated project layout, the standard kit (auth, async jobs, caching, storage, observability), and best practices.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 7, 2026
developmentpythongosqlfastapidockerapibackendsecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add martian56/claude-engineer --skill backend-development --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Backend Development?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Backend Development
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/martian56-backend-development/badge)](https://www.skillsdirectory.com/skills/martian56-backend-development)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: backend-development
description: Use when building or structuring a Python backend on FastAPI + SQLAlchemy 2.0 (async) + Alembic + Pydantic v2. Provides the opinionated project layout, the standard kit (auth, async jobs, caching, storage, observability), and best practices.
---

# Backend Development

**Announce at start:** "I'm using claude-engineer:backend-development to build the FastAPI backend."

## The stack (defaults)
Python 3.12+ · **FastAPI** · **SQLAlchemy 2.0 async** (asyncpg) · **Alembic** · **Pydantic v2** +
pydantic-settings · **uv** (deps/venv) · **ruff** (lint+format) · **mypy** (types) · **pytest** (tests).
Domain-modular layout: `src/<domain>/{router,schemas,models,service,dependencies}.py`.

## The standard kit (scaffold these by default)
- **Auth & security** - OAuth2 password flow, JWT access + refresh, password hashing (argon2/bcrypt), rate limiting, CORS, security headers.
- **Async jobs & scheduling** - a task queue + scheduled jobs over Redis (see the reference for the recommended library and why).
- **Caching & object storage** - Redis cache patterns + an S3/MinIO storage abstraction.
- **Observability** - structured logging, Sentry, OpenTelemetry traces, `/health` + `/ready` endpoints.

## Non-negotiables
1. **Async all the way** - async engine + session-per-request dependency; no sync DB calls in request paths.
2. **Migrations are real** - every schema change ships an Alembic migration (async-compatible); never auto-create in prod paths.
3. **Typed & validated** - Pydantic v2 request/response models; **mypy clean** (hard gate).
4. **Tested** - pytest + pytest-asyncio + httpx AsyncClient against a real test DB; meet the coverage threshold.
5. **Config via pydantic-settings** - no secrets in code; env-driven; documented required vars.
6. **Services in Docker, app native** - connect to Postgres/Redis/MinIO/Mailpit on localhost (`claude-engineer:docker-dev-environment`); run uvicorn natively.

**Full detail:** read `references/fastapi-stack.md` (exact project structure, SQLAlchemy 2.0 patterns, async Alembic setup, the job-queue recommendation, auth, observability, the blessed-packages list, pyproject.toml) on demand.

## Red flags - STOP
- A sync DB driver or blocking I/O in an async endpoint.
- A model change without a matching Alembic migration.
- Secrets/config literals in source instead of pydantic-settings + env.
- Shipping an endpoint with no test.

Files in this skill

  • SKILL.md2.4 KB
  • references/fastapi-stack.md52 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.