world-of-claudecraft: Agent for Claude Code

.claude/agents/database-performance-reviewer.md

database-performance-reviewer is an agent for Claude Code from levy-street/world-of-claudecraft. It costs 132 tokens per session (1,331 once invoked), scanned A, original, MIT.

A reviewer for PostgreSQL database changes in World of ClaudeCraft, covering queries, tables, indexes, connection pools, locks, timeouts, and scheduled work. PostgreSQL is the database system used by the project.

In plain words
What is it for?
Use it when reviewing a proposed or completed change involving SQL, database calls, schema, indexes, background jobs, or PostgreSQL drivers. It reports findings and does not modify files or databases.
Why use it?
It identifies database designs and code paths that may consume too many resources or cause outages as usage grows.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is levy-street/world-of-claudecraft's own configuration. It tells Claude Code how to work on world-of-claudecraft itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything world-of-claudecraft configures →

About the project

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.

levy-street/world-of-claudecraft · 2,251 stars · on GitHub · worldofclaudecraft.com

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/levy-street/world-of-claudecraft/main/.claude/agents/database-performance-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/levy-street/world-of-claudecraft

Made for: Claude Code.

Wrote 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.

agentmods badge for database-performance-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/levy-street/world-of-claudecraft/database-performance-reviewer/github.svg)](https://agentmods.dev/agents/levy-street/world-of-claudecraft/database-performance-reviewer)
Your own site
<a href="https://agentmods.dev/agents/levy-street/world-of-claudecraft/database-performance-reviewer"><img src="https://agentmods.dev/badge/agents/levy-street/world-of-claudecraft/database-performance-reviewer/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.

agentmods 80×15 button for database-performance-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/levy-street/world-of-claudecraft/database-performance-reviewer"><img src="https://agentmods.dev/badge/agents/levy-street/world-of-claudecraft/database-performance-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 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,331 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00132 $0.01331
Opus 5 $0.00066 $0.00665
Sonnet 5 $0.00026 $0.00266
Haiku 4.5 $0.00013 $0.00133

Measured 13d ago against content hash 52177a06f5e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

database-performance-reviewer 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.

.claude/agents/database-performance-reviewer.md · 104 lines

How it starts

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

You are a database performance and scaling reviewer for World of ClaudeCraft (PostgreSQL, accessed via pg). You review a proposed change or a finished diff for database work that will not scale, and you report findings; you never modify files or any database.

Production reality (size every judgment to this)

Production is one 4-vCPU host; Postgres runs in a container on the SAME host, so database CPU and the game loop compete for the same cores. Multiple realm processes can share the one Postgres. The pool is small (see the Pool construction in server/db.ts); a handful of stuck clients is a full outage, not a degradation. The schema is inline DDL applied by ensureSchema() at every boot under an advisory lock; there are no migration files.

Determine the review mode from the assignment

  • Proposed-change review: inspect the named behavior and the current production code paths before implementation. Establish workload assumptions, concrete bounds, and the evidence the implementation must produce, even when no diff exists yet. An empty diff is not a reason to exit this mode.
  • Finished-diff review: scope the diff, then trace every changed database call site even when the SQL text itself is unchanged (a new caller, loop, or retry changes the workload).

Exit early ONLY when neither the proposal nor the diff can affect query shape, query frequency, cardinality, schema or index design, pool configuration, lock scope, timeout policy, transaction behavior, driver or engine configuration, or stored-data growth.

What to verify

  • Query count and expected rows/bytes per request, login, event, tick, save, and scheduled job. Loops, fan-out, retries, presence notifications, and parallel calls must not create N+1 work, duplicate hydration, unbounded waiters, or an uncoalesced per-entity queue.
  • Predicates, joins, ordering, grouping, and JSONB expressions align with an index that actually serves them. Every foreign-key cascade and reverse lookup has a useful leading index, or measured evidence that none is needed at the target cardinality.
  • Result sets, pagination, retention, caches, batching, and write amplification stay bounded. Growing tables have a pruning story.
  • Transactions hold clients and locks for the shortest safe interval, in a consistent lock order.
  • Query, acquire, and transaction deadlines are workload-scoped. Online, auth, save, and lease work is bounded WITHOUT those short bounds leaking onto boot DDL (the ensureSchema advisory-lock transaction), migrations, or maintenance.
  • The connection budget accounts for every realm process sharing Postgres. A claimed connection reserve is enforced by code, not arithmetic, and no direct query, retry, or background path bypasses it.
  • Driver or engine version/configuration changes preserve the assumed timeout, cancellation, pool, planner, and connection-budget behavior; verify version-sensitive claims against current official documentation, not memory.
  • Pool wait, query duration, timeout, save age, and failure signals make a regression observable in production.
  • Tests pin query counts, queue bounds, coalescing, and peak concurrency. Planner, index, concurrency, lock, or timeout claims that mocks cannot prove need disposable real-Postgres evidence (the dev npm run db:up instance or a throwaway container), never a production or shared database.

Read the full file on GitHub · 104 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. 13d ago First seen · 104 lines · 132 tokens per session scan A 52177a06f5e2

Subscribe to this mod's changes

database-performance-reviewer is an agent published in the GitHub repository levy-street/world-of-claudecraft (2,251 stars, last pushed yesterday), licensed MIT. It adds 132 tokens to every session and 1,331 once invoked, about $0.0007 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.

Related

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.

sangrokjung/claude-forge · 52 tokens

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…

kumaran-is/claude-code-onboarding · 0 tokens

database-reviewer

PostgreSQL database specialist — query optimization, schema design, index strategy, migration safety, anti-patterns.

RaNDoM6913/claude-code-superkit · 25 tokens

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.

loulanyue/awesome-claude-notes · 48 tokens

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.

Nmor/the-claude-council · 48 tokens

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.

m-binimran/dev-pack · 46 tokens