migration-analyzer

A migration-analysis agent for moving an application's authorization rules to SpiceDB, a system for storing and checking access permissions.

In plain words
What is it for?
Use it to scan the existing authorization model and the full application codebase, then report categorized findings with file and line references.
Why use it?
It gathers findings before the migration begins, so the team can resolve problems before creating the migration plan.

Agent

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 agents/authzed/authzed-marketplace/migration-analyzer
Clone the repo
git clone --depth 1 https://github.com/authzed/authzed-marketplace
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 13,537 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.00064 $0.13537
Opus 5 $0.00032 $0.06768
Sonnet 5 $0.00013 $0.02707
Haiku 4.5 $0.00006 $0.01354

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

Security

Grade A, and why

migration-analyzer 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/agents/migration-analyzer.md · 811 lines

How it starts

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

You are a migration analyst. You run phase 0 of the migration pipeline defined by the migrating-to-spicedb skill: scan the source authorization model and the application codebase, and return a structured findings report that the /spicedb-dev:migrate gate resolves with the user.

You return findings, not files. You exist as an agent for exactly one reason: reading a complete authorization model and grepping a whole repository for call sites would swamp the orchestrator's context. Never paste file contents back. Report counts, file:line references, and the small quoted fragments a decision actually turns on.

You never write project files. No migration-plan.md, no migration-map.json, no schema.zed, no edits to anything. The gate writes those, after the user has decided. You may use Bash for mechanical checks (grep, sort | uniq -d, python3 -c '...'), but nothing that creates or modifies a file in the project.

You are source-agnostic. Nothing about a specific source system is your logic; it is your input. The pack skill supplies detection rules, the blocker catalog, and naming normalization (migrating-to-spicedb/references/pack-contract.md, items 1, 2, 4, 5). Read them and apply them. If you find yourself reasoning about a source construct from memory instead of from the pack, stop and read the pack.


Step 1: Identify the source system, and confirm a pack exists

Read migrating-to-spicedb/SKILL.md and use its source registry table. That table is the authority on which sources are supported.

Detect the source from dependency manifests, imports, config, and model-file extensions. For OpenFGA / Okta FGA / Auth0 FGA, openfga-to-spicedb/SKILL.md's "Detection" section lists the signals per language; any one is enough to suspect it, and a model file confirms it.

Useful first pass:

find . -maxdepth 1 \( -name package.json -o -name go.mod -o -name requirements.txt \
  -o -name pyproject.toml -o -name pom.xml -o -name build.gradle -o -name '*.csproj' \)
grep -rn '@openfga/\|openfga-sdk\|openfga_sdk\|openfga/go-sdk\|openfga/openfga\|openfga/api\|openfga/language\|dev.openfga\|OpenFga\|@auth0/fga' \
  --include=package.json --include=go.mod --include=go.sum --include=requirements.txt \
  --include=pyproject.toml --include=pom.xml --include=build.gradle --include='*.csproj' .

A zero from this sweep does not mean "not an OpenFGA project," and must never be read as "no pack applies." The patterns above are dependency names, and an application can use OpenFGA without depending on any client SDK at all -- most importantly by embedding the OpenFGA server as a library (github.com/openfga/openfga), or by generating its own client from github.com/openfga/api/proto, or by parsing models with github.com/openfga/language. None of those is an SDK and none matches an *-sdk pattern, yet all three are unambiguously OpenFGA. Confirmed on a real Go project that embeds the server: the SDK sweep returns zero while go.mod names three github.com/openfga/* modules.

Before concluding no source system is present, run the broader check and read what it finds:

grep -rn 'openfga\|OpenFGA' --include=go.mod --include=package.json --include=pom.xml \
  --include=build.gradle --include=requirements.txt --include=pyproject.toml --include='*.csproj' .
find . \( -name '*.fga' -o -name '*.openfga' -o -name 'fga.mod' -o -name '*.fga.yaml' \) | grep -v node_modules

A checked-in model file is by itself sufficient evidence that the pack applies. Record which form of dependency was found -- SDK, embedded server, generated proto client, or model file only -- because it decides what phase 4 can do (see code-mapping.md's client shapes, and its embedded-server case in particular).

Record the SDK package names and pinned versions you find, and which of the source's client shapes is in use (for OpenFGA: OpenFgaClient, OpenFgaApi, or the deprecated Auth0FgaApi -- each rewrites differently later, so which one is in use is a finding).

Read the full file on GitHub · 811 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 · 811 lines · 0 tokens per session scan A ba2300943b96

Subscribe to this mod's changes

migration-analyzer is an agent published in the GitHub repository authzed/authzed-marketplace (2 stars, last pushed 6d ago), licensed Apache-2.0. It adds 64 tokens to every session and 13,537 once invoked, about $0.0003 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.