Bootstrap a brand-new FastAPI backend from scratch following the house convention: FastAPI + uvicorn + SQLAlchemy 2.0 async + Alembic (PostgreSQL), Admin/Client dual-interface domain packages, fail-fast pydantic-settings env validation, multi-doc OpenAPI, uv for dependencies. Works standalone (uv project) or as apps/api in an existing monorepo. Use whenever the user wants to start/set up/scaffold a new FastAPI or Python backend with this stack: "fastapi 프로젝트 세팅해줘", "새 파이썬 백엔드 만들어줘", "이 컨벤션대로 파이썬 API 서버 만들어줘", "bootstrap a FastAPI service", "set up the api app with SQLAlchemy and Alembic", "scaffold an async FastAPI + Postgres project". Do NOT use this for: adding a domain to an already-bootstrapped project (use fastapi-domain-module), generating a migration (use fastapi-migration), a NestJS/TypeScript backend (use nestjs-bootstrap), a Next.js frontend (use nextjs-bootstrap), or an AWS-serverless FastAPI on Lambda + API Gateway (the `bootstrap` skill's fastapi-aws-serverless template).
Ships in backend. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Orchestrates a full project scaffold from the house convention. This file is the
control flow: run the phases in order, pass each phase's gate, and stop
(don't cascade) on failure. The actual file contents for each phase live in
references/*.md — read the referenced file at the top of each phase, then write
the files. Only phase 12 delegates to other skills; the rest you execute inline.
The phase numbers deliberately match nestjs-bootstrap, so the two conventions
can be read side by side when a team runs both stacks.
create_app() before settings exist).skipped and continue.
Re-running this skill on a half-built project should finish it, not clobber it.docker compose / installs, should be surfaced before running if the user hasn't
already said "just do it".| # | Phase | Reference | Gate | Delegates |
|---|---|---|---|---|
| 0 | Preflight | — | uv present, newest stable Python resolved (PY), layout decided | — |
| 1 | Layout | references/layout.md | pyproject.toml + app/ package + (monorepo) packages/contracts/ | — |
| 2 | Dependencies | references/dependencies.md | uv sync exits 0, uv.lock written | — |
| 3 | Tooling | references/tooling.md | ruff + mypy(strict) + pytest config present (checks deferred — app/ is still empty) | — |
| 4 | Settings | references/settings.md | Settings (extra="ignore", env_file → repo root) + Stage enum + repo-root .env.example exist and agree both ways | — |
| 5 | Persistence | references/persistence.md | engine/sessionmaker + CoreBase/SoftDeletableBase + base.py + alembic env.py | — |
| 6 | App bootstrap | references/bootstrap-app.md | create_app() (§ order) + lifespan + router_groups.py | — |
| 7 | Observability | references/observability.md | 3 exception handlers + /health (DB ping) + structlog + request-id | — |
| 8 | OpenAPI | references/openapi.md | /docs/{client,admin,all} filtered from the shared arrays, behind is_local_like | — |
| 9 | Common | references/common.md | PaginationParams + PaginatedResponse[T] + CamelModel | — |
| 10 | Infra | references/infra.md | Dockerfile + docker-compose + .dockerignore | — |
| 11 | Test setup | references/testing.md | pytest config + conftest.py with ASGI + rollback fixtures | — |
| 12 | First domain | — | domain files created + registered in shared arrays | Skill: backend:fastapi-domain-module, then Skill: backend:fastapi-migration |
| 13 | Verify | — | app boots, /api/health green, /docs loads, checks pass | — |
Create one todo per phase so progress is visible and resumable.
0 · Preflight. Confirm uv --version. The scaffold targets the newest stable
Python, resolved now and not from memory (Python has no LTS line; a new minor ships
every October):
PY=$(uv python list | grep -oE '^cpython-3\.[0-9]+\.[0-9]+-' | head -1 | cut -d- -f2 | cut -d. -f1,2); PY=${PY:-3.15}
The pattern skips pre-releases and free-threaded builds; 3.15 is the offline fallback
(newest stable on 2026-12-01). uv downloads that interpreter for the project by itself, so
the system python does not matter and nothing has to be installed by hand. Five places
take the value, and every 3.15 / py315 in the references stands for it:
requires-python and .python-version (layout.md), ruff's target-version and mypy's
python_version (tooling.md), and both Dockerfile stages (infra.md). The syntax floor of
the code itself is 3.12 (PEP 695 generics, StrEnum). A repo that already has a
pyproject.toml keeps its requires-python: report it when it sits below PY.
Decide the layout: a standalone
uv project at the repo root, or apps/api inside an existing monorepo. Look
before asking — an existing pnpm-workspace.yaml or apps/ directory answers it.
The choice changes phase 1 and the contracts export in phase 8, nothing else; Python
dependencies are managed by uv either way and are never registered in a pnpm
workspace. Gate: toolchain present + layout agreed.
1 · Layout. Read references/layout.md. Write pyproject.toml (project
metadata, requires-python, hatchling backend) and create the app/ package tree
plus tests/. In monorepo mode also create packages/contracts/ as the destination
for generated TypeScript types (phase 8). Gate: pyproject.toml parses and the
package tree exists.
2 · Dependencies. Read references/dependencies.md. Add the runtime bundle and
the dev group, then uv sync. The bundle pins asyncpg (the async driver —
psycopg2 cannot back an async engine) and greenlet (SQLAlchemy's async
bridge; on some platforms it is not pulled in transitively and every query dies with
MissingGreenlet). No package carries a hand-written version: uv add takes the newest
that resolves together and writes the floors itself. Gate: uv sync --no-build --no-install-project
exits 0 (every dependency has a wheel for PY; if one does not, step PY down one minor,
dependencies.md), then plain uv sync exits 0 and uv.lock exists. Fallback: on a
resolution failure, surface the resolver error and stop — every later phase imports
these.
3 · Tooling. Read references/tooling.md. Write the [tool.ruff],
[tool.mypy], and [tool.pytest.ini_options] sections into pyproject.toml.
Gate: the sections exist. Do not run mypy or pytest here — app/ has no
modules yet, so mypy reports nothing useful and pytest exits 5 (no tests collected).
The real type/lint/test gate is the phase 13 verification, because create_app()
in phase 6 forward-references files written in phases 7–9.
4 · Settings. Read references/settings.md. Write app/core/config.py
(Settings(BaseSettings) with nested database settings), app/core/stage.py
(Stage StrEnum + is_local_like), and .env.example. Gate: files present, and
every key in the schema appears in .env.example. Fallback: if the user hasn't
provided real values, .env.example documents them and .env stays uncommitted —
don't invent secrets.
5 · Persistence. Read references/persistence.md. Write app/db/base_class.py
(Base with the naming convention, CoreBase, SoftDeletableBase),
app/db/base.py (the model re-export module), app/db/session.py (async engine +
async_sessionmaker + get_session dependency), alembic.ini, and
app/db/migrations/env.py. Gate: env.py imports app/db/base.py for
target_metadata and the naming convention is attached to Base.metadata before
any model is defined — retrofitting it later means every existing constraint has the
wrong name and the next autogenerate tries to rename all of them.
6 · App bootstrap. Read references/bootstrap-app.md. Write app/main.py with
create_app() in the documented order (settings → logging → FastAPI with default
docs disabled → middleware → exception handlers → routers from the shared arrays →
OpenAPI docs behind the stage guard), the lifespan context manager (engine
create/dispose), and app/router_groups.py with empty CLIENT_ROUTERS /
ADMIN_ROUTERS for domain modules to fill. Gate: the three artifacts exist and
router_groups.py is the only place routers are listed.
7 · Observability. Read references/observability.md. Write the exception
handlers (HTTPException, RequestValidationError, catch-all Exception) that
normalize every error to one envelope with a machine-readable code, the
request-id middleware, structlog configuration, and app/health.py with a real DB
ping. Gate: handlers registered in create_app(), /api/health reachable.
8 · OpenAPI. Read references/openapi.md. Write app/openapi.py building the
Client/Admin/All documents from the same shared arrays create_app() mounts, served
at /docs* only when is_local_like(stage). In monorepo mode also add the
export-openapi CLI command and the codegen script. Gate: the doc builder reads
CLIENT_ROUTERS/ADMIN_ROUTERS — no second registration path.
9 · Common. Read references/common.md. Write app/common/schemas.py
(CamelModel, generic PaginatedResponse[T]) and app/common/pagination.py
(PaginationParams dependency, PageMeta). Gate: PaginatedResponse[T] is generic
over the item schema so each domain reuses it without subclassing.
10 · Infra. Read references/infra.md. Write the multi-stage Dockerfile,
docker-compose.yml (app + pinned postgres:16), and .dockerignore. If a root
docker-compose.yml already exists (a sibling app's bootstrap wrote it), merge into
it — add only the missing service, reuse its db, never rewrite it wholesale (infra.md
→ "Merging into an existing root docker-compose.yml"). Gate:
docker-compose.yml is at the repo root (monorepo: one level above apps/api,
with context: apps/api), images are version-pinned (no latest), the container
runs as non-root, pre-existing compose services survive with no host port bound twice,
and the built image starts without the uv cache.
11 · Test setup. Read references/testing.md. Write tests/conftest.py with the
transactional session fixture and the httpx ASGI client fixture. Gate: uv run pytest collects the config (0 tests collected is fine at this point).
12 · First domain. Delegate — do not hand-write the domain:
Skill(backend:fastapi-domain-module) with
{ domainName: <chosen>, interfaces: ["admin","client"], model: {...}, exportContracts: <monorepo> }.
Take its output; confirm the routers were registered in router_groups.py and
the model was re-exported from app/db/base.py.migrationNeeded: true, Skill(backend:fastapi-migration) with
{ name: "create_<domain>" }. Honor every verdict it can return:
safe → continue to phase 13.needs-review → stop and surface destructiveOps before applying anything.no-changes → treat as a defect, not a success. A model was just created, so
"nothing to migrate" means Alembic cannot see it — almost always a missing
import in app/db/base.py. Fix that, then re-run the migration step.
Where the runtime has no Skill(...) call, read that sibling skill's own SKILL.md in this
plugin and follow it inline with the same inputs.
Gate: domain files exist, arrays updated, and a reviewed migration file exists.13 · Verify. The final gate — prove it actually runs, don't just assert it:
uv sync
docker compose up -d db # from the repo root — where compose lives
uv run alembic upgrade head
uv run uvicorn app.main:app --reload --port "${API_PORT:-9999}"
Then check: GET /ping → pong; GET /api/health returns a status object with a
real database check (not a hardcoded {"status":"ok"}); GET /docs loads and
/docs/admin shows only admin routes; a seeded list route (e.g. /api/v1/user)
returns {"data": [...], "pagination": {...}} with camelCase keys; and
uv run pytest, uv run mypy app, uv run ruff check all pass. Report which
checks passed with evidence. Fallback: if boot fails, report the traceback and the
phase most likely responsible — do not claim completion. (Common first-boot
failures: a missing env var caught by settings validation, or MissingGreenlet from
a missing greenlet install.)
// → fastapi-domain-module
{ "domainName": "user", "interfaces": ["admin","client"],
"model": { "softDeletable": true, "fields": [...] }, "exportContracts": true }
// ← returns
{ "createdFiles": [...], "registeredIn": "app/router_groups.py", "migrationNeeded": true }
// → fastapi-migration (only if migrationNeeded)
{ "name": "create_user", "apiRoot": "apps/api" }
// ← returns
{ "migrationFile": "...", "verdict": "safe|needs-review|no-changes", "destructiveOps": [] }
Auth/authz policy, cache/Redis strategy, S3 upload, background workers (Celery/ARQ), CI/CD, security baseline (rate limiting, CSP), seed data. These are per-project decisions — do not scaffold them here, and don't flag their absence as a gap.
evals/run.sh (opens in a new tab)evals/trigger-eval.json (opens in a new tab)references/bootstrap-app.md (opens in a new tab)references/common.md (opens in a new tab)references/dependencies.md (opens in a new tab)references/infra.md (opens in a new tab)references/layout.md (opens in a new tab)references/observability.md (opens in a new tab)references/openapi.md (opens in a new tab)references/persistence.md (opens in a new tab)references/settings.md (opens in a new tab)references/testing.md (opens in a new tab)references/tooling.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
11 skills in this plugin
/api-creator-bootstrapGenerates a backend repo's `api-creator` + `test-checker` skill pair: set up, port, or bootstrap the API + test skills here. Generate a project-tailored TDD skill PAIR — `api-creator` (scaffold new APIs) and `test-checker` (audit & fill existing unit tests) — for a backend project: extract the proven gated, test-first methodology and fill in THIS project's own conventions (layers, base classes, auth, DTO/serialization, folder layout, test framework, verify commands). Both skills share one discovered recipe so they stay consistent. Use whenever the user wants to "set up api-creator here", "port the api-creator/test-checker skills to this project", "bootstrap the API + test skills for this repo", or bring one project's API + test conventions into another as reusable skills. Do NOT use this to actually build an API or audit tests in the current project (that is the generated skills' job), nor to edit an existing skill (use skill-creator / skill-ops)./axum-bootstrapScaffolds a Rust axum 0.8 + SeaORM 2.0 + PostgreSQL 16 backend from zero, standalone or apps/api monorepo. House convention: DDD-lite domains with Admin/Client route groups, fail-fast env validation, three utoipa OpenAPI docs with Swagger UI, tracing JSON logs, a Docker image, tests against a real Postgres. Phase 0 decides standalone (Cargo workspace at the repo root) or apps/api in a pnpm monorepo next to packages/contracts. Use when the user wants to start, set up or scaffold a new axum or Rust backend with this stack: "러스트 백엔드 새로 세팅해줘", "axum 프로젝트 만들어줘", "sea-orm 붙여서 rust api 서버 깔아줘", "bootstrap an axum backend", "scaffold a Rust API with SeaORM and Postgres", "set up apps/api in Rust". Do NOT use for: adding a domain to an existing axum project (use axum-domain-module), writing a SeaORM migration (use axum-migration), NestJS or FastAPI backends (nestjs-bootstrap / fastapi-bootstrap), the whole multi-app bootstrap chain (project-setup), or other Rust frameworks such as actix-web, rocket, poem or loco./axum-domain-moduleAdds a domain module to an existing axum + SeaORM 2.0 Rust API: "axum 프로젝트에 coupon 도메인 추가해줘", "add an orders module to the axum api". Scaffolds src/domains/NAME in the house DDD-lite layout (SeaORM entity, concrete repository, service with domain error codes, utoipa DTOs, admin and client handlers), registers it in src/domains/mod.rs and src/router_groups.rs (router plus client/admin/all OpenAPI docs), and seeds a service test and an HTTP test. Use whenever a request on a Rust axum codebase names a new resource or table: "러스트 api에 notice 도메인 만들어줘". Also for adding the missing admin or client side to an existing domain ("user 모듈에 admin.rs 추가해줘"): a hand edit misses the router_groups registration and the OpenAPI split. Do NOT use for: bootstrapping a new axum project (axum-bootstrap), the migration (axum-migration; this skill hands off to it), NestJS or FastAPI projects (nestjs-domain-module, fastapi-domain-module), or end-to-end feature work (feature-builder, or the project's generated api-creator)./axum-migrationWrite, register, review and apply a SeaORM 2.0 migration (sea-orm-migration crate) in a Rust axum project on this convention (migration/ workspace crate, entities in src/domains/{d}/entity.rs, migration CLI reading DB_*). SeaORM does not diff entities against the database, so the migration body is hand-written from the entity. Generates the file with sea-orm-cli, registers it in migration/src/lib.rs, writes up and a real down, gates destructive Postgres schema changes (drop_column, drop_table, rename, modify_column, raw SQL) on scratch-database evidence and user approval, then round-trips it on the dev DB. Use when an axum/SeaORM entity was added or changed, or a migration must be rolled back, e.g. "coupon 엔티티에 컬럼 추가했어, 마이그레이션 만들어줘", "generate the SeaORM migration for the new entity", "마이그레이션 롤백해줘". Do NOT use for TypeORM projects (nestjs-migration), Alembic projects (fastapi-migration), scaffolding a new axum domain and its entity (axum-domain-module), or bootstrapping the axum project (axum-bootstrap)./fastapi-domain-moduleScaffold a new domain module in an existing FastAPI project that follows the Admin/Client dual-interface convention (SQLAlchemy 2.0 async + Pydantic v2 + domain packages under app/domains/). Use whenever the user wants to add a domain/feature/resource to such a project: "user 도메인 추가해줘", "post 기능 만들어줘", "admin이랑 client 라우터 같이 만들어줘", "add an orders resource to the api", "create the payment endpoints", "add a product table and its admin list endpoint". Reach for it even when the user never says "domain" or "module", whenever a request against a FastAPI/Python codebase names a new resource with its endpoints or table; hand-writing those files silently skips the shared-array router registration this skill guarantees. Do NOT use this for: the initial project bootstrap/setup from scratch (use fastapi-bootstrap), the Alembic migration for the new model (hand off to fastapi-migration), splitting a fat service into use-cases (a refactor), or non-FastAPI stacks; NestJS projects use nestjs-domain-module./fastapi-migrationGenerate and safety-review an Alembic migration in a FastAPI project that uses this convention (SQLAlchemy 2.0 async, models re-exported from app/db/base.py, alembic env.py with compare_type), catching data-loss operations (drop_column, drop_table, type narrowing, a mass-drop from a model missing in base.py) before they are applied. Use whenever a SQLAlchemy model was added or changed and a migration is needed: "마이그레이션 만들어줘", "User 모델 바꿨는데 스키마 반영해줘", "스키마 diff 떠줘", "generate the alembic revision for the new column", "add a migration for the orders table". Do NOT use this for: applying an already-generated migration in production or CI (a deploy step: `alembic upgrade head`), reverting (`alembic downgrade`), hand-authoring a data-backfill migration, scaffolding a new domain and its model (use fastapi-domain-module), bootstrapping the project (use fastapi-bootstrap), or non-Alembic stacks; TypeORM projects use nestjs-migration, and Prisma/Drizzle/Django have their own tooling./backend:fastapi-bootstrapfrom backend
npx claudepluginhub siu9068/ggyul-skills --plugin backend