convez.ai
PluginUtilidadesIntermediário
jaipatel248

Claude Arcade

jaipatel248/claude-arcade

Jogos arcade pixel que reagem aos seus tokens, prompts e contexto

Ver no GitHub
InicialPluginScore · de 0 a 100

Plugin que transforma sua sessão ao vivo do Claude Code em um jogo de arcade pixelado. O personagem (Super Mario Runner) corre, pula e interage visualmente baseado em tokens, prompts, tool calls e pressão de contexto em tempo real. Torna a execução de código mais lúdica e visual.

Instalação

$npx convez-ai jaipatel248/claude-arcade

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
6
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 6 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Visualizar fluxo de tokens durante execução de código
  • Monitorar pressão de contexto de forma visual e lúdica
  • Feedback visual de estados (pensamento, espera, subagentes)

Veredito

Conceito criativo que gamifica a experiência de desenvolvimento com Claude Code, transformando métricas abstratas em feedback visual imediato. Útil para prototipagem e exploração, com potencial de extensão para mais jogos.

README

A tradução para o português deste README ainda está na fila.

Claude Arcade

This repo is both a plugin (plugins/claude-arcade/) and a plugin marketplace (.claude-plugin/marketplace.json). You can install it with one command — see below.

Watch your tokens come to life. While Claude Code runs, the character runs, jumps, and collects coins. While Claude thinks, the character charges up. While Claude waits for your input, a ? block appears.


Games

Claude Arcade is built to host multiple arcade games for Claude Code — each one a tiny pixel game whose visuals are driven entirely by what's happening in your live session (tokens, prompts, tools, context pressure, etc.). Right now it ships with one:

Super Mario Runner

An auto-playing side-scroller. You don't control Mario — your Claude Code session does. Token throughput becomes his running speed, thinking becomes a glow, prompts become jumps, subagents become tiny tinted sidekicks, and a filling context window literally rains and burns down the level. Each cell below is a distinct in-game state and when it triggers.


Install (recommended)

Add the marketplace, then install the plugin. From inside any Claude Code session:

/plugin marketplace add jaipatel248/claude-arcade
/plugin install claude-arcade@claude-arcade

That's it. Run the game with:

/claude-arcade:super-mario-runner

Pick a different port if 3248 is busy:

/claude-arcade:super-mario-runner 4000

Updating

/plugin marketplace update claude-arcade

Uninstalling

/plugin uninstall claude-arcade@claude-arcade
/plugin marketplace remove claude-arcade

Local development install

Without going through the marketplace — useful when iterating on the plugin source:

git clone https://github.com/jaipatel248/claude-arcade.git
claude --plugin-dir ./claude-arcade/plugins/claude-arcade

After editing files, run /reload-plugins inside the session to pick up changes without restarting.


How it maps Claude → Mario

Claude activityGame effect
Tokens flowing fastCharacter sprints
Tokens flowing slowCharacter walks
IdleCharacter stands still
Thinking (processing)Glow + thought bubble (...)
Token burst after thinkingSpeed boost with star effect
Waiting for your input? block appears, character taps foot, tab title flashes
You answer? block bursts into coins
Task completeFireworks
Context window 60%+Sky darkens, rain
Context window 80%+Red sky, fire embers
Context window 90%+Screen shakes
Cost increasesCoin counter goes up

HUD: Tokens (in/out), Speed (tok/s), Coins, Prompts, Context %, Cost ($), Session time, Model badge.

Keyboard: Space jump · M toggle music · S toggle SFX · C screenshot.


How it works

Claude Code session
  ─► hooks (PreToolUse, PostToolUse, Stop, …) call scripts/collect.js
  ─► collect.js writes events to ~/.claude/token-graph-live.jsonl
  ─► scripts/super-mario-runner.js tails the JSONL file
  ─► pushes updates to the browser via Server-Sent Events
  ─► browser renders the game at 60fps (Canvas + pixel art)

The launch script forks itself into the background on first run (cross-platform — no shell backgrounding tricks needed) and binds an HTTP server on the chosen port. Subsequent invocations on the same port just reopen the browser tab.


Repo layout

claude-arcade/
├── .claude-plugin/
│   └── marketplace.json            ← Marketplace catalog
├── plugins/
│   └── claude-arcade/
│       ├── .claude-plugin/
│       │   └── plugin.json         ← Plugin manifest
│       ├── hooks/
│       │   └── hooks.json          ← Registers statusLine + Claude Code hooks
│       ├── scripts/
│       │   ├── collect.js          ← Hook receiver → JSONL writer
│       │   └── super-mario-runner.js ← Game server (HTTP + SSE)
│       ├── skills/
│       │   └── super-mario-runner/SKILL.md   ← /claude-arcade:super-mario-runner
│       └── webview/
│           ├── super-mario-runner.html
│           ├── js/                 ← Game modules
│           └── sounds/
├── docs/
│   └── images/                     ← README screenshots (01-running.png … 09-shake.png)
├── LICENSE                         (MIT)
└── README.md

Requirements

  • Claude Code (claude CLI)
  • Node.js 16+ (already required by Claude Code)
  • A modern browser
  • Zero npm dependencies — uses only Node built-ins

Server controls

Start (default port 3248):

node plugins/claude-arcade/scripts/super-mario-runner.js

Pick a port:

node plugins/claude-arcade/scripts/super-mario-runner.js --port 4000

Check status:

node plugins/claude-arcade/scripts/super-mario-runner.js --status --port 4000

Stop a running instance:

node plugins/claude-arcade/scripts/super-mario-runner.js --stop --port 4000

Run in foreground (for debugging):

node plugins/claude-arcade/scripts/super-mario-runner.js --foreground

Debug logging

Set CLAUDE_ARCADE_DEBUG=1 before launching Claude Code to dump every hook payload to ${TMPDIR}/claude-arcade-debug.jsonl. Off by default.

License

MIT

Credits

Built by Jay Patel. Pull requests welcome.

Ver o original no GitHub

Bom para

Relacionados