{"name":"db-migration-risk","description":"Audits database migrations for risky SQL before deploy. Walks migrations/, prisma/migrations/, db/migrate/, supabase/migrations/, and alembic/versions/ and flags destructive DDL, lock-heavy ALTER TABLE, NOT NULL without DEFAULT, plain CREATE INDEX (vs CONCURRENTLY), unbounded TRUNCATE/DELETE, and FK validation without NOT VALID. Returns 0-100 score, per-finding kind/severity/path/line/evidence/recommendation, and a Venice plain-English verdict. Dual input: {repo: 'owner/name'} for public GitHub or {files: [{path, content}, ...]} for private / agent-workspace use. Use it as a SQL migration safety check, DROP COLUMN detector, unsafe ALTER TABLE detector, Postgres CREATE INDEX CONCURRENTLY check, Alembic op.drop_* detector, TRUNCATE/DELETE WHERE detector, foreign key NOT VALID check, or pre-deploy DB gate.","price":"$0.02","method":"POST","input_schema":{"oneOf":[{"type":"object","properties":{"repo":{"type":"string","description":"GitHub repo in 'owner/name' format"},"branch":{"type":"string","description":"Optional branch; defaults to repo's default_branch"}},"required":["repo"]},{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"}},"required":["path","content"]}}},"required":["files"]}]},"input_example":{"repo":"rooz21/prooflayer-fixtures"},"output_example":{"score":70,"risk_level":"high","findings":[{"kind":"drop_column","severity":"high","path":"migrations/0042_remove_legacy.sql","line":1,"evidence":"ALTER TABLE users DROP COLUMN legacy_id;","recommendation":"Dropping a column is irreversible — confirm intent + add a feature flag + verify no remaining readers in app code."},{"kind":"index_no_concurrently","severity":"medium","path":"migrations/0099_add_index.sql","line":1,"evidence":"CREATE INDEX idx_users_email ON users(email);","recommendation":"On Postgres, plain CREATE INDEX takes an ACCESS EXCLUSIVE lock — use CREATE INDEX CONCURRENTLY for production tables."}],"signals":{"migration_dirs_scanned":6,"files_scanned":2,"finding_counts_by_kind":{"drop_column":1,"index_no_concurrently":1}},"summary":"A DROP COLUMN on users.legacy_id is irreversible and a plain CREATE INDEX will lock the table. Wrap in a feature flag and switch to CONCURRENTLY.","metadata":{"repo":"rooz21/prooflayer-fixtures","branch":"main","files_scanned":2,"files_fetched_via_api":1}},"x402_payment_required":true,"x402_facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}