/modcrafting-fabric:fabric-game-validationfrom modcrafting-fabric
Validates Fabric 1.21.4 gameplay changes using Observer V2 and ModCrafting game tests. Supports live in-game testing and headless GameTest runs with batch submission, snapshot assertions, and asset reloading.
Ships in modcrafting-fabric. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill when a Fabric change needs in-game evidence.
先用普通中文说明当前进展、遇到什么问题和下一步;向用户显示“已通过 / 未通过 / 暂时无法验证”,原始错误码和协议细节放在诊断信息中。一次聊天任务创建一个 modcrafting_session,把返回的 sessionId 传给后续构建、启动、状态、停止、测试和报告工具。继续旧任务时先恢复 session。不能用 MCP 连接标识代替任务 session。
modcrafting_test_profile。默认简体中文、1280×720、视距 8、60 FPS、30% 音量、旁白关闭;测试地图默认平地/种子 0、创造/和平并允许测试命令。只有用户明确选择保存工程默认时,才传 saveAsProjectDefault:true。minecraft_run_client({sessionId,projectPath})。插件会使用独立游戏目录,处理首次无障碍向导,自动创建或加载 ModCrafting Test World。测试世界已经存在时,后续启动使用 Quick Play 直接进入存档,不再停在标题界面或选择世界。复制存档只读来源,在会话副本里调整配置。不要要求用户手工覆盖 Observer 或预先编辑 options.txt。minecraft_runtime_status({sessionId,instanceId,waitMs:20000,brief:true}) 让服务端等待客户端启动、桥接连接与测试世界准备;只有 canRunTests:true 才继续。返回仍是 running 时再调用一次,不要每秒轮询;准备最多等待 300 秒,失败时查看阶段、当前界面和恢复建议。同一恢复动作最多尝试两次,禁止循环重启客户端。minecraft_test_template({featureType}) 取得实际 schema 和有效示例,再调用 minecraft_test_start({sessionId,instanceId,spec,mode})。mode 默认 auto:已有本会话运行中的客户端时走游戏内实测;没有客户端但用例只依赖服务端可验证证据、且会话已绑定工程或显式传了 projectPath 时,自动走无头 GameTest(gradlew runGameTest),不启动图形客户端。需要强制某条通道时传 live 或 headless。无头通道适合命令编排与 inventory_contains、block_equals、entity_*(含服务端 tag)、以及来自 player/serverPlayer/inventory/entities 的 snapshot_*(blocks 快照只包含 block_equals 指定的坐标);input、hud_text、截图和客户端界面状态仍必须走 live。游戏内实测默认等待 10 秒,无头测试默认等待 120 秒;无头首次运行需要编译并 remap GameTest 源集,可能更久,超时仍为 running 时用 minecraft_test_status({...,waitMs:20000}) 继续等,不要重复启动。不靠多轮错误猜字段。测试仅在本会话归属的 ModCrafting Test World 和预留区域运行;绝不对开发者普通存档执行自动清理。
多个互不依赖、走同一通道的用例用 minecraft_test_batch({sessionId,specs,mode}) 一次提交(1–20 个),不要为每个用例各起一轮 MCP 调用。live 会在同一测试世界顺序执行;无头会把全部场景交给同一个 runGameTest JVM,只付一次编译/启动开销。返回 verdict、passed/failed/inconclusive 和逐场景 results,完整报告在 reportPath;仍为 running 时用 minecraft_test_status({waitMs}) 继续等。waitMs 等待终态,不要用连续短轮询消耗模型回合。PASS 表示结构化断言均通过且清理成功;FAIL 表示真实观察与预期不同;环境、证据、能力或清理问题返回 INCONCLUSIVE。启动成功、桥接响应、命令执行和玩法验证是不同结果;截图或单次命令不能代表测试通过。minecraft_reload_assets({sessionId,instanceId}) 同时重载服务端数据包与客户端资源,然后直接重测,不必重启客户端。测试运行中、用户手动接管时或不在会话测试世界时会拒绝;Java 代码变更仍要重新构建并重启客户端。This plugin supports inventory_contains, block_equals, entity_exists, entity_attribute, entity_name, entity_team, snapshot_value, and snapshot_changed with fresh before/after snapshots. entity_attribute reads health/maxHealth/attackDamage/movementSpeed from the observed living entity; entity_name and entity_team read the same snapshot. HUD, command_result, and trace-source snapshot assertions are CAPABILITY_UNAVAILABLE until freshness/semantics are implemented. Empty actions/assertions or malformed fields are INVALID_SPEC. Missing evidence and cleanup failure must never PASS. Check the report's code and cleanup status; unsupported assertions remain explicitly unavailable.
Headless execution reports execution:'headless' and observes the disposable GameTest server world, never the graphical client. It uses a mock creative server player, resets the canonical region before each run, and only accepts command/wait steps plus server-observable assertion sources. A missing harness report is ENVIRONMENT_UNAVAILABLE, not PASS. The first headless run in a project installs a generated GameTest harness and may spend time compiling/remapping; later runs reuse it. Java changes still need a rebuild.
Live entity_exists assertions with a tag are CAPABILITY_UNAVAILABLE: Observer V2 reads client entities and cannot verify server command tags. Use headless mode for tag assertions, entityType, or the entity_attribute/name/team assertions; server tags may still identify owned entities in live cleanup commands.
Prefer focused observation over full dumps: minecraft_entity_query returns nearby entities with health/maxHealth/attackDamage/position, minecraft_widgets returns the current screen and container slots, and minecraft_entity_nbt reads one NBT path. minecraft_snapshot is compact by default; set full=true only when diagnosing. minecraft_screenshot returns a path by default; inline=true is an explicit opt-in. Use minecraft_log_read for long job logs.
What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/fabric-mod-developmentDevelop, inspect, scaffold, build, and diagnose Fabric 1.21.4 mods with ModCrafting's local MCP tools./modcrafting-planUse first to plan a new or changed Minecraft mod or modpack before implementation. Translate player goals into verified Minecraft mechanisms, compare existing mods, and produce a plain-language user plan plus an agent development guide. 中文:制作或扩展 MC 模组/整合包、复刻或还原玩法时先用;需求收敛、现成模组检索、目标版本源码复盘、双文件方案和最小可玩阶段。已有确认方案的继续开发只复盘变更,不重复规划;插件自身维护和普通故障排查不走本流程。/modcrafting-startHelp a beginner use the ModCrafting plugin. Use for how to use this plugin, getting started, making a Minecraft mod or modpack / 整合包, recreating or 复刻/还原 a game or gameplay, adding items/blocks/entities/recipes/GUI/quests, opening the visual workbench, or diagnosing installation and version problems. For any new creation request, read modcrafting-plan first and confirm the requirement before coding. 中文:怎么使用插件、开始做模组或整合包、复刻/还原玩法、添加物品/方块/生物/配方/界面/任务书、打开可视化工作台、版本或环境问题;新制作需求先用 modcrafting-plan 确认需求。npx claudepluginhub newstarbar/modcrafting --plugin modcrafting-fabricOther plugins' skills for the same job