跳到正文
Skillpedia
其他58k · #3248

cli-anything-slay-the-spire-ii

它能做什么

这个技能让 AI 智能体通过安装在游戏中的一个小模组来控制 Slay the Spire 2。适合想测试或自动化游戏的玩家和爱好者。

适用场景

  • ✓当你想让智能体读取 Slay the Spire 2 当前一局的状态的时候。
  • ✓当你想让智能体在游戏中做出战斗或奖励选择的时候。
  • ✓当你想设置桥接模组并检查连接是否正常的时候。

技能链接

https://github.com/HKUDS/CLI-Anything/blob/main/skills/cli-anything-slay-the-spire-ii/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/HKUDS/CLI-Anything/blob/main/skills/cli-anything-slay-the-spire-ii/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我查看 Slay the Spire 2 当前一局的状态,并告诉我这场战斗中有哪些选项。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体读取运行在游戏中的本地桥接模组提供的游戏数据,然后把操作指令发送回去。游戏必须在启用该模组的情况下运行。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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:

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

1. Install the CLI

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:

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:

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:

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

# 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
常见问题

我需要安装什么?

你需要 Python 3.10 或更高版本、已安装的 CLI,以及构建好并放入游戏中的 STS2_Bridge 模组。

模组很难设置吗?

设置需要构建一个 .NET 9 插件,因此需要一些技术步骤。

它可以控制哪些内容?

说明涵盖战斗、导航、奖励和菜单管理。

详情

作者的原始描述

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.

repo: HKUDS/CLI-Anything

热度

GitHub 星标
58k
排名
#3248
许可证
Apache-2.0
更新时间
2026/9/21

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能