Guide · Agent skill
How to use the Slay the Spire 2 Game Controller agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
This skill lets an AI agent control the real Slay the Spire 2 on Steam through a command-line tool called cli-anything-sts2. It reads the current game screen as structured data and sends actions such as playing cards, ending turns, picking map nodes or buying from the shop. By the end of this guide you will know what the skill needs, how to install it and how to phrase requests so your agent uses it correctly.
Quick start
- 1Clone the repository. Clone HKUDS/CLI-Anything with Git and open slay_the_spire_ii/agent-harness.
- 2Install the CLI. Run pip install -e . from the agent-harness folder.
- 3Build and install the bridge. Run build.sh in bridge/plugin, then install_bridge.sh in bridge/install, setting STS2_GAME_DATA_DIR if auto-detection fails.
- 4Enable STS2_Bridge in the game. Launch Slay the Spire 2 via Steam and enable the mod in the mod manager.
- 5Verify with state. Run cli-anything-sts2 state and confirm it returns JSON.
- 6Install the skill folder. Place the unzipped skill in ~/.claude/skills/ or a project's .claude/skills/, or upload the ZIP under Settings → Capabilities → Skills.
- 7Ask the agent in plain language. Describe the goal, such as starting a run or finishing combat, and let the agent read state before acting.
What is an agent skill and what does this one do?
An agent skill is a folder containing a SKILL.md file that tells an AI agent when and how to use a tool. This one is for the Slay the Spire 2 game. The skill's SKILL.md describes a stateful command-line interface that reads normalized game state and sends action commands to the local STS2_Bridge mod through an HTTP API at localhost:15526.
The agent reads the current screen first, using the decision field, then picks a command that fits that screen. Covered screens include combat, map, rewards, events, rest sites, shops and card or relic selection overlays.
Install the Slay the Spire 2 skill from this page
Download the ZIP for this skill from our page and unzip it. To make it available to Claude Code for your user account, place the folder in ~/.claude/skills/. To limit it to one project, place it in that project's .claude/skills/ folder. In the Claude apps you can instead upload the ZIP under Settings → Capabilities → Skills.
Installing the skill only teaches the agent the commands. The game itself still needs the bridge mod, described in the next section.
- Personal: ~/.claude/skills/
- Project only: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Set up the CLI and the STS2_Bridge mod
The CLI and the bridge are both distributed from the HKUDS/CLI-Anything repository. Clone it with Git, then install the CLI with pip from the agent-harness folder.
The bridge mod is a .NET 9 plugin that must be compiled and installed into the game directory. The source gives a short version of the build steps; the full instructions are in the repository README. If the build script cannot find the game data directory, set STS2_GAME_DATA_DIR to its path before building.
- Requires Python 3.10+, Git, pip and the .NET 9 SDK (the SDK is only needed to build the mod)
git clone https://github.com/HKUDS/CLI-Anything.git
cd CLI-Anything/slay_the_spire_ii/agent-harness
pip install -e .
cd CLI-Anything/slay_the_spire_ii/agent-harness/bridge/plugin
./build.sh
cd ../install
./install_bridge.shEnable the mod and verify the connection
Launch Slay the Spire 2 through Steam, enable the STS2_Bridge mod in the mod manager, then run the state command. If it returns JSON, the CLI and bridge are talking to each other. If the command fails, the bridge is not running or not enabled in the game.
cli-anything-sts2 stateTell the agent what to do with natural requests
You do not need to type commands yourself. Ask in plain language and the agent should read state, then act. Good requests name the goal and the game context, for example asking it to start an Ironclad run at ascension 0 or to finish the current combat.
The source says the agent should always read state first, re-read it after each action because indices and energy change during combat, check return codes, and parse stdout as JSON. Mention these habits in your request if you want careful play.
- Start a new Ironclad run at ascension 0
- Check the current screen and play the next card in combat
- End my turn once I have no useful plays left
- Choose the map node on the left and continue
- Buy the first affordable item in the shop, then leave
Know the main commands and screens
The CLI groups commands by screen. Combat uses play-card, use-potion and end-turn. Map and room flow use choose-map and proceed. Rewards, events, rest sites and the shop each have their own commands. Characters available to start-game are IRONCLAD, SILENT, DEFECT, NECROBINDER and REGENT.
Default settings are --base-url http://localhost:15526 and --timeout 10.0 seconds. The raw-state command returns unprocessed bridge JSON, and action sends a raw bridge action with --kv key=value pairs.
- state: normalized game state with decision field
- play-card <index> [--target <enemy_id>]
- choose-map <index>
- claim-reward <index> and pick-card-reward <index>
- shop-buy <index>
- action <name> --kv key=value for raw actions
What people use it for
- Testing how an agent handles turn-based combat decisions in the real game
- Letting an agent play full runs to observe its map and reward choices
- Collecting structured game state from events, rewards and shop screens for research
- Automating repetitive menu and navigation steps during mod development
Frequently asked questions
How do I install the Slay the Spire 2 agent skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for your user, or into a project's .claude/skills/ folder. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills. You also need to install the CLI and the STS2_Bridge mod for it to work.
What do I need to run it?
You need Python 3.10+, a Steam copy of Slay the Spire 2 with the STS2_Bridge mod enabled, and Git and pip to install the CLI. The .NET 9 SDK is needed only to build the bridge mod. The skill runs scripts and uses the network.
Is the skill free?
The source lists the licence as Apache-2.0. It does not cover pricing for the game itself, which you need to own on Steam.
Why does the agent say it cannot connect?
The state command must return JSON. If it does not, make sure Slay the Spire 2 is running with STS2_Bridge enabled in the mod manager and that the bridge is listening at localhost:15526.
Can I use it without owning the game?
No. The bridge mod runs inside the game process, so nothing works without a Steam copy of Slay the Spire 2.
Is there an alternative if I only want strategy tips?
This skill is for agents that act in the game, not for explaining it. If you only want advice, use a tool or guide that explains strategy rather than controlling the game.
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 developers, modders and researchers who own Slay the Spire 2 on Steam and want an agent to play real runs through a local bridge. It is a poor fit if you only want strategy tips or do not want to build and install a .NET mod into your game directory.
Download the skill