create-migration

A database-migration skill for changing the structure of the 0.5 backend database. A migration is a numbered SQL file that applies a controlled schema change, such as adding a table or column.

In plain words
What is it for?
Use it when adding tables, columns, indexes, constraints, backfills, or reshaping stored data in the specified backend.
Why use it?
It keeps database changes ordered, transactional, and safe when multiple backend processes start at the same time.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/tale-project/tale/create-migration
Any agent
npx skills add tale-project/tale --skill create-migration
Clone the repo
git clone --depth 1 https://github.com/tale-project/tale

Made for: Claude Code, Codex.

Per session 152 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,413 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00152 $0.01413
Opus 5 $0.00076 $0.00707
Sonnet 5 $0.00030 $0.00283
Haiku 4.5 $0.00015 $0.00141

Measured 2d ago against content hash 40cf9f18ac12, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-migration 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 2d 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/create-migration/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.

Backend database migrations (0.5)

Every database-shape change ships as a numbered SQL file under services/platform/backend/db/migrations/. runBootMigrations (backend/db/migrate.ts) applies them at every backend boot, in filename order, each in its own transaction, tracked by filename in app_migrations — all inside one session-scoped advisory lock, so N concurrently booting containers (api + worker, or scaled replicas) apply everything exactly once while the others wait.

There is no tale migrate up/down, no versioned framework, no rollback ledger: a deployed image is at its own schema by construction. tale migrate means something else entirely — re-provision built-in defaults into every org (/api/control/provision).

The 0.4 Convex versioned-migration framework (defineDbMigration, migrations:runAll, tale migrate status/up/down, the world corpus) is retired. 0.5 is a fresh instance and carries no data forward from it.

The authoring contract

services/platform/backend/db/migrations/NNNN_snake_case_subject.sql
  • NNNN is the next zero-padded number, no gaps, no reuse. Filename order IS apply order, and the filename is the identity recorded in app_migrationsnever rename a file that has shipped, or every existing deployment re-applies it.
  • One subject per file. The name says what it is (0057_competence_records.sql), not what you did (0057_fix.sql).
  • Everything lands in the app schema (CREATE TABLE app.x), the app's own namespace. Better Auth owns the unqualified tables ("user", "member", "organization") and migrates itself; pg-boss owns pgboss. Never write either from here.
  • Comment the WHY at the top, and on any column whose meaning is not obvious from its name — these files are the schema's documentation. Look at 0057_competence_records.sql for the house style (what the table is for, which rule an index encodes, why a row is retained rather than deleted).
  • Timestamps are bigint epoch-millis columns named *_at_ms (the app's clock is JS). id text PRIMARY KEY DEFAULT gen_random_uuid() is the standard key.

Read the full file on GitHub · 94 lines

Files

What ships with it

1 file 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. 2d ago First seen · 94 lines · 152 tokens per session scan A 40cf9f18ac12

Subscribe to this mod's changes

create-migration is a skill published in the GitHub repository tale-project/tale (23 stars, last pushed 2d ago), licensed MIT. It adds 152 tokens to every session and 1,413 once invoked, about $0.0008 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-30.

Related

Other skills, from other repositories

audit-event

Use when adding or changing an audit event, the audit log schema, SIEM export, or anything writing to auditevents. Also use when adding a code path that grants or denies access, since denials are events. Triggers on "audit", "audit log", "auditevents", "SIEM", "journal", "access log", "who read what".

nacre-work/nacre · 77 tokens

db-migration

Use when changing the PostgreSQL schema, adding a migration under packages/core/migrations, or touching row-level security, the grants table, tombstones, or the audit table. Triggers on "migration", "schema", "DDL", "RLS", "row level security", "ALTER TABLE", "new column", "index" in a database context.

nacre-work/nacre · 76 tokens

mcp-tool

Use when adding or changing an MCP tool, the MCP transport, or MCP authorization in packages/mcp — tool schemas, tools/list, the Streamable HTTP endpoint, STDIO mode, OAuth, CIMD, EMA, or ID-JAG. Triggers on "MCP tool", "tools/list", "Streamable HTTP", "Mcp-Method", "CIMD", "DCR", "EMA", "ID-JAG", "resource server"…

nacre-work/nacre · 110 tokens

open-core-boundary

Use when deciding whether a feature belongs in this open-source repository or in the private nacre-enterprise one, when adding an extension point, or when a change touches multi-tenancy, SSO, SCIM, document-level deny rules, EMA/ID-JAG, the audit log, the global admin, or quotas. Triggers on "enterprise"…

nacre-work/nacre · 107 tokens

authz-change

Use when changing anything under packages/core/authz, the grants table, the effective-principals cache, or the vector pre-filter — the permission resolver, deny handling, scope inheritance, ACL tags, or the T1-T25 suite. Also use when a change elsewhere could affect who can see what, such as touching search filters…

nacre-work/nacre · 119 tokens

config-var

Use when adding, renaming, or removing an environment variable, changing startup configuration validation, adding a Compose profile or service, or adding a Prometheus metric. Triggers on "environment variable", "NACRE", "config", "docker compose", "profile", "metrics", "healthcheck", "readiness".

nacre-work/nacre · 68 tokens