db-ops
Skill2 starsChanged 11 days agoMITView on GitHub
Database work on the user's apps with a read-only-first posture. Inspect schema and live data (Neon or another hosted Postgres via its MCP server or CLI, local SQLite or Postgres via the repo's own CLI), answer what tables and columns exist and whether prod and local point at the same database, then on ask author and run migrations (Alembic for Python backends, Drizzle for TypeScript ones) against an empty database and a seeded copy, verifying row counts before and after. Use when the user says "now see the neon db of this project", "did we use the same DB as the other app by mistake?", "why is drizzle pushing .sql?", "migrate the local db as well to test", "give me the complete schema list", or "DB migrated to new table". Never runs UPDATE or DELETE against production without an explicit, specific go-ahead, never prints a connection string, and never queries across all users when the ask is about one account.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- cilangzzz/yudao-skill-protheir own version, first seen Oct 25, 2026
- brickhu/skillstheir own version, first seen Aug 6, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- cilangzzz/yudao-skill-pro★ 39same name
- brickhu/skills★ 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 repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- aws-opsSkill
- docs-freshSkill
- fix-allSkill
- gh-actionsSkill
- harness-auditSkill
- ideateSkill
- memory-routerSkill
- ossSkill
- parallelSkill
- prod-checkSkill
- repo-auditSkill
- save-sessionSkill
- shipSkill
- sonar-sweepSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 53
write it with an up and a down.
- Distinctive: line 55
run it against an empty database, then against a seeded copy of dev
- Distinctive: line 79
Never run UPDATE, DELETE, DROP or TRUNCATE against production without an explicit go-ahead that names the table and the change.
- Distinctive: line 81
Never print or log a connection string, password or token.
- Distinctive: line 83
Never query across all users when the ask is about one account.
- Distinctive: line 85
Never hand-edit applied migration files or the alembic/drizzle history table.
- Very specific: line 86
Never drizzle-kit push or alembic upgrade head against prod as a way to "see if it works".
- Distinctive: line 88
Never chain commands with a double ampersand.
≈ “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
db-ops
Schema, migrations and "which database is this actually pointing at". A
platform skill such as neon-postgres (if installed) covers provider
specifics; this skill is the procedure around it.
Read first
- Your always-on rules, if you keep them. Secrets and boundaries: "can you
look at prod" is not authorization to write to prod; never query all
users' rows for a one-account question; tools that "get connection string"
(for example a Neon connection-URI tool) return a live password inline, so
never call them, refer to
DATABASE_URLby name. - The repo
CLAUDE.mdfor its database facts (dialect per environment, migration tool, conventions such as an emptydowngrade()), plusbrain recall <repo> databasefor anything learned before. - A provider skill, if installed, for pooled vs direct connections, branching, scale-to-zero and instant restore.
Procedure
- Identify the database before anything else, read-only: which env var the
app reads (
DATABASE_URL,NEON_DATABASE_URL, a SQLite path), where it is set for dev (.env.examplenames only, never values) and prod (hosting env, names only via the platform CLI or MCP), and whether two apps share one database project. Printapp | env | host label | dialect | shared with. - Schema inventory:
alembic currentandalembic history(Python) ordrizzle-kitintrospection (TypeScript); list tables, columns, indexes, foreign keys. For a hosted provider use its read tools; for SQLitesqlite3 <db> .schema. Never aSELECTwithoutLIMITon prod. - Answer the question asked with that inventory. "Why is drizzle pushing
.sql" means
drizzle-kit pushis applying a diff directly instead of generating a migration file; show the config line that causes it and stop. - Migration, only on ask:
- write it with an up and a down; Alembic autogenerate then read the diff,
never trust autogenerate blind; Drizzle
generatethen read the SQL - run it against an empty database, then against a seeded copy of dev
SELECT count(*)per affected table before and after; print both- one migration per change; never hand-edit migration history
- write it with an up and a down; Alembic autogenerate then read the diff,
never trust autogenerate blind; Drizzle
- Data corrections (recompute a derived column, backfill): dev first, print the affected row count, and on prod only after the user names the table and the change ("yes update X in prod"); wrap in a transaction, count before and after, keep the rollback statement in the receipt.
- Receipt.
Output
| app | env | host | dialect | shared with |
| <app> | prod | neon (label from the provider) | postgres | none |
| table | rows before | rows after | migration | verified |
| users | 1,204 | 1,204 | 0007_add_index | count + alembic current |
rollback: <exact command or "not applicable">
not done: <prod writes awaiting the user's named go-ahead>Must not
- Never run UPDATE, DELETE, DROP or TRUNCATE against production without an explicit go-ahead that names the table and the change.
- Never print or log a connection string, password or token; env var names only; never call a connection-URI tool.
- Never query across all users when the ask is about one account; filter by the identity from the first query.
- Never hand-edit applied migration files or the alembic/drizzle history table.
- Never
drizzle-kit pushoralembic upgrade headagainst prod as a way to "see if it works"; dev and the seeded copy are for that. - Never chain commands with a double ampersand; one per line.
Non-goals
Provider platform specifics (a provider skill, if installed), prod health
checks (prod-check), merging the migration PR (ship), SQL performance
tuning beyond an index suggestion, and edits to personal data files
(spreadsheets, exports) that are data, not a database.
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.

