Claude-Pipeline: Skill for Claude Code

.agents/skills/new-migration/SKILL.md

new-migration is a skill for Claude Code from TheAstrelo/Claude-Pipeline. It costs 18 tokens per session (495 once invoked), scanned A, original, MIT.

A guide for creating the next numbered SQL database migration, which is a tracked change to a database's structure or data.

In plain words
What is it for?
Use it when adding a table, column, index, or other database change that needs a new migration file.
Why use it?
It prevents duplicate migration numbers and applies the repository's required safe, repeatable SQL patterns.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is TheAstrelo/Claude-Pipeline's own configuration. It tells Claude Code how to work on Claude-Pipeline 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 Claude-Pipeline configures →

Reuse

Borrowing it

Nothing to install: this file belongs to TheAstrelo/Claude-Pipeline. 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/TheAstrelo/Claude-Pipeline/main/.agents/skills/new-migration/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/TheAstrelo/Claude-Pipeline

Made for: Claude Code.

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 new-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/theastrelo/claude-pipeline/new-migration/github.svg)](https://agentmods.dev/skills/theastrelo/claude-pipeline/new-migration)
Your own site
<a href="https://agentmods.dev/skills/theastrelo/claude-pipeline/new-migration"><img src="https://agentmods.dev/badge/skills/theastrelo/claude-pipeline/new-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.

agentmods 80×15 button for new-migration

Your own site · 80×15
<a href="https://agentmods.dev/skills/theastrelo/claude-pipeline/new-migration"><img src="https://agentmods.dev/badge/skills/theastrelo/claude-pipeline/new-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 495 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00018 $0.00495
Opus 5 $0.00009 $0.00247
Sonnet 5 $0.00004 $0.00099
Haiku 4.5 $0.00002 $0.00049

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

Security

Grade A, and why

new-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 12d 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/new-migration/SKILL.md · 58 lines

What it actually says

Create a new database migration SQL file. Follow these steps exactly:

Step 1: Find the next migration ID

Read the current migration files in src/infrastructure/database/migrations/ and find the highest numbered migration file. The new migration ID is that number + 1.

Known duplicate IDs: Migrations 116 and 133 have duplicates — be aware of this but it only matters if creating migrations in that range (you won't be).

Step 2: Create the migration file

Create: src/infrastructure/database/migrations/<ID>_$ARGUMENTS.sql

Example: If the highest migration is 226_add_user_quota.sql and the user wants "add_status_to_contacts", create 227_add_status_to_contacts.sql.

Step 3: Write safe, idempotent SQL

All migrations 206+ MUST be safe and idempotent. Use these patterns:

-- For new tables:
CREATE TABLE IF NOT EXISTS table_name (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
  created_at TIMESTAMPTZ DEFAULT NOW(),
  updated_at TIMESTAMPTZ DEFAULT NOW()
);

-- For new columns:
ALTER TABLE table_name ADD COLUMN IF NOT EXISTS column_name VARCHAR(100);

-- For indexes:
CREATE INDEX IF NOT EXISTS idx_table_column ON table_name(column_name);

-- For constraints:
DO $$ BEGIN
  ALTER TABLE table_name ADD CONSTRAINT constraint_name UNIQUE (col1, col2);
EXCEPTION WHEN duplicate_object THEN NULL;
END $$;

Step 4: Register in migrate.js

Open scripts/migrate.js and add the new migration filename to the SAFE_MIGRATIONS array at the end.

Rules

  • NEVER create destructive migrations (DROP TABLE, DROP COLUMN)
  • Always use IF NOT EXISTS / IF EXISTS for idempotency
  • Always include user_id references where applicable (multi-tenant)
  • Use TIMESTAMPTZ for timestamps, not TIMESTAMP
  • Use gen_random_uuid() for UUID defaults
  • Use ON DELETE CASCADE for foreign keys to users(id)
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. 12d ago First seen · 58 lines · 18 tokens per session scan A 84af9383abab

Subscribe to this mod's changes

new-migration is a skill published in the GitHub repository TheAstrelo/Claude-Pipeline (45 stars, last pushed 8d ago), licensed MIT. It adds 18 tokens to every session and 495 once invoked, about $0.0001 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.