跳到正文
cccskills
免费在 GitHub 公开

cli-anything-sts2

Control the real Slay the Spire 2 game through commands connected to a local mod. Agents can read the current game state, play cards, choose routes, collect rewards, and manage shop and menu actions.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

查看安装方法

适用场景

  • Inspect game state before choosing an action
  • Play cards and use potions in combat
  • Choose map routes, events, and campfire actions
  • Collect rewards and buy shop items
  • Start a new run or continue a saved game

包含的文件(1)

  • SKILL.md5.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

CommandDescription
stateNormalized state with decision field
raw-stateRaw bridge JSON

Main Menu

CommandDescription
continue-gameContinue a saved run
start-game --character IRONCLAD --ascension 0Start a new run
abandon-gameAbandon the current save
return-to-main-menuReturn to menu from any screen

Characters: IRONCLAD, SILENT, DEFECT, NECROBINDER, REGENT

Combat

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

Map & Room Flow

CommandDescription
choose-map <index>Select a map node
proceedLeave the current room

Rewards

CommandDescription
claim-reward <index>Claim a combat reward
pick-card-reward <index>Pick a card reward
skip-card-rewardSkip the card reward
claim-treasure-relic <index>Claim a treasure relic
select-relic <index>Select a relic
skip-relic-selectionSkip relic selection

Events & Rest Sites

CommandDescription
event <index>Choose an event option
advance-dialogueAdvance dialogue-only events
rest <index>Choose a campfire action

Shop

CommandDescription
shop-buy <index>Buy from the shop

Card/Relic Selection Overlays

CommandDescription
select-card <index>Select a card in overlay
confirm-selectionConfirm the current selection
cancel-selectionCancel the current selection
combat-select-card <index>Select a card during combat overlay
combat-confirm-selectionConfirm combat card selection

Raw Action

CommandDescription
action <name> --kv key=valueSend 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:

DecisionMeaningTypical Next Commands
menuMain menucontinue-game, start-game
combat_playIn combat, your turnplay-card, use-potion, end-turn
hand_selectCard selection overlaycombat-select-card, combat-confirm-selection
map_selectMap node selectionchoose-map
game_overRun endedreturn-to-main-menu
combat_rewardsPost-combat rewardsclaim-reward, proceed
card_rewardCard reward pickpick-card-reward, skip-card-reward
event_choiceEvent screenevent, advance-dialogue
rest_siteCampfirerest
shopShop screenshop-buy, proceed
card_selectCard selection screenselect-card, confirm-selection
relic_selectRelic selectionselect-relic, skip-relic-selection
treasureTreasure roomclaim-treasure-relic, proceed

Configuration

OptionDefaultDescription
--base-urlhttp://localhost:15526Bridge API URL
--timeout10.0HTTP 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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Build and improve Python command interfaces for GUI applications with OpenClaw. The skill guides source analysis, command design, testing, and packaging, including interactive sessions and structured JSON output for agents.

中文简介正在准备中。当前显示英语简介。

  • Build a command interface for a GUI application
  • Add missing commands to an existing interface
  • Test workflows against the actual application
HKUDS/CLI-Anything5.5万2026年9月22日 更新

Use Codex to build Python command-line tools for applications with graphical interfaces. Analyze source code, add commands, test against the actual software, validate packaging and documentation, and discover tools already generated or installed.

中文简介正在准备中。当前显示英语简介。

  • Build a command-line tool from application source code
  • Extend an existing tool with more commands
  • Test behavior against the actual application
HKUDS/CLI-Anything5.5万2026年9月22日 更新

Use Reasonix to build or improve a Python command-line interface for existing software. The workflow covers source analysis, interactive commands, JSON output, tests, documentation, and installation checks using the software’s own backend where possible.

中文简介正在准备中。当前显示英语简介。

  • Build command-line access to a GUI application
  • Add missing features to an existing command-line interface
  • Test commands against the actual software backend
HKUDS/CLI-Anything5.5万2026年9月22日 更新

Inspect and edit 3MF files for 3D printing. Detect cylindrical holes, change their diameters, repair mesh issues, and compare files while preserving BambuStudio and PrusaSlicer metadata when repacking the edited file.

中文简介正在准备中。当前显示英语简介。

  • Detect cylindrical holes and check their diameters
  • Resize selected holes to a target diameter
  • Repair degenerate faces and duplicate vertices
HKUDS/CLI-Anything5.5万2026年9月22日 更新

Manage AdGuard Home network filtering from the command line. Update blocklists, register devices, configure DNS rules that map names to addresses, and inspect query logs and statistics through the AdGuard Home REST API.

中文简介正在准备中。当前显示英语简介。

  • Adding and refreshing ad-blocking filter lists
  • Mapping local domain names to IP addresses
  • Registering devices and managing fixed address assignments
HKUDS/CLI-Anything5.5万2026年9月22日 更新

Generate slides, documents, websites, and diagrams from natural language prompts through AnyGen OpenAPI. Manage reference uploads, check generation progress, and download finished files using commands with structured output for AI agents.

中文简介正在准备中。当前显示英语简介。

  • Generate slides or documents from written instructions
  • Upload reference files for a generation task
  • Check generation progress and download finished files
HKUDS/CLI-Anything5.5万2026年9月22日 更新

查看 HKUDS 的全部技能

报告此技能的问题