migrate

A guided starting point for moving an application's authorization to SpiceDB. SpiceDB is a service for defining relationships and checking who may access resources.

In plain words
What is it for?
It analyzes the application, identifies authorization complexity, records migration decisions, and writes an authorization plan with next steps.
Why use it?
It turns a broad authorization project into a recorded plan with decisions, phases, and follow-up commands.

Command

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/authzed/authzed-marketplace/migrate
Clone the repo
git clone --depth 1 https://github.com/authzed/authzed-marketplace
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 14,295 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.00029 $0.14295
Opus 5 $0.00015 $0.07147
Sonnet 5 $0.00006 $0.02859
Haiku 4.5 $0.00003 $0.01430

Measured 2d ago against content hash 5af57482283f, 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.

spicedb-dev/commands/migrate.md · 786 lines

How it starts

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

Migrate to SpiceDB

Phase 0 of the migration pipeline, and the migration's front door: analyze the source system, hold the single pre-flight gate, write the plan every later phase reads, and route into phase 1.

This command decides nothing on its own and converts nothing. It launches the migration-analyzer agent, presents everything that agent found, resolves it with the user in one batch, and records the result. Batching is the point: the decisions interact -- tenancy constrains the identifier strategy, which constrains the data rewrite, which constrains every call site -- and a user asked one question at a time cannot see those interactions.

Outputs, written to [output-dir] (default: [project-dir] -- the project being migrated, not the shell's current working directory, which would scatter this pipeline's state into an unrelated place and leave every later phase unable to find it):

  • migration-map.json -- the machine-readable record of every decision, the identifier map, and phase status, in the shape migrating-to-spicedb/references/findings-report.md specifies. Every later phase reads and writes state here, and nowhere else.
  • migration-plan.md -- a human-readable rendering of that same file, for review. No phase parses it back in.

The plan is a pure rendering of the map, regenerated every time a phase touches it -- see migrating-to-spicedb/references/findings-report.md's "Two groups of sections, one rule each" for exactly which sections that covers.

Exactly one gate runs per migration. This command is it. /spicedb-dev:migrate-schema holds a reduced inline gate only when it is run standalone with no map present; once this command has written migration-map.json, that inline gate is skipped by its own step 1 and phase 1 reads the recorded state instead of re-asking.

Progress Tracking

Before starting, use TaskCreate to create a task for each step. Use TaskUpdate to mark each task in_progress when starting and completed when done.

Read the full file on GitHub · 786 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 · 786 lines · 29 tokens per session scan A 5af57482283f

Subscribe to this mod's changes

migrate is a command published in the GitHub repository authzed/authzed-marketplace (2 stars, last pushed 6d ago), licensed Apache-2.0. It adds 29 tokens to every session and 14,295 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-31.