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.
npx skills add tmj-90/gaffer --skill add-db-migrationgit clone --depth 1 https://github.com/tmj-90/gafferWrote 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/tmj-90/gaffer/add-db-migration)<a href="https://agentmods.dev/skills/tmj-90/gaffer/add-db-migration"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/add-db-migration/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/tmj-90/gaffer/add-db-migration"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/add-db-migration.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.00065 | $0.01359 |
| Opus 5.5 | $0.00026 | $0.00544 |
| Sonnet 5.5 | $0.00013 | $0.00272 |
| Haiku 4.5 | $0.00006 | $0.00136 |
Grade A, and why
add-db-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 21d 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 — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add a database migration
During a rolling deploy the old code and the new code run against the same schema at the same time, and a migration that takes a strong lock on a busy table stalls every query behind it. So every migration must be compatible with the code on both sides of the deploy, take only brief locks, and be reversible or explicitly justified.
Steps
- Read the conventions. Call
search_lorefor the tool (Flyway, Liquibase, Alembic, Prisma, Knex, Django, Active Record, golang-migrate), naming and numbering, whether migrations run in a transaction, and any zero-downtime ADR. Generate the file with the repo's generator; never edit a migration that may already have been applied elsewhere, add a new one. - Classify the change.
- Additive and safe: new table, nullable column, column with a constant default on engines that store it as metadata (PostgreSQL 11+, MySQL 8 instant), a new index built online.
- Needs expand/contract: rename or retype a column or table, add NOT NULL, split or merge columns, drop anything still read by deployed code.
- Destructive or high-risk: dropping data, narrowing a type, rewriting a large table,
a backfill that cannot be undone. Call
mark_ticket_blockedwith the specifics and the safe plan you propose; a human decides. (On a resumed deliverymark_ticket_blockedis refused — raise it withrequest_decision, theticket_idand severityhuman_requiredinstead, and do not commit the destructive migration: the runner still submits what is committed.)
- Use expand → migrate → contract (parallel change) for anything not purely
additive, one phase per ticket or deploy:
- Expand: add the new column/table; the code writes both old and new and still reads old.
- Migrate: backfill; switch reads to new; verify.
- Contract: stop writing old; tell the ORM to ignore it; drop it in a later deploy. This ticket delivers only its phase. State in the evidence which phase this is and what the next one must do.
- Keep locks short. Set a
lock_timeout(a few seconds) so a blocked DDL fails instead of queueing all traffic behind it. On PostgreSQL:CREATE INDEX CONCURRENTLY(outside a transaction); foreign keys and CHECK constraints addedNOT VALIDthenVALIDATE CONSTRAINTseparately; NOT NULL via a validated CHECK first; unique constraints from a concurrently built unique index. On MySQL preferALGORITHM=INSTANT/INPLACE, LOCK=NONE. Never change a column type in place on a large table. - Backfill in batches, outside the schema transaction. Iterate by primary-key range
(e.g. 1,000–10,000 rows), commit per batch, make it idempotent and resumable
(
WHERE new_col IS NULL), and throttle. New writes must already populate the new column (expand phase) so the backfill converges. - Write the down migration that restores the previous schema, or a comment stating why a true rollback is impossible and how to recover (e.g. restore from the old column still present).
- Apply it against the database the repo's test setup creates (the runner scrubs
*_URLvariables such asDATABASE_URL; never point a migration at a shared or production database): run up, down, then up again, on a database that contains representative rows (an empty table hides NOT NULL, unique and type-cast failures). - Test the schema's behaviour per AC. A test that exercises each AC's own
behaviour: the constraint rejects bad rows, the default applies, the backfill fills
every row and is safe to run twice, the old and new code paths both work during the
expand phase. Run the suite (the
run-testsskill). - Evidence with the
record-evidenceskill: the migration file, the up/down/up output, the phase, and the test results.
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.
- 21d ago Changed · +46 lines b5a0daa62116
- 1mo ago First seen · 48 lines · 65 tokens per session scan A 7b13cfd5cb32
add-db-migration is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 21d ago), licensed Apache-2.0. It adds 65 tokens to every session and 1,359 once invoked, about $0.0003 per session on Opus 5.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
bulwark-brainstorm
Role-based brainstorming with dual modes: --scoped (sequential Task tool, 5 roles) and --exploratory (Agent Teams peer debate, 4 roles). Use for feasibility assessment and idea validation.
plan-creation
Create structured implementation plans via a 4-role scrum team (Product Owner, Architect, Eng/Delivery Lead, QA/Critic) with optional Agent Teams peer debate mode.
anthropic-validator
Validates Claude Code assets (skills, hooks, agents, commands, MCP servers, plugins) against official Anthropic standards. Fetches latest docs dynamically and produces structured validation reports.
code-review
Comprehensive code review with distinct aspect based sections. Use when reviewing code, checking for security issues, finding type safety problems, auditing code quality, or when user asks to review code, PRs or changes. Three-phase workflow runs static tools, LLM judgment, and writes diagnostic log.
create-subagent
Generates single-purpose Claude Code sub-agents for use via the Task tool. Use when creating dedicated sub-agents, scaffolding agent definitions, or generating agents with diagnostics and permissions setup.
test-audit
Audit test suites for T1-T4 violations using AST analysis, mock detection, and multi-stage synthesis. Invoke when user asks to audit tests, check test quality, find mock violations, review test effectiveness, or inspect test suites for over-mocking. Triggers automatic rewrites when quality gates fail.