Borrowing it
Nothing to install: this file belongs to jovandyaz/knowtis-app. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/jovandyaz/knowtis-app/main/.agents/skills/managing-drizzle-migrations/SKILL.mdgit clone --depth 1 https://github.com/jovandyaz/knowtis-appWrote 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/jovandyaz/knowtis-app/managing-drizzle-migrations)<a href="https://agentmods.dev/skills/jovandyaz/knowtis-app/managing-drizzle-migrations"><img src="https://agentmods.dev/badge/skills/jovandyaz/knowtis-app/managing-drizzle-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/jovandyaz/knowtis-app/managing-drizzle-migrations"><img src="https://agentmods.dev/badge/skills/jovandyaz/knowtis-app/managing-drizzle-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.00103 | $0.00590 |
| Opus 5 | $0.00051 | $0.00295 |
| Sonnet 5 | $0.00021 | $0.00118 |
| Haiku 4.5 | $0.00010 | $0.00059 |
Grade A, and why
managing-drizzle-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 10d 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 — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Managing Drizzle migrations
Migrations (generate + migrate) are the single source of truth for the Knowtis schema. Full runbook: references/migrations-runbook.md.
The rule that matters most
Never drizzle-kit push against shared dev or prod databases. push leaves no migration history — it is what caused the schema-drift problems migrations were adopted to fix. push is acceptable only on throwaway local experiments.
Day-to-day workflow
# 1. Edit schema under apps/api/src/database/schema/
# 2. Generate the migration (repo root):
pnpm db:generate # -> apps/api/drizzle/NNNN_*.sql + meta snapshot
# 3. Commit the .sql + meta/ changes. Never edit an applied migration.
# 4. Apply locally:
pnpm db:migrate:run
Production application — hands-off
Railway's pre-deploy command (railway.toml) is the only production migrator: pnpm exec tsx apps/api/src/database/migrate.ts runs between build and release with the service's own DATABASE_URL, takes a Postgres advisory lock, and aborts the deploy on failure. CI applies committed migrations only to its disposable test database; never migrate production manually.
Zero-downtime changes
Expand/contract for anything not backward-compatible with running code:
- Expand — add nullable column / new table (deploy).
- Backfill — populate (migration or job).
- Contract — enforce
NOT NULL/ drop old column (later deploy).
Additive columns with a DEFAULT are safe in one step.
When migrate fails on an existing DB (e.g. 42710 enum already exists)
The DB was push-managed and has no drizzle.__drizzle_migrations tracking table. First verify that its live schema is equivalent to the migration range being recorded; abort on any mismatch because baseline records hashes without applying DDL. Only then run pnpm db:baseline (schema current) or pnpm db:baseline <migration_tag> (record through that tag). Dev and prod are already tracked — this applies only to adopting a new push-managed database.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 10d ago First seen · 43 lines · 103 tokens per session scan A 4d4f1143216f
managing-drizzle-migrations is a skill published in the GitHub repository jovandyaz/knowtis-app (3 stars, last pushed yesterday), licensed MIT. It adds 103 tokens to every session and 590 once invoked, about $0.0005 per session on Opus 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-08-31.
Other skills, from other repositories
api-canvas
DataCanvas primitive reference — a Tier 3 SQL/analytical workspace for tabular MCP servers, backed by DuckDB. Use when registering tables from upstream APIs, running ad-hoc SQL across them, and exporting results. Covers the acquire → register → query → export flow, per-table TTL, the token-sharing pattern for…
api-mirror
Stand up a persistent, self-refreshing local mirror of a bulk upstream dataset with the MirrorService (@cyanheads/mcp-ts-core/mirror). Use when a server wraps a large or slow API and should query a synced local index (embedded SQLite + FTS5) instead of paginating the live API per request.
system-design-data-architecture
Choose and scale the data layer: SQL versus NoSQL per access pattern, single data ownership, replication and read scaling, partition key choice, hot partition and celebrity key mitigation. Use when selecting a store, planning sharding, or fixing a data-tier bottleneck.
android-persistence
Implement Room schemas and DataStore preferences with proper async patterns in Android. Use when the primary task is storage schema, DAO, migration, or preference isolation; defer auth-token/security storage, any CoroutineWorker/WorkManager task, Hilt graph wiring, and cache-policy design.
binder-modeling
Binder data modeling — define entity types, fields, relations, constraints, views, and navigation. Use when asked to "create a type", "add a field", "define a schema", "set up relations", "model entities", "create a view", "set up navigation", "render entities as files", or design a binder workspace schema.
binder-cli
Binder CLI for knowledge graph operations — CRUD, search, schema inspection, transaction import, docs rendering. Use when asked to "query binder", "search records", "create a record", "check the schema", "import transactions", "undo changes", or work with a binder workspace.