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.
git clone --depth 1 https://github.com/authzed/authzed-marketplaceWrote 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.
[](https://agentmods.dev/commands/authzed/authzed-marketplace/migrate-code)<a href="https://agentmods.dev/commands/authzed/authzed-marketplace/migrate-code"><img src="https://agentmods.dev/badge/commands/authzed/authzed-marketplace/migrate-code/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.
<a href="https://agentmods.dev/commands/authzed/authzed-marketplace/migrate-code"><img src="https://agentmods.dev/badge/commands/authzed/authzed-marketplace/migrate-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00027 | $0.17654 |
| Opus 5.5 | $0.00011 | $0.07062 |
| Sonnet 5.5 | $0.00005 | $0.03531 |
| Haiku 4.5 | $0.00003 | $0.01765 |
Grade A, and why
migrate-code 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.
How it starts
The opening of the file, as written. The whole thing — 937 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migrate Code
Phase 4 of the migration pipeline: add a real SpiceDB client to the project, then rewrite every
OpenFGA call site into the SpiceDB equivalent -- construct by construct, per code-mapping.md --
so the conversion ends with working SpiceDB client code, not a converted schema and data set the
application still checks against the old system.
It is not the last thing the plugin automates. Phase 5
(/spicedb-dev:migrate-tests) has no ordering dependency on this command and may run before or
after it, and /spicedb-dev:migrate-verify automates cutover-strategies.md step 4's
differential harness once phase 3 has passed verification. Step 7 of this command's own report
(below) is where that routing is stated to the user; keep the two consistent.
This command does two things the earlier phases didn't need to: it changes the project's
dependencies, and it edits files a human wrote. /spicedb-dev:migrate-schema,
/spicedb-dev:migrate-data, and /spicedb-dev:migrate-tests all produce new, standalone
artifacts (schema.zed, a migration script, validation YAML) that a human reviews before
anything downstream depends on them. This command instead vendors a client into the
project's own dependency manifest and rewrites existing application source files in place.
Five traps are common enough to name up front, because each produces code that compiles
clean and then fails or answers wrong at runtime:
- A split relation is two names, and the write path and the check path need different
ones. Phase 1 turned every source
definethat fused a[...]type list with an operator into a generated relation (viewer__direct) plus a same-named permission (viewer), and recorded the pair inmigration-map.json'srelation_splits. A rewrite that carries the source name through unchanged writes to a permission -- which SpiceDB rejects outright, on every write, at runtime -- and reads relationships through a filter that errors the same way; a rewrite that carries the generated name onto a check gets a narrower answer with no error at all. Seecode-mapping.md's "The relation-split obligation," and step 6 rule 3. - Check code cannot be ported across languages mechanically. Python's
check_permissionhas nopermissionparameter at all -- it readsRelationship.resource_relation-- and Rust'scheck_permission(singular) returns aCheckResultwrapper, not a barebool. Converting a Go call site'sCheckOne(ctx, cs, "viewer", rel)shape into Python or Rust by find-and-replace produces code that either doesn't compile or discards a wrapper silently. Seecode-mapping.md's "Per-language check-signature divergence." - The identifier obligation fails closed, not at build time. Data written under
base64url(email)by/spicedb-dev:migrate-datawhile a call site still checksuser:[email protected]is a silent half-migration: the raw form fails SpiceDB's own object-id grammar on every single check, discovered in production traffic, not by a type checker orzed validate. Every call site that builds or reads an id of an encoded type must go through the codec phase 3 emitted -- seecode-mapping.md's "The identifier obligation." batchCheckordering silently corrupts results, not just names. OpenFGA's response is a map keyed bycorrelation_id, with no order guarantee. The SpiceDB client returns a plain, positionally-ordered array. Code that still pairs responses back to requests bycorrelation_idafter a rename-only conversion pairs the wrong answer to the wrong request whenever the two happen to reorder -- seecode-mapping.md's "batchCheckordering."- A sync OpenFGA source converting to Python's async-only client can turn a denial into a
silent allow. Python is the one language of the seven where this actually happens:
openfga_sdk.sync.OpenFgaClientis a real, documented sync client, but the prototypespicedb-pythonclient has no sync form at all -- every method isasync def, so the rewrite necessarily adds anawaitthat was not in the source. A call site that misses it gets back a bare coroutine object, not abool; a coroutine is truthy in Python's ownif, so a check that would answerFalsetakes the allowed branch instead, and the object compiles and runs without error. Confirmed live, and confirmed invisible topyrightandmypy --strictalike -- this is not a symptom of an untyped codebase, no Python type checker currently flags it. The other six languages do not share this shape: Go/Java/Ruby's SpiceDB targets are synchronous (noawaitto omit), and C#/Rust reject a missingawait/.awaitat compile time; TypeScript'sPromiseis truthy the same way a coroutine is, but@openfga/sdkhas no sync client for a rewrite to carry the habit over from, andtscitself flags the bare case (TS2801) under a real type-check build. Review every Python call site converted from a sync OpenFGA client for a missingawaitby inspection -- seecode-mapping.md's "Async-only target vs. sync source: the un-awaited-coroutine fail-open."
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.
- 1mo ago Changed · +1 lines 2e2af2ce5ac5
- 1mo ago First seen · 936 lines · 27 tokens per session scan A b0a7156a6a9b
migrate-code is a command published in the GitHub repository authzed/authzed-marketplace (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 27 tokens to every session and 17,654 once invoked, about $0.0001 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.
Other commands, from other repositories
init
Initialize configurations for Supabase local development.
http-service
Build, review or debug a Bun HTTP service. Loads the http-service skill, then works the task through its workflow.
build
Discover an AI Gateway's models and MCP tools, retrieve a credential, and integrate them into your app — call a model, connect MCP tools, or scaffold a runnable agent.
api-contract-review
Review an API contract (shapes, errors, auth model) BEFORE implementation for naming, versioning, pagination, idempotency, and fit with existing endpoints. Use when designing or changing endpoints. Do not use when the API is already implemented (use review-hard or repo-consistency-sweep).
start-10-1
A guided lesson on setting up clasp, a command-line tool for managing Google Apps Script projects, and connecting it to Google’s Apps Script API.
fastapi
FastAPI application design and implementation conventions. Use this skill when building, updating, or reviewing FastAPI services, routers, dependencies, request/response schemas, streaming endpoints, or API tests. Trigger on FastAPI-specific work such as path operation design, dependency injection, response models…