convez.ai
AgenteProdutividadeIntermediário
gonshi10

Agent Arcade

gonshi10/agent-arcade

Jogue enquanto seu agente trabalha — alerta automático quando precisa de você

Ver no GitHub
InicialPluginScore · de 0 a 100

Jogo interativo que roda enquanto seu agente Claude Code trabalha, alertando-o instantaneamente quando precisa de interação. Integra-se aos hooks do Claude Code via Node.js puro, sem dependências, com sistema de notificação visual e sonora.

Instalação

$npx convez-ai gonshi10/agent-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
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 3 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Aumentar produtividade durante execução de agentes autônomos
  • Receber notificações visuais e sonoras de eventos do agente
  • Rastrear streak de autonomia e contagem de ferramentas utilizadas

Veredito

Solução criativa que transforma o tempo de espera de agentes em gameplay casual com notificações inteligentes. Implementação robusta com design seguro — hooks isolados, backups automáticos, sem risco de corromper configurações existentes.

README

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

agent-arcade

Play a game while your Claude Code agent works — that yanks you back the instant it needs you.

working  → play Snake; your "autonomous streak" timer climbs
waiting  → screen freezes, alarm chimes, tab title flashes 🔔 — get back
done     → freeze, soft chime, shows your streak + tool count

Zero dependencies. Pure Node — which you already have, since Claude Code runs on it.

Quick start

npx agent-arcade install     # wire the hooks into Claude Code (no hand-editing JSON)
# restart Claude Code so it reloads hooks, then just send a prompt —
# the game starts itself and opens in your browser. No separate `start` needed.

Auto-launch is on by default: your first prompt boots the server and opens the game tab, then later prompts reuse it. To confirm the wiring (and see the live server), run npx agent-arcade verify. Prefer to start the server yourself? Install with --no-autostart and run npx agent-arcade before prompting.

No npm publish yet? Run straight from the repo:

npx github:gonshi10/agent-arcade install

Commands

commandwhat it does
npx agent-arcade [start]start the server + open the game
npx agent-arcade simulatestart + drive a fake agent session — try the game with no hooks installed
npx agent-arcade installmerge the hooks into Claude Code settings
npx agent-arcade verifycheck hooks are present, JSON is valid, server is up
npx agent-arcade uninstallremove only the hooks we added
npx agent-arcade helpflags + usage

Flags

flageffect
--port <n>port for server and installed hooks (default 4317)
--precisenarrow Notification to permission_prompt + idle_prompt (less noise)
--no-autostart(install) don't auto-launch the game on prompt; start the server yourself. Default: auto-launch on
--no-gitignore(install) don't patch the repo .gitignore with local artifacts
--globalwrite to ~/.claude/settings.json (all projects)
--sharedwrite to ./.claude/settings.json (committed to the repo)
(default)./.claude/settings.local.json — personal, gitignored
--no-opendon't auto-open the browser on start / simulate
--interactive(simulate) drive events by key — w/t/n/s/i — instead of the auto walkthrough
--loop(simulate) repeat the auto walkthrough until Ctrl-C

Default scope is the personal, gitignored settings file so installing doesn't push a game onto your teammates.

How the state machine works

Claude Code hookendpointgame effect
UserPromptSubmit/event/workingstart a round
PreToolUse/event/tool+1 tool, stay live
Notification/event/waitingyank back + show the message
Stop/event/donefreeze + chime

Each hook fires with a 1s timeout and || true, so if the server's off it silently no-ops and can never stall your agent.

Safe by design

install deep-merges and never touches your existing hooks. Every command it adds carries a #agent-arcade marker, so re-running updates in place (no duplicates) and uninstall removes exactly those and nothing else. Your file is backed up to *.bak before any write. For repo-local scopes (local and shared), install also idempotently patches the git root's .gitignore so the settings file and backup stay untracked — use --no-gitignore to skip that.

⚠ The footgun this guards against: since claude-code v1.0.95, any invalid settings.json silently disables all hooks in that file. agent-arcade only writes schema-valid entries — but always run npx agent-arcade verify and the in-app /hooks check after installing, so you catch breakage from any source.

On the Notification matcher (the load-bearing hook)

Notification is the "needs you" signal, and its exact firing has varied across Claude Code versions. The default matcher is "" (empty) — canonical, always valid, and fires on every notification, so the yank-back is reliable. If that's too noisy, --precise narrows it to permission_prompt + idle_prompt.

Quick test without running the agent:

npx agent-arcade --no-open &
curl -X POST localhost:4317/event/waiting -d '{"message":"test"}'
# the page should flip to the red "needs you" overlay

Roadmap

  • forward PostToolUse tool names → each tool spawns a themed pellet
  • swap Snake for any game (the page only reads the agent field from /state)
  • SessionStart → /event/idle reset between sessions

License

MIT

Ver o original no GitHub

Bom para

Relacionados