truestack-database-migrations

truestack-database-migrations is a skill for Claude Code from adtn0810/truestack. It costs 183 tokens per session (2,127 once invoked), scanned A, original, MIT.

A guide for changing a live database’s structure and data safely. A database is where an application stores information; a migration changes its tables, columns, types, or rules.

In plain words
What is it for?
Use it when adding, removing, renaming, or changing columns, adding constraints, or updating existing rows in controlled batches. It also covers reversible migration steps and low-downtime changes.
Why use it?
It helps reduce outages, locked tables, and lost data when the application must keep running during a database change. It also covers changes that are split across multiple releases so old and new code can work together.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: mentions CLAUDE.md.

Part of the truestack plugin — 23 skills, 8 commands, 2 hooks shipped together

Good fit Use it when adding, removing, renaming, or changing columns, adding constraints, or updating existing rows in controlled batches. It also covers reversible migration steps and low-downtime changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adtn0810/truestack/truestack-database-migrations
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.

Any agent
npx skills add adtn0810/truestack --skill truestack-database-migrations
Clone the repo
git clone --depth 1 https://github.com/adtn0810/truestack

Made for: Claude Code.

Or install truestack, the plugin that ships this one along with the rest of its 23 skills, 8 commands, 2 hooks.

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 truestack-database-migrations

README.md
[![agentmods](https://agentmods.dev/badge/skills/adtn0810/truestack/truestack-database-migrations/github.svg)](https://agentmods.dev/skills/adtn0810/truestack/truestack-database-migrations)
Your own site
<a href="https://agentmods.dev/skills/adtn0810/truestack/truestack-database-migrations"><img src="https://agentmods.dev/badge/skills/adtn0810/truestack/truestack-database-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 truestack-database-migrations

Your own site · 80×15
<a href="https://agentmods.dev/skills/adtn0810/truestack/truestack-database-migrations"><img src="https://agentmods.dev/badge/skills/adtn0810/truestack/truestack-database-migrations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 183 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,127 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.00183 $0.02127
Opus 5 $0.00092 $0.01064
Sonnet 5 $0.00037 $0.00425
Haiku 4.5 $0.00018 $0.00213

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

Security

Grade A, and why

truestack-database-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.

skills/truestack-database-migrations/SKILL.md · 127 lines

How it starts

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

truestack-database-migrations

Changing a live schema is the highest-risk routine work on a self-hosted single server: there is no replica to fail over to, and one stuck lock can freeze the whole app. The job is to evolve the schema without an outage and without losing data — accuracy and stability over cleverness, every breaking change split across deploys.

First, read project memory — CLAUDE.md is auto-loaded (Principles + Boundaries); consult .ai/memory/ for the DB engine, migration tool, and recorded commands. If none exists, run truestack-project-memory. This is ask-first, high-risk work: route the plan through truestack-architecture-planning's approval gate before writing any migration. Then verify the PreToolUse gate before relying on it — check it is registered in the active hooks config. If wired, it hard-stops DROP/TRUNCATE/destructive DDL for a human yes before the command runs, even if settings would allow it; if not wired, obtain that explicit human yes yourself before any destructive statement. (Details: hooks/README.md at the truestack repo root, when that repo is present — a standalone copy of this skill won't have it.)

Where this skill sits: it owns the migration artifact — reversible up/down DDL, the backfill, the expand/contract sequencing. The data-access code that uses the new schema is truestack-backend-development; sequencing the migrate step in the deploy pipeline is truestack-ci-and-delivery.

1. Never break in one deploy — expand then contract

A zero-downtime breaking change is physically impossible in a single release. Old and new app code run side by side during a deploy, so the schema must stay compatible with both at once. Split it:

  • Expand (deploy 1) — add the new column/table, dual-write old+new, backfill, leave the old schema intact. Nothing breaks: both code versions still work.
  • Contract (a later deploy, after the new code has soaked) — flip reads to the new path, stop writing the old, then drop. Sequence the irreversible drop as its own final deploy.

Read the full file on GitHub · 127 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. 10d ago First seen · 127 lines · 183 tokens per session scan A 03bbf3e832af

Subscribe to this mod's changes

truestack-database-migrations is a skill published in the GitHub repository adtn0810/truestack (2 stars, last pushed 2mo ago), licensed MIT. It adds 183 tokens to every session and 2,127 once invoked, about $0.0009 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.