Skip to content
Claude City

Claude City

Claude code as a game

Created on 8th August 2026

Claude City

Claude City

Claude code as a game

What is the problem your project solves?

The shift

Software development is increasingly about managing agents, not writing and reviewing every line of code yourself. The default tools still look like IDEs and diffs — interfaces built for humans typing, not for fleets of agents working in parallel.

That mismatch matters. As Claude and other agents take on more of the build, the bottleneck becomes situational awareness: what is the agent doing, which files is it touching, where is the work concentrating, and when should a human intervene?

Why it matters

Without a better interface, agent coding stays opaque. Teams lose the plot mid-run, over-approve tool calls, or under-trust the system. Code review has the same problem at scale: a PR diff is a wall of text, not a spatial map of what changed.

What Claude City does

We gamify that experience: your project becomes a live game world. Directories are districts. Source files are buildings. Claude agents are the crew on site. As they work, the city updates — so you watch software get built the way you watch a construction sim, not a terminal dump.

New: PR cities. Every open GitHub pull request becomes its own port city. Sail between main and PR cities, see added/modified/deleted files as construction overlays on the map, and dispatch a read-only Claude reviewer to inspect the diff and post a GitHub review — with mayor approval before anything ships.

How you are solving it?

Approach

Claude City turns a local git repo into an isometric city and routes Claude Agent SDK activity into that world live.

World generation

  • Scan the repository into a world map (worldgen)
  • Lay out districts from folders and buildings from files (layout), with plot persistence so the city stays stable across rescans
  • Render with Phaser (isometric terrain, buildings by language/size, ambient life, ships between cities)

Agent → game loop

  • A Fastify + WebSocket server runs @anthropic-ai/claude-agent-sdk against the repo
  • SDK hooks (tools, file changes, subagents, tasks, compact) become game events
  • The client shows crew on the map, a per-city quest log, building highlights when files change, and mayor permits for non-read tool calls

Crew model

  • Pick your crew before each run: Architect (Opus) for deep refactors, Worker (Sonnet) for everyday construction
  • Effort levels (low → max) control reasoning depth and how equipped the crew looks on the map

PR cities & review mode (built during the hackathon)

  • Server lists open PRs via gh and registers each as a port city (pr-<number>)
  • PR cities are lazy-built: git worktree at the PR head, world scan, and diff overlay computed only when you travel there
  • Diff overlay marks changed files on the map — new buildings for additions, highlighted edits, ghost plots for deletions
  • PR agents are read-only (Write/Edit disabled); Claude reads the diff and can publish a review via gh pr review, which still requires a mayor permit before posting
  • Ship travel between cities with a cloud transition; each city keeps its own quest log and agent session

Stack

worldgenlayout → SQLite persistence → Fastify/WebSocket server → Vite/React/Phaser client. One CLI command boots everything: sudo-city <path>.

How Did You Use Claude?

Claude is the crew

Claude is not a bolt-on chatbot. It is the intelligence and actuator layer of Claude City.

Integration

  • Built on @anthropic-ai/claude-agent-sdk (query, hooks, permissions, model/effort)
  • Server session manager translates SDK messages into protocol events the Phaser client consumes
  • Models: Opus = Architect, Sonnet = Worker; effort levels control reasoning depth

What Claude does in the main city

  • Receives mayor prompts (with optional attached file context from drag-and-drop)
  • Reads/searches/edits the repo under permission rules
  • Safe tools (Read/Glob/Grep) auto-approve; writes and other tools raise building permits for the human mayor
  • File-change hooks trigger world rescans so new/edited files appear as buildings as Claude works

What Claude does in PR cities

  • Gets a review-focused system prompt with the PR title, author, and changed-file list
  • Explores the PR worktree read-only — no in-place fixes
  • Publishes GitHub reviews through gh pr review --approve | --request-changes | --comment, gated by mayor permits so nothing posts without explicit approval

Why this fits the hackathon

The product only makes sense with Claude in the loop: without the agent SDK driving real construction and review, the city is just a static map. Claude is both the builder and the signal that makes the world move.

What is the deployed URL for this project?

https://claude-clan.vercel.app/

Discussion

Builders also viewed

See more projects on Devfolio