Chuyển đến nội dung
Skillpedia
Khác58k · #3257

cli-anything-sts2

Skill này làm gì

Skill này cho phép agent AI đọc trạng thái của game Slay the Spire 2 và hành động trong đó qua một cầu nối dòng lệnh. Skill dành cho người chơi và developer muốn tự động hóa hoặc viết script cho game.

Khi nào nên dùng

  • ✓Khi bạn muốn agent AI đọc trạng thái hiện tại của một ván Slay the Spire 2.
  • ✓Khi bạn muốn gửi hành động chiến đấu, phần thưởng hoặc lựa chọn menu tới game từ một script.
  • ✓Khi bạn đang thiết lập mod cầu nối kết nối game với công cụ dòng lệnh.

Liên kết skill

https://github.com/HKUDS/CLI-Anything/blob/main/slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/skills/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/HKUDS/CLI-Anything/blob/main/slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/skills/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kết nối AI của tôi với Slay the Spire 2 để nó đọc trạng thái game và thực hiện các nước đi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Một mod cầu nối nhỏ chạy bên trong game và cung cấp một giao diện cục bộ. Công cụ dòng lệnh đọc trạng thái game từ đó và gửi lệnh ngược lại cho game.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

Tôi có cần cài mod không?

Có. Skill yêu cầu build và cài đặt mod STS2_Bridge trong thư mục game.

Tôi cần cài gì trước?

Python 3.10 trở lên, .NET 9 để build cầu nối, và chính game.

Làm sao kiểm tra nó hoạt động?

Chạy lệnh state. Nếu trả về JSON, kết nối đang hoạt động.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
58k
Vị trí xếp hạng
#3257
Giấy phép
Apache-2.0
Cập nhật
21/9/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự