Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add perniemann/pnCore --skill pn-database-migrationsgit clone --depth 1 https://github.com/perniemann/pnCoreWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/perniemann/pncore/pn-database-migrations)<a href="https://agentmods.dev/skills/perniemann/pncore/pn-database-migrations"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-database-migrations/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-database-migrations"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-database-migrations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.01046 |
| Opus 5.5 | $0.00020 | $0.00418 |
| Sonnet 5.5 | $0.00010 | $0.00209 |
| Haiku 4.5 | $0.00005 | $0.00105 |
Grade A, and why
pn-database-migrations scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database migrations
When to use
- Adding, altering, or dropping columns/tables in a production database
- Writing or reviewing a migration file (Prisma, Drizzle, TypeORM, raw SQL)
- Planning zero-downtime deployments that involve schema changes
- Seeding reference data or test fixtures
- Reviewing index coverage or query performance regressions
Core principles
- Migrations are immutable once committed — never edit a migration file that has been applied to any shared environment; create a new migration instead.
- Always pair with a rollback — every
upmigration must have a safedownpath; document whendownis destructive (irreversible data loss). - Expand/contract for zero downtime — break breaking changes into two migrations: (a) add new column/table (expand), (b) backfill + switch app code, (c) drop old column (contract). Never rename or drop in one step.
- Gate on review — migrations that touch > 10M rows or add a non-concurrent index require explicit review before deploying to production.
- Never mix data and schema — separate DDL migrations (schema) from DML migrations (data backfills) to allow independent rollback.
Workflow
Prisma
# Generate migration from schema changes
npx prisma migrate dev --name add_user_email_index
# Apply pending migrations in production (CI/CD)
npx prisma migrate deploy
# Inspect current migration status
npx prisma migrate status
# Reset dev database (destructive — dev only)
npx prisma migrate reset
- Store
migrations/directory in version control; commit with the code change that requires it. - Use
prisma db seedwithprisma/seed.tsfor reference data; keep seed idempotent (upsert, not insert). - For large table changes, use
--create-onlyflag, then edit the SQL before applying.
Drizzle
# Generate migration
npx drizzle-kit generate:pg # or :mysql, :sqlite
# Apply migrations
npx drizzle-kit push:pg # dev: push directly
# Production: use drizzle-orm/node-postgres migrator in startup script
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 104 lines · 49 tokens per session scan A 0e12d24fca38
pn-database-migrations is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 1,046 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
typescript
TypeScript coding conventions, best practices, and patterns for writing clean, maintainable code.
stripe-projects
Use when the user wants to provision infrastructure or third-party services using Stripe Projects. Triggers: "I need a database", "set up auth", "add caching", "give me a Postgres", "provision Redis", "I need hosting", "add a vector DB", "get me an API key for X", "get credentials for X", "sign up for a service", "set…
firebase-cloud-firestore
Use when setting up Firestore, designing schemas, doing CRUD, creating listeners, paginating queries, configuring indexes, enabling offline persistence, or writing security rules.
firebase-database
Use when syncing real-time data, structuring JSON trees, reading/writing, creating listeners, enabling offline persistence, managing presence, sharding, or writing security rules.
database-patterns
Database design and migration patterns for Alembic migrations, schema design (SQL/NoSQL), and database versioning. Use when creating migrations, designing schemas, normalizing data, managing database versions, or handling schema drift.
database-orm-expert
Updated to be the unified database skill covering ORM, migrations, edge DBs, and Supabase CLI / Keahlian database terpadu untuk ORM, migrasi, edge DB, dan Supabase CLI.