webhook: Skill for Claude Code

.claude/skills/data-migration/SKILL.md

data-migration is a skill for Claude Code from webhook-co/webhook. It costs 43 tokens per session (794 once invoked), scanned A, original, Apache-2.0.

A set of rules for changing a Postgres database schema and its stored data safely. Postgres is a relational database; the process uses separate expansion, data backfill, and cleanup stages that can be rolled back.

In plain words
What is it for?
Use it when adding or changing database tables or columns, filling new fields in batches, changing the data model, checking rollback plans, or applying production migrations.
Why use it?
It reduces downtime and data loss during changes to tables, columns, or records. It also protects tenant separation, audit history, privacy, and accurate event counts.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

Nothing to install: this file belongs to webhook-co/webhook. 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/webhook-co/webhook/main/.claude/skills/data-migration/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/webhook-co/webhook

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/webhook-co/webhook/data-migration"><img src="https://agentmods.dev/badge/skills/webhook-co/webhook/data-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 794 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.00043 $0.00794
Opus 5.5 $0.00017 $0.00318
Sonnet 5.5 $0.00009 $0.00159
Haiku 4.5 $0.00004 $0.00079

Measured 1mo ago against content hash 76047ca84934, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

data-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 1mo 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.

.claude/skills/data-migration/SKILL.md · 61 lines

How it starts

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

Data migration

Change the Neon Postgres schema (metadata, config, dedup/idempotency keys) without downtime or data loss. Raw payloads live in R2, not Postgres — migrations touch metadata, not bodies.

Expand → backfill → contract

Never do a breaking change in one step. Split across releases:

  1. Expand — add new columns/tables (nullable/defaulted), additive only. Deploy. Nothing reads the new shape yet.
  2. Backfill — populate new fields in idempotent, re-runnable batches, off the hot path. Never hold a long lock on a hot table.
  3. Contract — switch reads/writes to the new shape, verify, then (in a later release) drop the old shape once rollback is no longer needed.

Safety checklist

  • Migration is idempotent and safe to re-run.
  • Tenant isolation preserved: RLS policies updated for new/changed tables.
  • No PII/PHI moved into logs; no raw payloads pulled into Postgres.
  • Tested rollback path exists before production.
  • Audit log untouched — never rewrite or delete hash-chained audit history.
  • Metering data integrity preserved (event counts stay accurate, single-dimension, dedup-safe).

Applying to prod (schema-before-deploy)

Migrations are applied manually, decoupled from CD, and before the code that depends on them deploys. Apply with scripts/apply-prod-migrations.sh (with DATABASE_URL set to the prod webhook_owner connection) — not a bare dbmate up. The script runs the migration and advances the global prod-schema git tag to the applied commit.

That tag is the deploy migration-guard's source of truth: the three deploy workflows (deploy.yml / deploy-web.yml / deploy-auth.yml) block an auto deploy whenever HEAD is ahead of prod-schema by a migration — so new code can never auto-deploy against an un-applied schema. If you apply with a bare dbmate up, the tag doesn't move and the next migration-bearing push will be blocked with a message telling you to run the script. Recovery from a block: run the script (applies + advances the tag), then push — or workflow_dispatch to override (which does not move the tag, so it can't blind the guard).

Read the full file on GitHub · 61 lines

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. 1mo ago First seen · 61 lines · 43 tokens per session scan A 76047ca84934

Subscribe to this mod's changes

data-migration is a skill published in the GitHub repository webhook-co/webhook (0 stars, last pushed 18d ago), licensed Apache-2.0. It adds 43 tokens to every session and 794 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

nlqdb-memory

Give this agent persistent, queryable memory over the nlqdb MCP server. Use whenever the agent needs to remember something across sessions, recall what it stored, or aggregate over its memory (GROUP BY / JOIN / counts / trends) — backed by a real Postgres it queries in plain English, not a vector store.

nlqdb/nlqdb · 70 tokens

openclaw-database-toolkit

Database operations MCP server with 5 tools for D1, PostgreSQL, and MongoDB. Use when: (1) 'query my D1 database' or 'run this SQL', (2) 'insert these records' or 'add rows to table', (3) 'update records where X' or 'bulk update', (4) 'show me the table schema' or 'what columns exist', (5) 'migrate this schema' or…

yedanyagamiai-cmd/openclaw-mcp-servers · 128 tokens

amazon aurora dsql

Deprecated compatibility redirect for Aurora DSQL guidance. Use when a request concerns DSQL, Aurora DSQL, distributed SQL, DSQL schemas, migrations, queries, authentication, performance, or application development.

awslabs/mcp · 46 tokens

postgresdb

Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR). PG16, ORM-agnostic. NOT portable query logic (that is sql), NOT a managed provider's platform…

ericrisco/rsc-harness · 91 tokens

neon

Use when you have picked Neon (serverless Postgres) and need to connect correctly from a serverless or edge runtime, wire database branching into dev, preview and CI, or stop being burned by scale-to-zero cold starts and pooler limits — including choosing HTTP versus WebSocket connections and pooled versus direct…

ericrisco/rsc-harness · 93 tokens

mesh-memory

Self-hosted semantic memory for AI agents via MCP. Save worklogs, decisions, and notes, then recall them across sessions by meaning, not keyword. Postgres + pgvector with auto-tagging.

skillmds/skillmd · 44 tokens