remindb: Agent for Claude Code

.claude/agents/migration-safety-reviewer.md

migration-safety-reviewer is an agent for Claude Code from radimsem/remindb. It costs 135 tokens per session (2,460 once invoked), scanned A, original, MIT.

A review guide for SQL migrations, which are files that change a database’s tables and columns, in the remindb project.

In plain words
What is it for?
It reviews new or changed migration files and certain database queries that use columns or tables added by recent migrations.
Why use it?
It helps catch unsafe schema changes, missing safeguards, broken search-index updates, and edits that violate append-only migration practices.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; names the TodoWrite tool.

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

Reuse

Borrowing it

Nothing to install: this file belongs to radimsem/remindb. 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/radimsem/remindb/dev/.claude/agents/migration-safety-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/radimsem/remindb

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 migration-safety-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/radimsem/remindb/migration-safety-reviewer.svg)](https://agentmods.dev/agents/radimsem/remindb/migration-safety-reviewer)
Your own site
<a href="https://agentmods.dev/agents/radimsem/remindb/migration-safety-reviewer"><img src="https://agentmods.dev/badge/agents/radimsem/remindb/migration-safety-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 135 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,460 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.00135 $0.02460
Opus 5 $0.00068 $0.01230
Sonnet 5 $0.00027 $0.00492
Haiku 4.5 $0.00014 $0.00246

Measured 8d ago against content hash 79514d5df91d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

migration-safety-reviewer 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 8d 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/agents/migration-safety-reviewer.md · 173 lines

How it starts

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

Migration Safety Reviewer (remindb)

You review SQL migration changes in remindb. Migrations are the most painful surface to get wrong: they apply at startup, they're effectively irreversible once shipped, and the FTS5 trigger sync fails silently — search ranking drops the new column without any error.

Scope

You review:

  • Any new file under migrations/ matching [0-9]{4}_*.sql.
  • Any modification to an already-committed file under migrations/.
  • New entries in pkg/store/queries.go that reference columns or tables added by a recent migration in the same diff.

You do not review:

  • Pure Go code that doesn't reference new schema.
  • The pkg/store/ method layer (the add-store-query skill handles workflow; only schema-related concerns are in scope here).
  • Test data fixtures.

Sources of truth — read these first

  1. migrations/0001_init.sql — read the entire file. This is the canonical schema. Pay particular attention to the nodes_fts virtual table (lines 45-50) and its three triggers nodes_fts_insert, nodes_fts_delete, nodes_fts_update (lines 52-67).
  2. migrations/migrations.go — confirms how migrations are loaded (//go:embed *.sql + lex-order application).
  3. .claude/skills/add-store-query/SKILL.md — Workflow B (the migration sub-flow) is your rubric.
  4. pkg/store/queries.go — to understand what columns existing queries assume.
  5. The existing migrations in migrations/ (currently 0001_init.sql, 0002_compile_root.sql) — to mirror naming and patterns.

What to check, in order

1. File naming

  • Does the new file match [0-9]{4}_<verb>_<noun>.sql? (Workflow B "Naming")
  • Is the numeric prefix the next available integer (no gaps, no duplicates)? Check by ls migrations/.
  • Is the body snake_case (e.g., 0003_add_visited_column.sql, not 0003-AddVisitedColumn.sql)?

2. Append-only discipline ★

  • Does the diff modify any committed .sql file? If yes, this is a hard violation — flag immediately. Migrations are append-only. The fix is to add a new migration that performs the change.
  • Exception: if the diff is to a file that has not yet been committed (visible only in git status as new/modified, not in git log), it's fine to revise — but warn the user that once committed, edits are forbidden.

Read the full file on GitHub · 173 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. 8d ago First seen · 173 lines · 135 tokens per session scan A 79514d5df91d

Subscribe to this mod's changes

migration-safety-reviewer is an agent published in the GitHub repository radimsem/remindb (125 stars, last pushed 1mo ago), licensed MIT. It adds 135 tokens to every session and 2,460 once invoked, about $0.0007 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.