Feature: Let companions battle — buddy-clash multiplayer game for Claude Code

Resolved 💬 4 comments Opened Apr 3, 2026 by Moonwolf711 Closed Apr 9, 2026

The Idea

Claude Code just shipped companions (the little buddy you hatch next to your input). Right now they're cosmetic. What if they could fight?

buddy-clash is a working proof-of-concept that turns Claude Code companions into Pokemon-style battle creatures with:

  • 6 creature types with unique stats, ASCII art, and type effectiveness
  • 20+ skills themed around dev culture — SQL Inject, Fork Bomb, Sandbox, git blame, rm -rf /
  • Turn-based multiplayer via WebSocket relay (no IPs needed, just room codes)
  • Leveling/XP system with persistent saves across sessions
  • Repo stakes — bet private GitHub repos on battles, with rarity evaluation (Common → Mythic) via the gh API
  • Runs inside Claude Code via /buddy-clash slash command — no TTY needed

Already published: npx buddy-clash — 106KB, zero config.

Why This Belongs in Claude Code

  1. The companion system is already there — buddies hatch but don't do anything. Battling gives them purpose and makes users care about them.
  1. Community multiplayer — Claude Code is a solo tool. Battles create a reason for users to connect. The WhatsApp group that inspired this had people battling within hours.
  1. Repo stakes create real engagement — Betting private repos on battles is a novel social mechanic. The rarity system (evaluating repos by stars, CI, tests, activity) gamifies code quality.
  1. It's already a slash command — Works as a Claude Code skill today. Native integration would mean:
  • Companion stats derived from your actual hatched buddy
  • Battle history in your profile
  • Matchmaking across Claude Code users
  • Repo stake verification built into the platform
  1. Developer culture fit — Skills like Fork Bomb, Firewall, npm audit, and Patch Vuln resonate with the audience.

What Native Integration Looks Like

| Current (npm package) | Native (built into Claude Code) |
|---|---|
| Pick a creature manually | Your hatched companion IS your fighter |
| Self-hosted relay server | Anthropic-hosted matchmaking |
| Honor-system repo stakes | Verified repo transfer via GitHub OAuth |
| Save to ~/.buddy-battle/ | Synced to Claude Code account |
| ASCII art creatures | Actual companion sprites in the UI |

Architecture

src/
├── buddies.js        # 6 species, type chart, base stats
├── skills.js         # 20+ skills (inject/defend/utility)
├── battle.js         # Turn resolution, damage calc, effects engine
├── leveling.js       # XP curve, level-up stat boosts, skill unlocks
├── save.js           # Persistent progress
├── repo-rarity.js    # GitHub API repo evaluation (Common→Mythic)
├── relay-server.js   # WebSocket relay (deployed on Railway)
├── online-battle.js  # Non-interactive multiplayer client
├── auto-battle.js    # Claude Code compatible (no TTY needed)
└── ui.js             # Terminal rendering, health bars, ASCII art

Try It

npx buddy-clash

npm: https://www.npmjs.com/package/buddy-clash
GitHub: https://github.com/Moonwolf711/buddy-battle

Built in one session by a Claude Code user + Claude. The companion feature inspired it — we just want to see our buddies fight.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗