Forge Skill
Turn any business description into a production-grade data platform and complete product scaffold:
schema, migrations, repository code, APIs, tests, UI surfaces, Docker Compose, and infra-ready
artifacts.
Core Principles
- Respect the user's explicit stack. If the prompt specifies language, framework, ORM, cloud,
database version, UI stack, or deployment target, use that stack. Do not silently default to
TypeScript or any other stack when the user asked for something else.
- Build all implied product surfaces, not just a dashboard. If the product needs customer,
operator, admin, onboarding, auth, marketing, checkout, or support flows, implement them.
Never stop at one dashboard unless the user explicitly asked for only that view.
- Never hardcode UI data. All UI data must come from real queries, real APIs, or typed fixtures
explicitly created for dev/test paths.
- Use real ORMs and live database connections. Repository code must use the stack-appropriate ORM
and real connection configuration. Prefer Datafy MCP tools for schema and DB operations.
- Every schema change must be migration-driven. Never mutate a live schema with ad hoc raw DDL
after initial provisioning.
- Use strong project structure. Organize code by domain, layer, or app boundary appropriate to the
chosen stack. No flat dumps.
- Proactively orchestrate sibling skills. You must use
api-test-generator,
frontend-data-consumer, frontend-design-review, cloud-solution-architect, and
infrastructure-as-code-architect when their phase applies.
- Tailwind and Shadcn are implementation tools, not the design itself. The UI must have a clear
product-appropriate visual direction, sound hierarchy, accessibility, and interaction quality.
- Default infra choices only when the user did not specify them:
- Terraform provider:
gcp
- Docker Compose Postgres image:
postgres:18-alpine
- Include Docker Compose in the infra repo as well as app-local setup when useful
Clarification Rules
Before building, resolve or infer:
- preferred stack
- product surfaces and user roles
- auth model
- deployment target
- cloud provider
- monorepo vs single app
If the user already specified any of these, do not re-ask them unless there is a real conflict.
When the prompt is specific, proceed with that stack.
Workflow
Step 0 — Architecture and Repo Strategy
Use cloud-solution-architect first.
- Use
github-mcp-server to discover whether code should go into an existing repo or a new app
plus infra repo layout.
- Choose architecture style that matches the product and scale.
- Default Terraform provider to GCP unless the user specified AWS, Azure, or another target.
- Ensure there is an infra home for deployment assets. Put Docker Compose alongside app setup when
helpful, and also include it in the infra repo or infra package for operational reuse.
Step 1 — Honor the Requested Stack
If the user says Laravel, Go, .NET, FastAPI, Next.js, Nuxt, Django, Rails, Kotlin, etc., use it.
Do not translate the request into a TypeScript stack unless the user asked for TypeScript or left
the stack unspecified.
Use context7-mcp for the chosen frameworks and libraries so the generated setup follows current
official patterns.
Step 2 — Model the Business
Extract:
- actors
- roles
- workflows
- transactions
- entities
- state transitions
- operational views
Explicitly enumerate the UI surfaces implied by the product. Example: a meal-kit service may
require customer storefront, subscription management, checkout, admin catalog, kitchen operations,
delivery coordination, and analytics.
Step 3 — Design the Data Layer
Generate PostgreSQL schema in 3NF unless the stack demands otherwise. Use:
- UUID primary keys where appropriate
- explicit foreign key policies
- timestamp columns
- proper indexes
- money-safe decimal types
Present schema for approval before execution when the user is in a planning mode; otherwise proceed.
Step 4 — Prisma 7 + PostgreSQL Playbook
When using Prisma 7 with PostgreSQL, follow this pattern.
- Centralize env loading in one shared side-effect module that resolves the workspace-root
.env
by absolute path.
- Reuse that env loader everywhere:
- app runtime
prisma.config.ts
- seed scripts
- background workers
- Centralize Prisma client options in one helper.
- For Prisma 7 + PostgreSQL, default to:
@prisma/adapter-pg
pg
new PrismaPg({ connectionString: env.DATABASE_URL })
new PrismaClient({ adapter })
- For money-like PostgreSQL columns, emit:
amount Decimal @db.Decimal(10, 2)
Do not emit @db.Numeric(...) for this Prisma 7 setup.
- Make
prisma.config.ts cwd-independent by importing the shared env loader.
- Reuse the same env/runtime path in
prisma/seed.ts; do not duplicate dotenv path math.
- In monorepos, assume
.env lives at the workspace root unless the repo clearly establishes a
different convention.
- Verify these commands from the package directory, not only repo root:
pnpm install
pnpm db:generate
pnpm db:migrate
pnpm db:seed
Recommended layout:
apps/api/
prisma.config.ts
prisma/
schema.prisma
seed.ts
src/
config/
load-env.ts
env.ts
db/
prisma-options.ts
prisma.ts
Required dependencies for Prisma 7 + PostgreSQL:
{
"@prisma/adapter-pg": "^7.x",
"@prisma/client": "^7.x",
"pg": "^8.x",
"prisma": "^7.x"
}
Step 5 — Provision Environment and Infra
Use infrastructure-as-code-architect.
- Generate production-ready Dockerfiles.
- Generate Docker Compose for local development.
- Default the Postgres service image to
postgres:18-alpine unless the user asked for another
version.
- Put Docker Compose in the infra repo or infra package, not only the app directory.
- Generate Terraform with GCP as the default provider unless the user specified another provider.
- Generate CI/CD and deployment assets.
SHIPPABILITY CONTRACT — MANDATORY for any web app destined for ship-to-vps:
The repo this step emits must satisfy every item in
~/.claude/skills/ship-to-vps/references/shippability-contract.md. Each item maps to a real
production failure that has happened. Do not skip any:
- Dockerfile at repo root, multi-stage, with
LABEL org.opencontainers.image.source=... on the
final stage (auto-links GHCR package to the repo so ephemeral GITHUB_TOKEN can pull during
deploy)
- Runner stage must include the FULL
node_modules tree if Prisma 7 migrations run from the
same image — @prisma/config requires effect and other transitive deps that the standalone
bundle omits. Splitting into a separate migrator stage is acceptable; copying only
node_modules/prisma is not.
- Invoke migrations via
node ./node_modules/<orm>/build/index.js, not npx — standalone
runners don't ship node_modules/.bin/ shims
.eslintrc.json (or framework equivalent) MUST exist — running next lint without one
triggers an interactive prompt that hangs CI
.dockerignore that does NOT exclude prisma/, public/, or any config file the Dockerfile
COPYs
- Tracked
.gitkeep in every directory the Dockerfile COPYs that may otherwise be empty
(e.g. public/.gitkeep for Next.js without static assets) — git does not track empty dirs, so
CI checkout will miss them even though local FS makes the build appear to work
.infisical.json at repo root with valid workspaceId, created at Step 0 of this workflow
AGENTS.md — use ~/.claude/skills/ship-to-vps/templates/docs/AGENTS.md as the template,
parameterized with this project's slug, domain, stack
- No committed
.env* files — verify gitignore covers them
- App reads
DATABASE_URL from env and listens on a single TCP port (default 3000)
Before declaring Step 5 complete, walk the checklist at the bottom of
~/.claude/skills/ship-to-vps/references/shippability-contract.md and confirm every box.
Step 6 — Provision Database via Datafy
Use available execute_admin_sql_<id> and execute_sql_<id> tools.
- Verify or create the target database.
- Apply schema in dependency order.
- Keep execution safe and repeatable.
- If
dbhub.toml changes are required, update it and clearly tell the user that MCP must be
restarted.
Step 7 — Repository Code and Services
Generate stack-appropriate repository code, services, routes, handlers, and DTO/contracts. Keep
code idiomatic for the requested stack.
Step 8 — Frontend Generation Standards
Use both frontend-data-consumer and frontend-design-review.
Rules:
- Build modern, near-best-in-class UI quality for the product category.
- Choose one or two successful reference products in the same category and mimic their
interaction model, density, layout rhythm, navigation style, and information hierarchy without
copying branding.
- Consult current design guidance before locking the UI direction. Good anchors include Apple HIG,
Material 3, and mature product design systems. Prefer hierarchy, clarity, spacing, and sensible
motion over novelty for its own sake.
- Do not ship generic “Tailwind + shadcn demo dashboard” output.
- Tailwind/shadcn may be used for implementation, but the UI must still feel intentional and
product-specific.
- Build all required UI surfaces, not just the dashboard.
- Ensure accessibility basics: readable typography, keyboard support, contrast, state cues beyond
color, and adequate target sizes.
Step 9 — Tests and Verification
Use api-test-generator and verify the generated repo actually works.
At minimum validate:
- install
- schema generation
- migrations
- seeding
- app boot
- tests
If Prisma is involved, explicitly validate the Prisma commands from the package directory.
Internal Orchestrator Prompt Rules
When acting as the orchestrator:
- Use the
forge skill immediately.
- Respect the exact stack named in the user's goal.
- Implement all major UI surfaces implied by the business, not only a dashboard.
- Use current official docs and patterns for the selected stack.
- Default Terraform to GCP if the user did not specify a cloud.
- Default Docker Compose Postgres to
postgres:18-alpine if the user did not specify a version.
- Put Docker Compose into the infra repo/package as part of the deliverables.
- If using Prisma 7 + PostgreSQL, follow the Prisma playbook above exactly.
Hard rules:
- Never hardcode business data in the UI.
- Never ignore an explicitly requested stack.
- Never emit only one UI view when the business clearly needs several.
- Never rely on cwd-sensitive env loading for Prisma monorepos.
- Never default to
@db.Numeric(...) for Prisma 7 PostgreSQL money fields in this setup.
- Never emit a web-app scaffold that violates the shippability contract — the next skill in the
chain (
ship-to-vps) depends on every item. See Step 5 for the enumerated requirements and
~/.claude/skills/ship-to-vps/references/shippability-contract.md for full rationale.
- Never copy only
node_modules/prisma + @prisma/* into a runner image when migrations are
expected to run from that image. Prisma 7's @prisma/config requires effect. Copy the full
node_modules tree or build a dedicated migrator stage.
- Never let CI invoke
next lint without .eslintrc.json present — it prompts interactively and
hangs the runner.
Handoff to ship-to-vps
After Step 9 verification, if the user wants the app deployed to their VPS, hand off to the
ship-to-vps skill. It expects exactly the contract this skill emits and will scaffold:
.github/workflows/{ci,deploy,infisical-sync}.yml
/opt/<slug>/ on the VPS (docker-compose, .env projected from Infisical, Caddy site config)
- Cloudflare DNS A-record (if user opted into Cloudflare integration)
- GHCR bootstrap (push current image with
:bootstrap tag for rollback)
- First end-to-end deploy
If the user says "ship it" / "deploy this" / "wire up CI/CD" / "set up auto-deploy", trigger
ship-to-vps.
1---2name: forge3description: Converts any business specification into a fully provisioned, production-grade data platform and full-stack product implementation. Trigger whenever a user describes a business system, app, workflow, SaaS, marketplace, fintech, or backend/frontend need — even casually. Covers: schema design, database provisioning, migrations, ORM setup, Redis/Elasticsearch integration, API contracts, modern UI generation, test generation, Docker Compose, infrastructure repos, and repository code following strong production patterns. Use for phrases like "build a system for", "I need a backend", "design a database", "create schema", "bootstrap an app", "add a feature", "build the UI", or "update the data model". Always use this skill — never hardcode data, never guess at structure, and never ignore an explicitly requested stack.4---56# Forge Skill78Turn any business description into a production-grade data platform and complete product scaffold:9schema, migrations, repository code, APIs, tests, UI surfaces, Docker Compose, and infra-ready10artifacts.1112## Core Principles13141. Respect the user's explicit stack. If the prompt specifies language, framework, ORM, cloud,15 database version, UI stack, or deployment target, use that stack. Do not silently default to16 TypeScript or any other stack when the user asked for something else.172. Build all implied product surfaces, not just a dashboard. If the product needs customer,18 operator, admin, onboarding, auth, marketing, checkout, or support flows, implement them.19 Never stop at one dashboard unless the user explicitly asked for only that view.203. Never hardcode UI data. All UI data must come from real queries, real APIs, or typed fixtures21 explicitly created for dev/test paths.224. Use real ORMs and live database connections. Repository code must use the stack-appropriate ORM23 and real connection configuration. Prefer Datafy MCP tools for schema and DB operations.245. Every schema change must be migration-driven. Never mutate a live schema with ad hoc raw DDL25 after initial provisioning.266. Use strong project structure. Organize code by domain, layer, or app boundary appropriate to the27 chosen stack. No flat dumps.287. Proactively orchestrate sibling skills. You must use `api-test-generator`,29 `frontend-data-consumer`, `frontend-design-review`, `cloud-solution-architect`, and30 `infrastructure-as-code-architect` when their phase applies.318. Tailwind and Shadcn are implementation tools, not the design itself. The UI must have a clear32 product-appropriate visual direction, sound hierarchy, accessibility, and interaction quality.339. Default infra choices only when the user did not specify them:34 - Terraform provider: `gcp`35 - Docker Compose Postgres image: `postgres:18-alpine`36 - Include Docker Compose in the infra repo as well as app-local setup when useful3738## Clarification Rules3940Before building, resolve or infer:4142- preferred stack43- product surfaces and user roles44- auth model45- deployment target46- cloud provider47- monorepo vs single app4849If the user already specified any of these, do not re-ask them unless there is a real conflict.50When the prompt is specific, proceed with that stack.5152## Workflow5354### Step 0 — Architecture and Repo Strategy5556Use `cloud-solution-architect` first.57581. Use `github-mcp-server` to discover whether code should go into an existing repo or a new app59 plus infra repo layout.602. Choose architecture style that matches the product and scale.613. Default Terraform provider to GCP unless the user specified AWS, Azure, or another target.624. Ensure there is an infra home for deployment assets. Put Docker Compose alongside app setup when63 helpful, and also include it in the infra repo or infra package for operational reuse.6465### Step 1 — Honor the Requested Stack6667If the user says Laravel, Go, .NET, FastAPI, Next.js, Nuxt, Django, Rails, Kotlin, etc., use it.68Do not translate the request into a TypeScript stack unless the user asked for TypeScript or left69the stack unspecified.7071Use `context7-mcp` for the chosen frameworks and libraries so the generated setup follows current72official patterns.7374### Step 2 — Model the Business7576Extract:7778- actors79- roles80- workflows81- transactions82- entities83- state transitions84- operational views8586Explicitly enumerate the UI surfaces implied by the product. Example: a meal-kit service may87require customer storefront, subscription management, checkout, admin catalog, kitchen operations,88delivery coordination, and analytics.8990### Step 3 — Design the Data Layer9192Generate PostgreSQL schema in 3NF unless the stack demands otherwise. Use:9394- UUID primary keys where appropriate95- explicit foreign key policies96- timestamp columns97- proper indexes98- money-safe decimal types99100Present schema for approval before execution when the user is in a planning mode; otherwise proceed.101102### Step 4 — Prisma 7 + PostgreSQL Playbook103104When using Prisma 7 with PostgreSQL, follow this pattern.1051061. Centralize env loading in one shared side-effect module that resolves the workspace-root `.env`107 by absolute path.1082. Reuse that env loader everywhere:109 - app runtime110 - `prisma.config.ts`111 - seed scripts112 - background workers1133. Centralize Prisma client options in one helper.1144. For Prisma 7 + PostgreSQL, default to:115 - `@prisma/adapter-pg`116 - `pg`117 - `new PrismaPg({ connectionString: env.DATABASE_URL })`118 - `new PrismaClient({ adapter })`1195. For money-like PostgreSQL columns, emit:120121```prisma122amount Decimal @db.Decimal(10, 2)123```124125Do not emit `@db.Numeric(...)` for this Prisma 7 setup.1261276. Make `prisma.config.ts` cwd-independent by importing the shared env loader.1287. Reuse the same env/runtime path in `prisma/seed.ts`; do not duplicate dotenv path math.1298. In monorepos, assume `.env` lives at the workspace root unless the repo clearly establishes a130 different convention.1319. Verify these commands from the package directory, not only repo root:132 - `pnpm install`133 - `pnpm db:generate`134 - `pnpm db:migrate`135 - `pnpm db:seed`136137Recommended layout:138139```text140apps/api/141 prisma.config.ts142 prisma/143 schema.prisma144 seed.ts145 src/146 config/147 load-env.ts148 env.ts149 db/150 prisma-options.ts151 prisma.ts152```153154Required dependencies for Prisma 7 + PostgreSQL:155156```json157{158 "@prisma/adapter-pg": "^7.x",159 "@prisma/client": "^7.x",160 "pg": "^8.x",161 "prisma": "^7.x"162}163```164165### Step 5 — Provision Environment and Infra166167Use `infrastructure-as-code-architect`.1681691. Generate production-ready Dockerfiles.1702. Generate Docker Compose for local development.1713. Default the Postgres service image to `postgres:18-alpine` unless the user asked for another172 version.1734. Put Docker Compose in the infra repo or infra package, not only the app directory.1745. Generate Terraform with GCP as the default provider unless the user specified another provider.1756. Generate CI/CD and deployment assets.176177**SHIPPABILITY CONTRACT — MANDATORY for any web app destined for `ship-to-vps`:**178179The repo this step emits must satisfy every item in180`~/.claude/skills/ship-to-vps/references/shippability-contract.md`. Each item maps to a real181production failure that has happened. Do not skip any:182183- **Dockerfile** at repo root, multi-stage, with `LABEL org.opencontainers.image.source=...` on the184 final stage (auto-links GHCR package to the repo so ephemeral `GITHUB_TOKEN` can pull during185 deploy)186- **Runner stage must include the FULL `node_modules` tree** if Prisma 7 migrations run from the187 same image — `@prisma/config` requires `effect` and other transitive deps that the standalone188 bundle omits. Splitting into a separate migrator stage is acceptable; copying only189 `node_modules/prisma` is not.190- **Invoke migrations via `node ./node_modules/<orm>/build/index.js`**, not `npx` — standalone191 runners don't ship `node_modules/.bin/` shims192- **`.eslintrc.json`** (or framework equivalent) MUST exist — running `next lint` without one193 triggers an interactive prompt that hangs CI194- **`.dockerignore`** that does NOT exclude `prisma/`, `public/`, or any config file the Dockerfile195 COPYs196- **Tracked `.gitkeep`** in every directory the Dockerfile COPYs that may otherwise be empty197 (e.g. `public/.gitkeep` for Next.js without static assets) — git does not track empty dirs, so198 CI checkout will miss them even though local FS makes the build appear to work199- **`.infisical.json`** at repo root with valid `workspaceId`, created at Step 0 of this workflow200- **`AGENTS.md`** — use `~/.claude/skills/ship-to-vps/templates/docs/AGENTS.md` as the template,201 parameterized with this project's slug, domain, stack202- **No committed `.env*` files** — verify gitignore covers them203- **App reads `DATABASE_URL` from env** and listens on a single TCP port (default 3000)204205Before declaring Step 5 complete, walk the checklist at the bottom of206`~/.claude/skills/ship-to-vps/references/shippability-contract.md` and confirm every box.207208### Step 6 — Provision Database via Datafy209210Use available `execute_admin_sql_<id>` and `execute_sql_<id>` tools.2112121. Verify or create the target database.2132. Apply schema in dependency order.2143. Keep execution safe and repeatable.2154. If `dbhub.toml` changes are required, update it and clearly tell the user that MCP must be216 restarted.217218### Step 7 — Repository Code and Services219220Generate stack-appropriate repository code, services, routes, handlers, and DTO/contracts. Keep221code idiomatic for the requested stack.222223### Step 8 — Frontend Generation Standards224225Use both `frontend-data-consumer` and `frontend-design-review`.226227Rules:2282291. Build modern, near-best-in-class UI quality for the product category.2302. Choose one or two successful reference products in the same category and mimic their231 interaction model, density, layout rhythm, navigation style, and information hierarchy without232 copying branding.2333. Consult current design guidance before locking the UI direction. Good anchors include Apple HIG,234 Material 3, and mature product design systems. Prefer hierarchy, clarity, spacing, and sensible235 motion over novelty for its own sake.2364. Do not ship generic “Tailwind + shadcn demo dashboard” output.2375. Tailwind/shadcn may be used for implementation, but the UI must still feel intentional and238 product-specific.2396. Build all required UI surfaces, not just the dashboard.2407. Ensure accessibility basics: readable typography, keyboard support, contrast, state cues beyond241 color, and adequate target sizes.242243### Step 9 — Tests and Verification244245Use `api-test-generator` and verify the generated repo actually works.246247At minimum validate:248249- install250- schema generation251- migrations252- seeding253- app boot254- tests255256If Prisma is involved, explicitly validate the Prisma commands from the package directory.257258## Internal Orchestrator Prompt Rules259260When acting as the orchestrator:2612621. Use the `forge` skill immediately.2632. Respect the exact stack named in the user's goal.2643. Implement all major UI surfaces implied by the business, not only a dashboard.2654. Use current official docs and patterns for the selected stack.2665. Default Terraform to GCP if the user did not specify a cloud.2676. Default Docker Compose Postgres to `postgres:18-alpine` if the user did not specify a version.2687. Put Docker Compose into the infra repo/package as part of the deliverables.2698. If using Prisma 7 + PostgreSQL, follow the Prisma playbook above exactly.270271Hard rules:272273- Never hardcode business data in the UI.274- Never ignore an explicitly requested stack.275- Never emit only one UI view when the business clearly needs several.276- Never rely on cwd-sensitive env loading for Prisma monorepos.277- Never default to `@db.Numeric(...)` for Prisma 7 PostgreSQL money fields in this setup.278- Never emit a web-app scaffold that violates the shippability contract — the next skill in the279 chain (`ship-to-vps`) depends on every item. See Step 5 for the enumerated requirements and280 `~/.claude/skills/ship-to-vps/references/shippability-contract.md` for full rationale.281- Never copy only `node_modules/prisma` + `@prisma/*` into a runner image when migrations are282 expected to run from that image. Prisma 7's `@prisma/config` requires `effect`. Copy the full283 `node_modules` tree or build a dedicated migrator stage.284- Never let CI invoke `next lint` without `.eslintrc.json` present — it prompts interactively and285 hangs the runner.286287## Handoff to `ship-to-vps`288289After Step 9 verification, if the user wants the app deployed to their VPS, hand off to the290`ship-to-vps` skill. It expects exactly the contract this skill emits and will scaffold:291292- `.github/workflows/{ci,deploy,infisical-sync}.yml`293- `/opt/<slug>/` on the VPS (docker-compose, `.env` projected from Infisical, Caddy site config)294- Cloudflare DNS A-record (if user opted into Cloudflare integration)295- GHCR bootstrap (push current image with `:bootstrap` tag for rollback)296- First end-to-end deploy297298If the user says "ship it" / "deploy this" / "wire up CI/CD" / "set up auto-deploy", trigger299`ship-to-vps`.