All loops
Claude CodeHard 8 min· claude-haiku-4-5

Migration safety check

Blocks merge if a SQL migration is non-reversible without a plan.

NOT DEPLOYEDNOT DEPLOYED
0145ms
Trigger
POST https://hooks.claudeloops.run/migration-safety-check · event=github.push:main
02925ms
Agent
claude-haiku-4-5 · in 825 tok · out 545 tok
03215ms
Tools
github-mcp/anthropic:messages.create → 200 OK · 265ms
0435ms
Verify
schema check · zod v3 passed
0565ms
Output
PR #182 opened · review comments added
0625ms
Notify
audit log written · runbook link attached
SUCCESS
0%
0 runs
P50
0ms
median
P95
0ms
tail
AVG COST
per run
LAST OK
never
LAST FAIL
never
none
Latency · last 30 runs0 samples
no runs yet
Latest output · what your users see
Openacme/infra #1845
refactor: extract locker client
8 files+205-15
  • Ran full test suite → 218 passed, 0 failed (12.3s)
  • Coverage delta: +0.4% on `src/lib/*`
  • No breaking changes detected in public API
// press Test to run once · Watch live to keep streaming · Deploy to make it real
The problem

sql,github

The outcome

Risky migrations slip through review; rollbacks are painful at 2am.

Ingredients & skills

Secrets
  • ANTHROPIC_API_KEY
  • GITHUB_TOKEN
Providers
  • Anthropic
  • GitHub
MCP servers
  • github-mcp
#claude-code#github#automation

How it works

Blocks merge if a SQL migration is non-reversible without a plan.

Step 1

1 — Create the locker

Locker `migration-safety-check` holds the GitHub token (repo scope) and the Anthropic key.

bash
locker create migration-safety-check
locker set $_ ANTHROPIC_API_KEY=sk-ant-...
locker set $_ GITHUB_TOKEN=ghp_...
Step 2

2 — Wire the GitHub event

Subscribe to the relevant GitHub webhook through the `github-mcp` server. Claude only sees the event payload and the files it requests.

Step 3

3 — Ship the agent

Single TS file in `agents/`. Stateless; the locker is bound at runtime so no env editing for new repos.

One-line deploy

The button above runs the same command with your saved config. This is the raw CLI form.

bash
npx claudeloops deploy migration-safety-check
https://hooks.claudeloops.run/migration-safety-check

Related loops