knowtis-app: Skill for Claude Code

.agents/skills/managing-drizzle-migrations/SKILL.md

managing-drizzle-migrations is a skill for Claude Code, Codex from jovandyaz/knowtis-app. It costs 103 tokens per session (590 once invoked), scanned A, original, MIT.

A set of instructions for changing the Knowtis database schema, which defines the tables and fields used to store application data, with Drizzle. It covers creating, recording, applying, and deploying database migrations—step-by-step changes to that schema.

In plain words
What is it for?
Adding or changing tables, columns, indexes, or value types; generating and testing migrations; applying them during deployment; and planning changes that avoid downtime.
Why use it?
It prevents database changes from drifting away from their recorded history and helps apply production changes safely without manually altering the live database.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is jovandyaz/knowtis-app's own configuration. It tells Claude Code and Codex how to work on knowtis-app itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything knowtis-app configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/jovandyaz/knowtis-app/main/.agents/skills/managing-drizzle-migrations/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/jovandyaz/knowtis-app

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for managing-drizzle-migrations

README.md
[![agentmods](https://agentmods.dev/badge/skills/jovandyaz/knowtis-app/managing-drizzle-migrations/github.svg)](https://agentmods.dev/skills/jovandyaz/knowtis-app/managing-drizzle-migrations)
Your own site
<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.

agentmods 80×15 button for managing-drizzle-migrations

Your own site · 80×15
<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>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 590 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 10d ago against content hash 4d4f1143216f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

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.

.agents/skills/managing-drizzle-migrations/SKILL.md · 43 lines

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:

  1. Expand — add nullable column / new table (deploy).
  2. Backfill — populate (migration or job).
  3. 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.

Read the full file on GitHub · 43 lines

Files

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.

Changes

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.

  1. 10d ago First seen · 43 lines · 103 tokens per session scan A 4d4f1143216f

Subscribe to this mod's changes

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.

Related

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…

cyanheads/obsidian-mcp-server · 85 tokens

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.

cyanheads/obsidian-mcp-server · 68 tokens

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.

HoangNguyen0403/agent-skills-standard · 59 tokens

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.

HoangNguyen0403/agent-skills-standard · 59 tokens

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.

mpazik/Binder · 74 tokens

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.

mpazik/Binder · 60 tokens