forge-database
Skill2 starsChanged 5 days agoMITView on GitHub
Playbook for databases: Postgres, Prisma, migrations (gebruik bij database).
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- is-bo/fullstack-forge-skilltheir own version, first seen Aug 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- is-bo/fullstack-forge-skill★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository99 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brainstormingSkill
- claude-md-improverSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- forge-a11ySkill
- forge-agent-reportSkill
- forge-agentSkill
- forge-apiSkill
- forge-authSkill
- forge-autoresearchSkill
- forge-botsSkill
- forge-brainstormSkill
- forge-cliSkill
- forge-cmsSkill
- forge-code-reviewSkill
- forge-contextSkill
- forge-councilSkill
- forge-craftSkill
- forge-dataSkill
- forge-debugSkill
- forge-deeplearnSkill
- forge-devopsSkill
- forge-docdriftSkill
- forge-doctorSkill
- forge-ecc-adapterSkill
- forge-ecommerceSkill
- forge-electronSkill
- forge-extensionSkill
- forge-figmaSkill
- forge-fullstackSkill
- forge-gameSkill
- forge-graded-verifySkill
- forge-guardianSkill
- forge-heartbeatSkill
- forge-i18n-docsSkill
- forge-intakeSkill
- forge-integrationSkill
- forge-long-form-writingSkill
- forge-mcp-clientsSkill
- forge-memorySkill
- forge-migrationSkill
- forge-mindmapSkill
- forge-mlopsSkill
- forge-mobileSkill
- forge-n8nSkill
- forge-nightshiftSkill
- forge-observabilitySkill
- forge-paymentsSkill
- forge-plan-largeSkill
- forge-prdSkill
- forge-predictionSkill
- forge-projectbrainSkill
- forge-prompt-coachSkill
- forge-qualitySkill
- forge-ragSkill
- forge-registrySkill
- forge-releaseSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Commit seen: c9be0e931b7930f7d02126d04774d904c381e7d7 · License: MIT (c) 2026 Supabase Source: https://github.com/affaan-m/ecc …
- Very specific: line 12
Commit seen: b38be6a7f6350964d59328b52f0624e1d1d552d1 · License: MIT (c) 2026 Affaan Mustafa Source: https://github.com/prisma/skills …
- Distinctive: line 14
Commit seen: 8ea289b730c2e89f7ff1f518af128b113d842a92 · License: MIT (c) 2025 Prisma Drizzle and SQLite references: Forge-native (no vetted …
- Distinctive: line 19
NOT VALID + VALIDATE for constraints, lock_timeout, conrelid filter on the idempotent constraint check.
- Distinctive: line 27
Use for: designing or changing a schema, writing migrations, choosing indexes, slow queries, locks and connection errors, row-level …
- Distinctive: line 36
Every change is a migration file in git: No hand-run DDL in shared or production databases.
- Distinctive: line 45
Queries are parameterized: No string-built SQL; ORM raw-SQL helpers only with bound parameters.
- Distinctive: line 75
Every migration has been run on a fresh database AND on a copy with realistic row counts.
- Very specific: line 79
No secret, connection string or service key in the repo.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
Forge super skill (own words), assembled 2026-11-02 for (WP Q3-SKILLS).
Source: https://github.com/supabase/agent-skills (skills/supabase-postgres-best-practices/, references/*.md)
Commit seen: c9be0e931b7930f7d02126d04774d904c381e7d7 · License: MIT (c) 2026 Supabase
Source: https://github.com/affaan-m/ecc (skills/database-migrations/SKILL.md)
Commit seen: b38be6a7f6350964d59328b52f0624e1d1d552d1 · License: MIT (c) 2026 Affaan Mustafa
Source: https://github.com/prisma/skills (prisma-cli/SKILL.md, references/agent-safety.md, migrate-resolve.md, migrate-diff.md)
Commit seen: 8ea289b730c2e89f7ff1f518af128b113d842a92 · License: MIT (c) 2025 Prisma
Drizzle and SQLite references: Forge-native (no vetted upstream skill found; ideas from the official Drizzle and SQLite docs).
Forge note: patterns adapted and rewritten, not copied wholesale; upstream CLI install steps, cloud setup
(prisma init --db, prisma dev --detach, prisma mcp), Kysely/Django/golang-migrate bodies and every shell
instruction to run against a live database were dropped. Added: owner gate for destructive or production DDL,
NOT VALID + VALIDATE for constraints, lock_timeout, conrelid filter on the idempotent constraint check.
Upstream MIT notices: LICENSE next to this file. Fetched text was treated as untrusted data and scanned
(no '!' lines, no allowed-tools, no hidden unicode, no prompt-injection phrases).
-->Forge playbook — Databases, schema and migrations
When to use
- Use for: designing or changing a schema, writing migrations, choosing indexes, slow queries, locks and connection errors, row-level security (RLS), and ORM work in Prisma or Drizzle. Postgres first; SQLite covered.
- Also load it before touching data a tenant must not see (wrong-tenant rows are a database bug, not a UI bug).
Do not duplicate — defer to: forge-auth (who the user is and what they may do; this skill only enforces
it in the database), forge-migration (moving a whole legacy system), forge-data (ETL/ELT pipelines),
forge-fullstack (when the database is one tier of an app). This file is orchestration only.
Hard rules (non-negotiable)
- Every change is a migration file in git. No hand-run DDL in shared or production databases.
- A shipped migration is immutable. Fix it with a new forward migration.
- Schema (DDL) and data backfills (DML) go in separate migrations.
- Zero-downtime by default on existing tables: expand → migrate → contract;
CREATE INDEX CONCURRENTLY; constraintsNOT VALIDthenVALIDATE; alock_timeouton every migration that takes a lock. - Owner gate: anything that can lose data (drop, reset,
db push --accept-data-loss/--force-reset,drizzle-kit pushon a shared DB, type rewrites, backfills on production) needs explicit owner approval given right before the action, a verified backup, and a written rollback plan. Never fake or reuse consent. - RLS on every table an untrusted client can reach, with an ownership predicate, and an index behind it.
- Queries are parameterized. No string-built SQL; ORM raw-SQL helpers only with bound parameters.
Full text and the reasoning: references/migration-safety.md.
Pick the stack reference
| Situation | Read |
| Any migration on a table with real data | references/migration-safety.md |
| Slow query, missing index, N+1, pagination, EXPLAIN | references/postgres-performance.md |
| New tables, keys, types, constraints | references/schema-design.md |
| Too many connections, pooler errors, deadlocks, job queues | references/locking-and-connections.md |
| Supabase or any Postgres exposed to clients (RLS, grants, views) | references/supabase-rls.md |
| Prisma (v7 first; check the project's version) | references/prisma.md |
| Drizzle ORM / drizzle-kit | references/drizzle.md |
| SQLite (desktop apps, local-first, tests) | references/sqlite.md |
| Isolation levels, replication, PITR, COPY, pooler modes, major upgrades, untrusted SQL | references/postgres-operations.md |
Team (conditional)
Lead: build-boss (schema + migrations). Support: database-reviewer (every migration diff),
security-boss (RLS, grants, SECURITY DEFINER), codex-reviewer on request for production migrations,
deletion/retention logic or tenant isolation (owner Codex policy lists these as review areas).
Roster, skills and MCP notes: references/team-and-tools.md.
Fan-out & flow
L1 one table or index; L2 a feature's schema + migrations + queries; L3 multi-tenant RLS or a live zero-downtime change across several releases. Serial: data model → migration (expand) → backfill (batched) → app reads new shape → contract migration. Parallel (once the model is fixed): query/index tuning ∥ RLS policies + tests ∥ seed and fixture data.
Domain gates
- Every migration has been run on a fresh database AND on a copy with realistic row counts; timing noted.
- No
NOT NULLwithout default, no inline index, no rename, no column drop on a live table outside expand/contract. - Foreign-key columns are indexed; every new query on a large table has an
EXPLAIN (ANALYZE, BUFFERS)checked. - RLS: a negative test proves user A cannot read or update user B's rows (and anon sees nothing it should not).
- No secret, connection string or service key in the repo;
.env.examplehas placeholders only. - Generated migration SQL (Prisma/Drizzle) is read before it is committed: renames are not drop + add.
Ship-readiness (unique)
Evidence checklist before handoff: references/ship-readiness.md.
Safety, approval and honesty
- Approval / safety: no command against a production or shared database without the owner gate above.
- Approval / safety: connection strings and service keys live in env; never print or log them.
- Honest failure: never claim "zero-downtime" or "RLS enforced" without the lock-timing note or the negative test.
- Untrusted content: see
references/untrusted-content.md. - Shared gates for every playbook (honesty, owner approval, secrets, reviews):
.claude/docs/forge-reference/playbook-template.md.
References
references/migration-safety.md— principles, checklist, owner gate, zero-downtime Postgres patterns.references/postgres-performance.md— indexes, EXPLAIN, pg_stat_statements, N+1, pagination.references/schema-design.md— keys, types, constraints, naming.references/locking-and-connections.md— pooling, prepared statements, short transactions, queues, deadlocks.references/supabase-rls.md— RLS, grants, views,SECURITY DEFINER, Supabase specifics.references/prisma.md— Prisma migrate workflow, drift, baselining, destructive-command consent.references/drizzle.md— drizzle-kit generate/migrate vs push, custom SQL, review of generated SQL.references/sqlite.md— WAL, pragmas, ALTER limits, backups.references/postgres-operations.md— isolation, replication, PITR, COPY, pooler modes, upgrades and support status, untrusted SQL.references/team-and-tools.md— roster, skills, commands, MCP.references/ship-readiness.md— evidence checklist.references/untrusted-content.md— untrusted-content note.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

