cli-anything-sbox
它能做什么
这个技能让 AI 智能体处理 s&box,这是由 Facepunch Studios 开发的游戏引擎。适合需要项目文件、场景和代码帮助的游戏开发者。
适用场景
- ✓当你想在 s&box 项目中添加或修改场景或预制体的时候。
- ✓当你需要为某个游戏对象生成新的 C# 组件的时候。
- ✓当你想检查游戏项目是否存在失效的资源链接或重复 ID 的时候。
技能链接
https://github.com/HKUDS/CLI-Anything/blob/main/sbox/agent-harness/cli_anything/sbox/skills/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查 s&box 项目中是否有失效的资源引用,并告诉我该如何修复。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体读取并编辑项目中的 JSON 和 C# 文件,并可以检查其中的问题。大多数任务无需运行游戏引擎即可完成。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
s&box CLI
Agent-native CLI for the s&box game engine (Facepunch Studios, Source 2). 79+ commands across 14 groups. Manipulate .scene, .prefab, .vmat, .sound, Input.config, Collision.config JSON files directly, generate idiomatic C# components, and run a real-time asset graph over the project.
Installation
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=sbox/agent-harness
Requirements
- Python 3.10+
- s&box installed via Steam - auto-detected, or set
SBOX_PATHto a custom installation directory. - Most commands work entirely on the project's JSON files - s&box does not need to be running.
Global Options
--json Machine-readable JSON output (always pass for agent use)
--project PATH Project directory (auto-detects from cwd .sbproj if omitted)
Command Groups
project - Manage s&box projects
cli-anything-sbox project new --name MyGame --output-dir ./MyGame
cli-anything-sbox --json project info
cli-anything-sbox project config --max-players 32 --tick-rate 64
cli-anything-sbox --json --project ./MyGame project add-package facepunch.libsdf
cli-anything-sbox --json --project ./MyGame project remove-package facepunch.libsdf
# Lint: broken asset refs, duplicate GUIDs, malformed Input.config
cli-anything-sbox --json --project ./MyGame project validate
cli-anything-sbox --project ./MyGame project validate --no-inputs --no-guids
scene - Manipulate .scene files
cli-anything-sbox scene new --name gameplay -o ./Assets/scenes/gameplay.scene
cli-anything-sbox --json scene info ./scene.scene
cli-anything-sbox --json scene list ./scene.scene
cli-anything-sbox scene add-object ./scene.scene Enemy --position "100,0,0" --components "model,box_collider,rigidbody" --tags "enemy"
cli-anything-sbox scene remove-object ./scene.scene --name Enemy
cli-anything-sbox scene add-component ./scene.scene <object-guid> Sandbox.PointLight
cli-anything-sbox scene remove-component ./scene.scene <object-guid> --component-type Sandbox.Rigidbody
cli-anything-sbox --json scene modify-object ./scene.scene --guid <guid> --name NewName --position "200,0,0"
cli-anything-sbox --json scene clone-object ./scene.scene --name Enemy --new-name EnemyCopy --position "300,0,0"
cli-anything-sbox --json scene get-object ./scene.scene --name Sun
cli-anything-sbox scene set-property ./scene.scene --fixed-update-freq 64 --timescale 0.5
cli-anything-sbox scene set-navmesh ./scene.scene --enabled --agent-height 72 --agent-radius 16
cli-anything-sbox --json scene list-presets
cli-anything-sbox --json scene modify-component ./scene.scene <object-guid> <component-guid> --properties '{"Damage":50}'
# Find objects matching one or more filters (AND-combined)
cli-anything-sbox --json scene query ./scene.scene --has-component rigidbody --has-tag tower
cli-anything-sbox --json scene query ./scene.scene --name-regex "^Tower\d$" --in-bounds "0,-500,-50,1000,500,50"
# Extract every asset reference (.vmdl, .vmat, .vsnd, .vtex, .vpcf, .prefab) from a scene
cli-anything-sbox --json scene refs ./scene.scene
# Apply the same modification to every object that matches a query
cli-anything-sbox --json scene bulk-modify ./scene.scene --has-tag tower --position "0,0,100" --enable
# Structural diff between two scenes (added/removed/modified GameObjects + SceneProperties)
cli-anything-sbox --json scene diff ./old.scene ./new.scene
# Insert a prefab as a GameObject in a scene
cli-anything-sbox --json scene instantiate-prefab ./level.scene ./Assets/prefabs/bullet.prefab --position "10,0,0"
prefab - Manage .prefab files
cli-anything-sbox prefab new --name Bullet -o ./Assets/prefabs/bullet.prefab --components "model,sphere_collider,rigidbody"
cli-anything-sbox --json prefab info ./Assets/prefabs/bullet.prefab
cli-anything-sbox prefab from-scene ./scene.scene <object-guid> -o ./Assets/prefabs/extracted.prefab
cli-anything-sbox --json prefab add-component ./prefab.prefab rigidbody
cli-anything-sbox prefab remove-component ./prefab.prefab --component-type Sandbox.Rigidbody
cli-anything-sbox --json prefab list
# Asset references inside a prefab
cli-anything-sbox --json prefab refs ./prefab.prefab
# Modify component properties on a prefab (by component type or component GUID)
cli-anything-sbox --json prefab modify-component ./prefab.prefab --component-type Sandbox.Rigidbody --properties '{"Gravity":false,"MassOverride":50}'
# Structural diff between two prefabs (roo
常见问题
s&box 需要处于打开状态吗?
不需要。该技能说明,大多数命令仅处理项目文件即可,因此编辑器无需运行。
它需要安装什么?
它需要 Python 3.10 或更高版本,以及通过 Steam 安装的 s&box,或在 SBOX_PATH 中设置的自定义路径。
它可以为项目添加包吗?
可以。有用于为项目添加和移除包的命令。
详情
作者的原始描述
Agent-native CLI for the s&box game engine (Facepunch Studios, Source 2): project management, scene/prefab editing, material/sound/localization configs, C# code generation, asset graph queries, project validation, and editor launch.
repo: HKUDS/CLI-Anything
热度
- GitHub 星标
- 58k
- 排名
- #3244
- 许可证
- Apache-2.0
- 更新时间
- 2026/9/21
评论
- …
同一仓库的更多技能
cli-anything-3mf
58k帮你的智能体检查和修复 3D 打印文件,包括查找圆孔、调整孔径、修复网格,以及比较两个文件。
cli-anything-qgis
58k帮你的智能体在终端中打开、编辑和导出 QGIS 地图项目,包括图层、要素、打印布局和处理工具。
cli-anything-adguardhome
58k帮你的智能体管理 AdGuard Home,这是一款全网络广告拦截器,可管理过滤规则、DNS 重写、客户端和查询日志。
cli-anything-anygen
58k帮你的智能体借助 AnyGen 服务,根据文字提示生成幻灯片、文档、网站和图表。