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 agentmods add skills/tmj-90/gaffer/add-db-migrationnpx 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.svg" alt="Measured on agentmods" 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.00662 |
| Opus 5 | $0.00032 | $0.00331 |
| Sonnet 5 | $0.00013 | $0.00132 |
| Haiku 4.5 | $0.00006 | $0.00066 |
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 5d 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 — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add a database migration
Schema changes are high-risk: they can lock tables, drop data, or break running code. Produce a reversible migration that follows the repo's tooling — and escalate when a human decision is needed.
Steps
- Read the lore first. Call
search_lore(Memory MCP) for migration conventions: the tool (Flyway/Liquibase/Alembic/Prisma/Knex/…), naming/numbering, whether migrations must be backward-compatible with running code, and any ADR on zero-downtime changes. - Assess the risk. If the change is destructive (drop column/table, narrow a type,
non-nullable add without default), rewrites a large table, or could cause downtime or
data loss — stop and call
mark_ticket_blockedwith the specifics. A human decides. - Write a reversible migration using the repo's generator. Provide both up and down (or an explicit, justified note when a true rollback is impossible). Prefer additive, backward-compatible steps; split risky changes into expand → migrate → contract phases.
- Make it safe at scale. Add indexes concurrently where the engine supports it; add columns nullable or with a default; backfill in batches, not one statement.
- Apply it against a test/dev database (the context packet's DB; never production) and confirm it runs forward and rolls back cleanly. Add/adjust tests for the new schema.
- Run tests (
run-tests). Evidence the migration file, the apply+rollback output, and test results, then use therecord-evidenceskill and submit for review.
Rules
- Every migration must be reversible, or carry an explicit reason it cannot be.
- Destructive or downtime-risking changes →
mark_ticket_blocked; do not decide alone. - Never run migrations against production; use the test/dev DB from the packet.
- Don't install DB tooling or write secret/
.envfiles — the hook blocks both. - Run on a branch (the
create-branchskill), never a protected branch.
Capture lore
This skill is one of the places durable, reusable knowledge naturally surfaces:
A schema decision or migration constraint future agents must respect — a naming convention, a reversibility rule, or a modelling choice with downstream impact. That kind of fact is lore. Capture it via the lore-capture
protocol in your brief (CLAUDE.factory.md, step 11 "Memory contribution"):
call the Memory MCP suggest_lore once at the close of your work — reusable
conventions, gotchas, decisions, and boundaries only, never per-ticket trivia.
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.
- 5d 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 5d ago), licensed Apache-2.0. It adds 65 tokens to every session and 662 once invoked, about $0.0003 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.
Other skills, from other repositories
database-query-profiler
Profile database query profiler operations. Auto-activating skill for Performance Testing. Triggers on: database query profiler, database query profiler Part of the Performance Testing skill category. Use when working with database query profiler functionality. Trigger with phrases like "database query profiler"…
database-schema-designer
Build database schema designer operations. Auto-activating skill for Backend Development. Triggers on: database schema designer, database schema designer Part of the Backend Development skill category. Use when working with database schema designer functionality. Trigger with phrases like "database schema designer"…
database-schema-visualizer
Generate database schema visualizer operations. Auto-activating skill for Visual Content. Triggers on: database schema visualizer, database schema visualizer Part of the Visual Content skill category. Use when working with database schema visualizer functionality. Trigger with phrases like "database schema…
database-test-helper
Assist with database test helper operations. Auto-activating skill for Test Automation. Triggers on: database test helper, database test helper Part of the Test Automation skill category. Use when writing or running tests. Trigger with phrases like "database test helper", "database helper", "database".
dbt-test-creator
Create dbt test creator operations. Auto-activating skill for Data Pipelines. Triggers on: dbt test creator, dbt test creator Part of the Data Pipelines skill category. Use when writing or running tests. Trigger with phrases like "dbt test creator", "dbt creator", "dbt".
database-operations
Instructions on how to write database queries with SQLAlchemy.