Skip to content

Guide · Agent skill

How to use the Slay the Spire 2 Controller agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide explains how to install and use the cli-anything-slay-the-spire-ii agent skill, which lets an AI agent control the real Slay the Spire 2 game on your computer. It is built on a command-line tool plus a small STS2_Bridge mod that runs inside the game and exposes game state on a local web address. After reading, you will know what the skill does, how to set it up, how to check the connection, and how to ask an agent to play.

Slay the Spire 2 ControllerHKUDS/CLI-Anything · Apache-2.0

Quick start

  1. 1Install the CLI. Clone the HKUDS/CLI-Anything repository, move into slay_the_spire_ii/agent-harness, and run pip install -e . with Python 3.10 or later.
  2. 2Build and install the bridge mod. Run build.sh in the bridge/plugin folder, then install_bridge.sh in the install folder. Set STS2_GAME_DATA_DIR if the build cannot find the game data directory.
  3. 3Enable STS2_Bridge in the game. Launch Slay the Spire 2 via Steam and enable the STS2_Bridge mod in the mod manager.
  4. 4Verify the connection. Run cli-anything-sts2 state. If it returns JSON, the CLI and bridge are connected.
  5. 5Ask the agent to play. Make a natural request, and have the agent read state first and route each next command by the decision field.

What does the cli-anything-slay-the-spire-ii skill make the agent do?

The skill teaches an AI agent to control the real Slay the Spire 2 game. The agent reads which screen the game is on, then sends commands to play cards, use potions, pick rewards, choose map paths and move through menus.

The CLI reads normalized game state and sends action commands through a local HTTP API at localhost:15526. The bridge mod is what makes that API available inside the game process.

  • Read the current game screen with the state command, which returns a decision field
  • Combat: play cards, use potions and end turns
  • Navigation: choose map nodes, proceed, and handle events and rest sites
  • Rewards and shop: claim rewards, pick or skip cards, buy from the shop
  • Menus: start, continue or abandon a run, or return to the main menu

How do you install the CLI and bridge mod?

The skill needs two parts from the HKUDS/CLI-Anything repository: the command-line tool and the bridge mod. You need Git to clone the repository, Python 3.10 or later for the CLI, and the Microsoft .NET 9 SDK, which is only needed to build the bridge mod.

Install the CLI first. Then build and install the bridge mod. The source says full mod instructions are in the repository README, and that the build script may need the game data directory set explicitly through STS2_GAME_DATA_DIR if it cannot find it.

  • Python 3.10+
  • Slay the Spire 2 (Steam) with the STS2_Bridge mod enabled
  • Microsoft .NET 9 SDK (only to build the bridge mod)
  • Git, to clone the HKUDS/CLI-Anything repository
git clone https://github.com/HKUDS/CLI-Anything.git cd CLI-Anything/slay_the_spire_ii/agent-harness pip install -e . cd bridge/plugin ./build.sh cd ../install ./install_bridge.sh

How do you install the skill from the ZIP or the Claude apps?

You can also add the skill as a folder. Download the ZIP from this page and unzip it into ~/.claude/skills/ for your user account, or into a project's .claude/skills/ folder if you want the skill limited to one project. The skill's files include SKILL.md, which holds the instructions the agent reads.

If you use the Claude apps, you can upload the skill instead. Open Settings, go to Capabilities, then Skills, and upload it there. The CLI and bridge mod still need to be installed on your computer as described above.

  • Personal: unzip into ~/.claude/skills/
  • Single project: unzip into the project's .claude/skills/ folder
  • Claude apps: Settings → Capabilities → Skills

How do you enable the mod and check the connection?

Launch Slay the Spire 2 through Steam, then enable the STS2_Bridge mod in the mod manager. With the game running, run the state command in a terminal. If it returns JSON, the CLI and bridge are connected.

If the command does not return JSON, the connection is not working yet. Check that the game is running, that STS2_Bridge is enabled, and that the CLI and bridge were both installed.

cli-anything-sts2 state

How do you ask an agent to play, and which commands does it use?

Ask the agent in plain language, such as asking it to start a new Ironclad run at ascension 0, or to play the next combat turn. The agent should begin by reading state, because the decision field tells it which commands make sense. The source's AI agent rules say to re-read state after each action, since indices and energy change during combat.

The source lists these decision values and typical next commands. Commands are run with the cli-anything-sts2 prefix.

  • menu → continue-game, start-game
  • combat_play → play-card, use-potion, end-turn
  • map_select → choose-map
  • combat_rewards → claim-reward, proceed
  • card_reward → pick-card-reward, skip-card-reward
  • event_choice → event, advance-dialogue
  • rest_site → rest
  • shop → shop-buy, proceed
  • game_over → return-to-main-menu
cli-anything-sts2 state cli-anything-sts2 start-game --character IRONCLAD --ascension 0 cli-anything-sts2 play-card 0 --target <enemy_id> cli-anything-sts2 end-turn

What safety and setup notes should you know?

This skill runs scripts and uses the network. The network use described in the source is a local HTTP API at localhost:15526, and the bridge mod runs inside the game process. Build and install steps compile and install code, so read the build script and the repository README before running them.

The agent takes over game actions. The source does not say whether the bridge mod affects achievements or saves, so verify this yourself before using the skill on a save you care about. Back up your saves if that matters to you.

  • Scripts run during build and install (build.sh and install_bridge.sh)
  • The API is local at localhost:15526; the default --base-url is http://localhost:15526
  • Use --timeout (default 10.0 seconds) to control HTTP wait time
  • Use return-to-main-menu to leave any screen

What people use it for

  • Watching an agent start an Ironclad, Silent, Defect, Necrobinder or Regent run and report its choices
  • Testing how an agent handles combat turns, using play-card, use-potion and end-turn
  • Checking how an agent handles card rewards, relic selection and shop purchases
  • Studying decision-making in a turn-based card game on a real build of the game

Frequently asked questions

What is the Slay the Spire 2 agent skill?

It is an agent skill, described as a command-line interface for Slay the Spire 2, that lets an AI agent read normalized game state and send action commands to the real game. It works through a local bridge mod and an HTTP API at localhost:15526.

What do I need to use the Slay the Spire 2 agent skill?

You need Python 3.10 or later, Slay the Spire 2 on Steam with the STS2_Bridge mod enabled, and the Microsoft .NET 9 SDK to build the bridge mod. You also need Git to clone the HKUDS/CLI-Anything repository.

Is the Slay the Spire 2 agent skill free to use?

The skill is listed under the Apache-2.0 licence. The source does not discuss pricing, and you still need your own copy of Slay the Spire 2 from Steam.

Why does the state command not return JSON?

The source says that JSON output means the CLI and bridge are connected. If nothing returns, check that the game is running, that the STS2_Bridge mod is enabled in the mod manager, and that the CLI and bridge were both installed.

Can I use the skill without building the bridge mod?

The source says the CLI requires a bridge mod that runs inside the game process, and the mod must be compiled and installed into the game directory. The CLI cannot read game state without it.

Does the bridge mod affect achievements or saves?

The source does not say. Check this yourself before using the skill with a save you care about, and keep backups.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits players who want to experiment with an AI agent playing Slay the Spire 2, developers testing game-playing agents, and hobbyists studying decisions in card games. It is a poor fit if you just want to play normally, or if you cannot compile a .NET 9 mod and install game mods, since setup involves building code.

Download the skill