Skip to main content

Build

CLI Anything Slay the Spire Ii

CLI-Anything

Command-line interface for Slay the Spire 2 - Control the real game through a local bridge mod HTTP API. Reads normalized game state and sends action commands for combat, navigation, rewards, and menu management.

  • New
  • v1.0.0
  • Reviewed Aug 18
  • No reviews yet

Capabilities

  • Build and install the bridge mod

    The bridge mod is a .NET 9 plugin that must be compiled and installed…

  • Enable the mod and verify

    Launch Slay the Spire 2 via Steam, enable the STS2_Bridge mod in the…

  • Main Menu

  • Decision States

    The state command returns JSON with a decision field indicating the…

Getting started

Full instructions

Example command

Install the CLI

git clone https://github.com/HKUDS/CLI-Anything.git

Instructions: SKILL.mdv1.0.0

cli-anything-slay-the-spire-ii

A stateful command-line interface for controlling the real Slay the Spire 2
game through the local STS2_Bridge mod. The CLI reads normalized game state
and sends action commands via a local HTTP API at localhost:15526.

Installation

This CLI requires a bridge mod that runs inside the game process. Both the CLI
and the bridge are distributed from the same repository:

text
https://github.com/HKUDS/CLI-Anything

1. Install the CLI

bash
git clone https://github.com/HKUDS/CLI-Anything.git
cd CLI-Anything/slay_the_spire_ii/agent-harness
pip install -e .

2. Build and install the bridge mod

The bridge mod is a .NET 9 plugin that must be compiled and installed into
the game directory. Full instructions are in the repository README, but the
short version is:

bash
cd CLI-Anything/slay_the_spire_ii/agent-harness/bridge/plugin
./build.sh
cd ../install
./install_bridge.sh

If the build script cannot auto-detect the game data directory, set
STS2_GAME_DATA_DIR explicitly:

bash
STS2_GAME_DATA_DIR="/path/to/data_sts2" ./build.sh

3. Enable the mod and verify

Launch Slay the Spire 2 via Steam, enable the STS2_Bridge mod in the mod
manager, then verify the connection:

bash
cli-anything-sts2 state

If this returns JSON, the CLI and bridge are connected.

Prerequisites:

  • Python 3.10+
  • Slay the Spire 2 (Steam) with STS2_Bridge mod enabled
  • .NET 9 SDK (only needed to build the bridge mod)

Usage

Basic Commands

bash
# Read normalized game state (always start here)
cli-anything-sts2 state

# Start interactive REPL mode (default)
cli-anything-sts2

# Show all available commands
cli-anything-sts2 --help

Command Groups

State Inspection

Command Description
state Normalized state with decision field
raw-state Raw bridge JSON

Main Menu

Command Description
continue-game Continue a saved run
start-game --character IRONCLAD --ascension 0 Start a new run
abandon-game Abandon the current save
return-to-main-menu Return to menu from any screen

Characters: IRONCLAD, SILENT, DEFECT, NECROBINDER, REGENT

Combat

Command Description
play-card <index> [--target <enemy_id>] Play a card from hand
use-potion <slot> [--target <enemy_id>] Use a potion
end-turn End the current turn

Map & Room Flow

Command Description
choose-map <index> Select a map node
proceed Leave the current room

Rewards

Command Description
claim-reward <index> Claim a combat reward
pick-card-reward <index> Pick a card reward
skip-card-reward Skip the card reward
claim-treasure-relic <index> Claim a treasure relic
select-relic <index> Select a relic
skip-relic-selection Skip relic selection

Events & Rest Sites

Command Description
event <index> Choose an event option
advance-dialogue Advance dialogue-only events
rest <index> Choose a campfire action

Shop

Command Description
shop-buy <index> Buy from the shop

Card/Relic Selection Overlays

Command Description
select-card <index> Select a card in overlay
confirm-selection Confirm the current selection
cancel-selection Cancel the current selection
combat-select-card <index> Select a card during combat overlay
combat-confirm-selection Confirm combat card selection

Raw Action

Command Description
action <name> --kv key=value Send a raw bridge action

Decision States

The state command returns JSON with a decision field indicating the current
game screen. Route your next command based on this value:

Decision Meaning Typical Next Commands
menu Main menu continue-game, start-game
combat_play In combat, your turn play-card, use-potion, end-turn
hand_select Card selection overlay combat-select-card, combat-confirm-selection
map_select Map node selection choose-map
game_over Run ended return-to-main-menu
combat_rewards Post-combat rewards claim-reward, proceed
card_reward Card reward pick pick-card-reward, skip-card-reward
event_choice Event screen event, advance-dialogue
rest_site Campfire rest
shop Shop screen shop-buy, proceed
card_select Card selection screen select-card, confirm-selection
relic_select Relic selection select-relic, skip-relic-selection
treasure Treasure room claim-treasure-relic, proceed

Configuration

Option Default Description
--base-url http://localhost:15526 Bridge API URL
--timeout 10.0 HTTP timeout in seconds

For AI Agents

  1. Always read state first to get the decision field
  2. Re-read state after each action - indices and energy change during combat
  3. Check return codes - 0 for success, non-zero for errors
  4. Parse stdout for JSON output

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

More from CLI-Anything

View source →

Frequently asked questions about cli-anything-slay-the-spire-ii

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

Command-line interface for Slay the Spire 2 - Control the real game through a local bridge mod HTTP API. Reads normalized game state and sends action commands for combat, navigation, rewards, and menu management. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the cli-anything-slay-the-spire-ii skill?

Run `npx @skills-hub-ai/cli install cli-anything-slay-the-spire-ii` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/cli-anything-slay-the-spire-ii/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does cli-anything-slay-the-spire-ii work with?

cli-anything-slay-the-spire-ii runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the cli-anything-slay-the-spire-ii skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use cli-anything-slay-the-spire-ii after installing it?

In Claude Code, type `/cli-anything-slay-the-spire-ii` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the cli-anything-slay-the-spire-ii skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/cli-anything-slay-the-spire-ii)](https://skills-hub.ai/skills/cli-anything-slay-the-spire-ii)
HTML
<a href="https://skills-hub.ai/skills/cli-anything-slay-the-spire-ii"><img src="https://skills-hub.ai/api/badges/skill/cli-anything-slay-the-spire-ii" alt="Install on Skills Hub"></a>

More options in the badge docs.