tsumugi: Skill for Codex

.agents/skills/drizzle-migrate-safety/SKILL.md

drizzle-migrate-safety is a skill for Codex from archfill/tsumugi. It costs 82 tokens per session (941 once invoked), scanned A, original, Apache-2.0.

Safety rules for creating, reviewing, applying, or repairing Drizzle database migrations, which are tracked changes to a database's structure.

In plain words
What is it for?
They are for handling schema edits, generating migrations, diagnosing migration failures or no-op results, checking drift, and applying changes with the required authorization.
Why use it?
They help keep the schema, SQL files, migration records, and actual database history consistent while avoiding accidental changes to the wrong database.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is archfill/tsumugi's own configuration. It tells Codex how to work on tsumugi 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 tsumugi configures →

Reuse

Borrowing it

Nothing to install: this file belongs to archfill/tsumugi. 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/archfill/tsumugi/main/.agents/skills/drizzle-migrate-safety/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/archfill/tsumugi

Made for: 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 drizzle-migrate-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/archfill/tsumugi/drizzle-migrate-safety/github.svg)](https://agentmods.dev/skills/archfill/tsumugi/drizzle-migrate-safety)
Your own site
<a href="https://agentmods.dev/skills/archfill/tsumugi/drizzle-migrate-safety"><img src="https://agentmods.dev/badge/skills/archfill/tsumugi/drizzle-migrate-safety/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 drizzle-migrate-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/archfill/tsumugi/drizzle-migrate-safety"><img src="https://agentmods.dev/badge/skills/archfill/tsumugi/drizzle-migrate-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 941 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.00082 $0.00941
Opus 5 $0.00041 $0.00470
Sonnet 5 $0.00016 $0.00188
Haiku 4.5 $0.00008 $0.00094

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

Security

Grade A, and why

drizzle-migrate-safety 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 9d 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/drizzle-migrate-safety/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Drizzle migration safety

Treat these as one migration contract:

  • apps/server/src/data/schema.ts
  • apps/server/drizzle/*.sql
  • apps/server/drizzle/meta/*_snapshot.json
  • apps/server/drizzle/meta/_journal.json
  • the target database's drizzle.__drizzle_migrations

Do not declare success from drizzle-kit migrate output alone.

Establish the boundary

  1. Read the repository AGENTS.md and inspect git status --short before changing anything.
  2. Preserve unrelated working-tree changes. Existing untracked migrations may belong to the user; inspect them before generating another migration.
  3. Distinguish the requested operation:
    • Generate/review: repository-only changes.
    • Apply: changes a confirmed database.
    • Repair: changes migration history or reconciles drift.
  4. Never read .env* or print credentials. Accept a caller-provided DATABASE_URL or use the documented disposable local database.
  5. Require explicit user authorization before applying to a non-disposable database or modifying migration history manually.

Run static pre-flight checks

Before generating or applying a migration:

  1. Parse _journal.json as JSON.
  2. Verify idx values are unique and contiguous in entry order.
  3. Verify when values are strictly increasing in entry order.
  4. Verify every journal tag has a matching SQL file.
  5. Verify generated snapshots form a valid id / prevId chain. Treat intentionally hand-written SQL migrations without snapshots as documented exceptions, not silent gaps.
  6. Verify new SQL, snapshot, and journal files form a coherent set.
  7. Inspect the current schema and relevant diff to understand the intended state change.

Stop if ordering, numbering, tags, or generated artifacts disagree. Do not repair by guessing.

Generate a migration

Use the repository command. The Drizzle config requires DATABASE_URL even though generation should not contact the database:

DATABASE_URL=postgresql://x:x@localhost:5432/x pnpm -C apps/server db:generate

Read the full file on GitHub · 94 lines

Files

What ships with it

2 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. 9d ago First seen · 94 lines · 82 tokens per session scan A a6420d0442a9

Subscribe to this mod's changes

drizzle-migrate-safety is a skill published in the GitHub repository archfill/tsumugi (0 stars, last pushed 3d ago), licensed Apache-2.0. It adds 82 tokens to every session and 941 once invoked, about $0.0004 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

build-with-tinybase

Scaffold, extend, and verify reactive local-first JavaScript or TypeScript applications with TinyBase. Use when choosing TinyBase for in-memory tabular or key-value state, generating an app with create-tinybase, adding schemas or UI bindings, configuring browser or database persistence, configuring MergeableStore…

tinyplex/tinybase · 76 tokens

tanstack-ai-memory-redis

Use when wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis or node-redis via fromNodeRedis), the storage model, client-side ranking limits, and troubleshooting.

TanStack/ai · 52 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

omnigraph

Operate OmniGraph graphs and deployments. Use for .pg schemas, .gq queries, OmniGraph CLI commands, file:///s3:///az:// graph URIs, cluster.yaml, operator config, bearer-authenticated servers, graph-backed knowledge or memory, Blob values, embeddings, branches, commits, and change feeds. Apply especially before schema…

ModernRelay/omnigraph · 94 tokens

api-reference

Memoria REST API endpoints, request/response formats, auth, rate limits. Use when calling or implementing API endpoints.

matrixorigin/memoria · 27 tokens

architecture

Memoria codebase structure, workspace layout, key traits, database tables, config patterns, and testing conventions. Use when navigating or modifying Memoria code.

matrixorigin/memoria · 33 tokens