db-migration-review

db-migration-review is a skill for Cursor from codeready-toolchain/tarsy. It costs 68 tokens per session (1,067 once invoked), scanned A, original, Apache-2.0.

A review step for database migration files generated by Atlas after changes to an Ent database schema. Atlas compares the schema with a development database, but schema differences it cannot represent may produce unrelated SQL operations.

In plain words
What is it for?
Use it after running `make migrate-create` to inspect the `.up.sql` file and remove unrelated schema-drift operations, especially unsafe partial-index changes.
Why use it?
It helps prevent an automatically generated migration from removing manually managed database objects or recreating indexes unnecessarily. The review keeps the migration focused on the intended schema change.

Skill for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions subagents.

Good fit Use it after running make migrate-create to inspect the .up.sql file and remove unrelated schema-drift operations, especially unsafe partial-index changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/codeready-toolchain/tarsy/db-migration-review
Install

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.

Any agent
npx skills add codeready-toolchain/tarsy --skill db-migration-review
Clone the repo
git clone --depth 1 https://github.com/codeready-toolchain/tarsy

Made for: Cursor.

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 db-migration-review

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/codeready-toolchain/tarsy/db-migration-review"><img src="https://agentmods.dev/badge/skills/codeready-toolchain/tarsy/db-migration-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,067 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.00068 $0.01067
Opus 5.5 $0.00027 $0.00427
Sonnet 5.5 $0.00014 $0.00213
Haiku 4.5 $0.00007 $0.00107

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

Security

Grade A, and why

db-migration-review 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.cursor/skills/db-migration-review/SKILL.md · 79 lines

How it starts

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

DB Migration Review

When to Apply

After every make migrate-create run, review the generated .up.sql file before committing. Atlas diffs the Ent schema against a dev database and frequently emits unrelated operations due to schema drift it cannot model.

Known Atlas Drift Patterns

1. Dropping manually-managed partial indexes

Atlas cannot express WHERE clauses in index definitions. Several indexes are created manually in migrations and documented in Ent schema comments. Atlas sees them in the database but not in the Ent schema, so it generates DROP INDEX statements.

Known indexes Atlas cannot model (must never be dropped):

Index Table Created in
agentexecution_stage_id_agent_index_top_level agent_executions 20260225235224_add_orchestrator_sub_agent_fields.up.sql
agentexecution_parent_execution_id_agent_index_sub_agent agent_executions 20260225235224_add_orchestrator_sub_agent_fields.up.sql
idx_alert_sessions_alert_data_gin alert_sessions CreateGINIndexes in pkg/database/migrations.go
idx_alert_sessions_final_analysis_gin alert_sessions CreateGINIndexes in pkg/database/migrations.go
idx_timeline_events_content_gin timeline_events CreateGINIndexes in pkg/database/migrations.go
idx_alert_sessions_labels_gin alert_sessions CreateGINIndexes in pkg/database/migrations.go

The first two enforce sub-agent ordering uniqueness with WHERE parent_execution_id IS NULL / IS NOT NULL clauses. The Ent schema at ent/schema/agentexecution.go documents this explicitly. The GIN indexes are created at startup by CreateGINIndexes (FTS and JSONB containment); Atlas cannot express them.

Action: Remove any DROP INDEX targeting these indexes.

2. No-op index drop + recreate

Atlas sometimes re-emits a DROP INDEX + CREATE INDEX pair for indexes that already exist with identical definitions. This commonly affects partial unique indexes like sessionscore_session_id.

Read the full file on GitHub · 79 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 Changed · +4 lines fbe4aa9228e0
  2. 1mo ago First seen · 75 lines · 68 tokens per session scan A 7a2eb253f712

Subscribe to this mod's changes

db-migration-review is a skill published in the GitHub repository codeready-toolchain/tarsy (10 stars, last pushed 3d ago), licensed Apache-2.0. It adds 68 tokens to every session and 1,067 once invoked, about $0.0003 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

migration-review

Review database migration files when a change adds or modifies paths under migrations/. Use it before merge to collect forward, rollback, locking, and data-safety evidence.

rohitg00/ai-engineering-from-scratch · 35 tokens

sage-review

Deep, platform-neutral code review for PRs and CRs in ONE thorough single pass — design reasoning (Problem Worth Solving & Solution Fit) as one dimension alongside the 9 code-level dimensions, with chain-of-consequences, self-critique, and draft-only comments. The single app-owned source of truth.

kirodotdev/KiroCrew · 68 tokens

learn-from-sage

Detection-gap (miss) analysis for Code Review Sage. Learn from shipped fixes, acted-on human comments, and design outcomes to close reviewer blind spots. Inline during review stages a candidate; a human triggers a one-shot AI consolidation into the live ruleset.

kirodotdev/KiroCrew · 56 tokens

pr-review

Review a GitHub pull request using multiple expert personas. Takes a PR URL as input, analyzes the changes, and generates comprehensive review feedback from different perspectives (Merge Specialist, Frontend, Backend, Security, DevOps, AI/Agent, SRE, Chief Architect).

agentic-community/mcp-gateway-registry · 57 tokens

review-fix-signoff-loop

Use when writing Agent Relay or Ricky workflows that must loop review, fix, and validation with fresh agent context until independent signoff agents, typically Claude and Codex, both agree the work is comprehensively complete. Covers fresh-context iterations, repairable gates, dual reviewer verdict contracts…

AgentWorkforce/relay · 77 tokens

github-review-pr

Review GitHub pull requests with detailed, multi-perspective code analysis using parallel subagents. Use this skill whenever the user wants to review a PR, asks for code review on a pull request, mentions "review PR", "check this PR", "look at pull request", or references a PR number or GitHub PR URL. Do NOT use for…

feiskyer/claude-code-settings · 90 tokens