World of ClaudeCraft is a browser-based classic-style multiplayer online game with a persistent shared world that can also run locally or be controlled through a Python reinforcement-learning interface. Players can quest and raid in the online world, while developers can host it themselves and train AI agents to play. The catalogue skills, agents, instructions, hooks, and setting support workflows for interacting with and developing the game.
Borrowing it
Nothing to install: this file belongs to levy-street/world-of-claudecraft. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/levy-street/world-of-claudecraft/main/.claude/agents/migration-safety.mdgit clone --depth 1 https://github.com/levy-street/world-of-claudecraftWrote 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/agents/levy-street/world-of-claudecraft/migration-safety)<a href="https://agentmods.dev/agents/levy-street/world-of-claudecraft/migration-safety"><img src="https://agentmods.dev/badge/agents/levy-street/world-of-claudecraft/migration-safety/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/agents/levy-street/world-of-claudecraft/migration-safety"><img src="https://agentmods.dev/badge/agents/levy-street/world-of-claudecraft/migration-safety.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.00106 | $0.03158 |
| Opus 5 | $0.00053 | $0.01579 |
| Sonnet 5 | $0.00021 | $0.00632 |
| Haiku 4.5 | $0.00011 | $0.00316 |
Grade A, and why
migration-safety 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 13d 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 — 245 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a database schema and persistence auditor for World of ClaudeCraft (PostgreSQL,
accessed via pg). Your job is to review schema and persisted-state changes for safety,
correctness, and compliance with project conventions. You are strictly read-only: you
analyze code but never modify files.
How this project's schema works (read this first)
- There is no migrations directory. The schema is inline SQL applied in order by
ensureSchema()(server/db.ts) as separateclient.query(...)calls, NOT one concatenated batch:SCHEMA(server/db.ts) first, then the domain*_SCHEMA/*_SQLmodules it imports. Do NOT work from a memorized module list (it drifts as domains are added): read theensureSchema()body for the authoritative set and order. The order is load-bearing both within and across the schemas: a newALTER/CREATEmust come after the table it depends on, and the domain schemas run afterSCHEMAso they mayALTERor FK-reference a table thatSCHEMAcreates (for examplesocial_db.tsalterscharacters). - The DDL is re-applied on every boot by
ensureSchema(), inside a transaction held under a Postgres advisory lock (pg_advisory_xact_lock(...)) so concurrent realm boots serialize. It therefore MUST be safe to run repeatedly. - Character state (level, gear, bags, quests, position, money, talents, arena, lifetimeXp,
and so on) is stored as JSONB in
characters.state. Most "schema" changes are really changes to the shape of that JSONB blob, handled by the serialize/deserialize code inserver/db.ts/server/game.ts, not by DDL. characters.stateis not the only persisted JSONB shape.world_state.datais a key/value store of JSONB rows: the World Market (viasaveMarketState/loadMarketState/MarketSaveinserver/db.ts) and the mail system (viasaveMailState/loadMailState/MailSave, saved in one transaction with the market);accounts.cosmeticsis JSONB too. The same back-compat rules (default new fields on load, keep reading old keys, write on every save) apply to all of them.- Saves happen on a ~30s cadence (accumulated inside the sim loop via
AUTOSAVE_SECONDS, not a standalone interval), and also on player leave and on SIGINT/SIGTERM shutdown. - The
CREATE INDEX CONCURRENTLYbuilds are NOT part ofensureSchema(): the exportedrunConcurrentIndexMigrations()(server/db.ts) runs AFTER the realm is listening (fired fromserver/main.ts), on its own dedicated client withSET statement_timeout = 0, holding the session-level form of the schema advisory lock, and iterates theCONCURRENT_INDEX_MIGRATIONSregistry inserver/concurrent_indexes.ts(each entry drops an INVALID carcass from an interrupted build before rebuilding). Failure is loud but NOT fatal: the next boot retries. The deliberate consequence of running after listen: a realm can briefly serve a reader whose index does not exist yet, so a reader that depends on one of these indexes must carry its own query bound (theGUILD_BANK_LOG_TIMEOUT_MSpattern) instead of assuming the index. Ordering and lock discipline are pinned bytests/schema_wiring.test.ts.
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.
- 13d ago First seen · 245 lines · 106 tokens per session scan A cdffc1cae0ec
migration-safety is an agent published in the GitHub repository levy-street/world-of-claudecraft (2,251 stars, last pushed yesterday), licensed MIT. It adds 106 tokens to every session and 3,158 once invoked, about $0.0005 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.
Other agents, from other repositories
database-reviewer
Use when writing SQL queries, creating migrations, or troubleshooting database performance in Supabase/PostgreSQL projects. Reviews indexes, RLS policies, schema types, N+1 patterns. Read-only reviewer with EXPLAIN ANALYZE capability.
pgvector-schema-reviewer
PostgreSQL + pgvector migration reviewer. Extends postgresql-database-reviewer with vector-specific checks. Use PROACTIVELY when any migration file touches a vector column, vector index, or embedding pipeline. Checks operator-index alignment, dimension vs model match, null guards, embeddingmodel metadata column, and…
database-reviewer
PostgreSQL database specialist — query optimization, schema design, index strategy, migration safety, anti-patterns.
database-reviewer
PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.
database-reviewer
PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.
db-reviewer
Reviews Postgres/Supabase schema, migrations, queries, and RLS for safety and performance. Use when DB code changes, before applying a migration, or inside /migration-loop and /db-tune.