migrate

A deployment check for database migrations, which are controlled changes to a database's structure or stored data.

In plain words
What is it for?
Use it after a release deploy to verify the platform database and, when applicable, the extensions database migrated cleanly.
Why use it?
It helps confirm that migrations ran successfully when the orchestrator daemon starts, and exposes failures through a daemon that does not boot.

Command for Claude Code

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.

agentmods
npx agentmods add commands/robofinsystems/robosystems/migrate
Clone the repo
git clone --depth 1 https://github.com/RoboFinSystems/robosystems

Made for: Claude Code.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,222 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00017 $0.01222
Opus 5 $0.00009 $0.00611
Sonnet 5 $0.00003 $0.00244
Haiku 4.5 $0.00002 $0.00122

Measured 2d ago against content hash bb2f44300b93, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

migrate 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 2d 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/commands/migrate.md · 58 lines

How it starts

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

Verify that a release's database migrations applied cleanly. In this system migrations run automatically on the orchestrator daemon's boot during a deploy — so "running a migration" is almost always watching that boot succeed, not invoking anything by hand. Pairs with the migration-monitoring runbook in local/RoboSystems/runbooks/ for exact service/log-group names and the manual fallback — read it alongside this file.

How migrations actually run here

  • The orchestrator daemon is a singleton (desired count 1). On boot it runs the schema migrations before the daemon comes up: platform database first, then the extensions database (only when a product domain that uses it is enabled). The behavior is gated by an environment flag rather than by environment name, so the same path runs locally too.
  • Migrations are fail-closed: if a migration errors, the entrypoint aborts and the daemon does not start. A bad migration therefore surfaces as a daemon that won't boot / a crash-looping task — not as silent drift.
  • One seam to know: the schema migrations are fail-closed, but the orchestrator's own storage-database existence check immediately before them is deliberately fail-open — it logs and continues. So a daemon that boots but misbehaves around its own run storage points there, not at the migrations.
  • This means the schema is migrated as part of the normal deploy of the release that carries it. There is no separate "migrate" button for the common case.

When this runs

  • Common (~99%): a release includes a migration and you want to confirm it landed → tail the daemon boot logs during/after the deploy for the success marker, and confirm the daemon reached a running state.
  • Rare (<1%): migrations must be applied out-of-band (daemon can't boot, or you're forcing a schema change ahead of the app). That's the manual path — a tunnel to the bastion + the migrate recipe — and it's in the runbook.

Scope & guardrails

  • Reading logs is free; applying a migration is not. Tailing the daemon's log group and checking task health need no confirmation. The manual apply path mutates the production schema — confirm with the user, and never run it speculatively.
  • Two databases, two histories. Platform and extensions migrate independently. When something's off, say which database — the log lines and the migrate recipe are per-database.
  • Autogenerate only. If a fix requires a new migration, it comes from updating the model + autogenerating — never hand-author one against prod.

Read the full file on GitHub · 58 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. 2d ago First seen · 58 lines · 17 tokens per session scan A bb2f44300b93

Subscribe to this mod's changes

migrate is a command published in the GitHub repository RoboFinSystems/robosystems (24 stars, last pushed 3d ago), licensed Apache-2.0. It adds 17 tokens to every session and 1,222 once invoked, about $0.0001 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.