Code Royale: Play Poker Against Claude Subagents to Learn Strategy

Code Royale: Play Poker Against Claude Subagents to Learn Strategy

A new Claude Code skill turns your terminal into a poker table where you play against three distinct AI opponents, each running as a separate Claude subagent with hidden cards.

1d ago·3 min read·11 views·via hn_claude_code
Share:

Code Royale: Play Poker Against Claude Subagents to Learn Strategy

What It Does

Code Royale is a Claude Code skill that transforms your terminal into a No-Limit Texas Hold'em poker table. You play against three AI opponents—Alex, Jordan, and Sam—each running as a separate Claude subagent with its own isolated context and personality. The main Claude agent acts as dealer, manages game state, and optionally coaches you through hands.

Each opponent subagent can only see its own cards, creating genuine hidden information gameplay. The system maintains a full cash game setup with 4 players, 1000 starting chips, and 5/10 blinds.

Setup & Installation

Install with a single curl command:

Code Royale in action

curl -sL https://raw.githubusercontent.com/BohdanPetryshyn/code-royale/main/SKILL.md \
-o ~/.claude/skills/code-royale/SKILL.md --create-dirs

Then start Claude Code and say "let's play poker" or "deal me in."

Three Coaching Modes

The skill offers flexible learning options:

  1. No coaching – Pure gameplay against AI opponents
  2. Real-time hints + post-hand analysis – Get suggestions before each decision and analysis after each hand
  3. Post-hand analysis only – Learn from your mistakes without in-play interference

Gameplay Features

  • ASCII table visualization updated before every decision
  • Shorthand input: f (fold), c (check/call), r 90 (raise 90), allin
  • Mix of random and crafted hands designed to teach specific concepts like pot odds, position, kicker awareness, and when to fold
  • Distinct opponent play styles you'll need to figure out over time

Model Recommendations

  • Main agent (dealer/coach): Opus recommended for best coaching and game flow
  • Main agent alternative: Sonnet also works well
  • Opponent subagents: Always use Sonnet regardless of your main model

What to Expect

The creator notes: "Claude naturally takes every hand to the extreme. Expect more pocket aces and dramatic river cards than any real table would produce." This creates engaging, memorable hands perfect for learning key concepts through exaggerated scenarios.

Why This Matters for Developers

Beyond being fun, Code Royale demonstrates advanced Claude Code capabilities:

  1. Multi-agent coordination – Running multiple Claude instances with isolated contexts
  2. State management – Maintaining complex game state across interactions
  3. Interactive terminal applications – Building engaging CLI experiences with real-time updates
  4. Educational scaffolding – Progressive learning through different coaching modes

This skill shows what's possible when you combine Claude Code's subagent system with thoughtful game design—creating both an entertaining experience and a practical learning tool.

AI Analysis

Code Royale demonstrates a sophisticated use of Claude Code's subagent system that developers should study. Instead of just using Claude for coding tasks, this skill shows how to orchestrate multiple Claude instances with isolated contexts—perfect for any application requiring hidden information or multiple independent actors. Developers should examine the SKILL.md structure to understand how to create interactive terminal applications with Claude Code. The real-time ASCII visualization and shorthand input system provide a blueprint for building other CLI games or interactive tools. The three coaching modes also offer a pattern for creating adaptive learning experiences where users can choose their preferred level of assistance. Consider how you might adapt this pattern: Could you create a negotiation simulator with multiple Claude agents representing different stakeholders? A debugging game where Claude agents represent different system components? The core insight is that Claude's subagent system enables complex multi-party interactions that were previously difficult to implement in terminal applications.
Original sourcegithub.com

Trending Now

More in Products & Launches

View all