add-feature by opusgamelabs/game-creator
npx skills add https://github.com/opusgamelabs/game-creator --skill add-feature为你的游戏添加一个新功能。只需用简单的英语描述你想要什么——例如,“添加一个二段跳道具”或“添加一个高分排行榜”——该功能将遵循你游戏现有的模式来构建。
用户想要添加:$ARGUMENTS
package.json 以确定引擎(Three.js 或 Phaser)src/core/Constants.js 以了解现有配置src/core/EventBus.js 以了解现有事件src/core/GameState.js 以了解现有状态src/core/Game.js(或 GameConfig.js)以了解现有系统连接方式在编写代码之前,用简单的英语解释计划:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
然后确定技术上的需求:
严格遵守以下规则:
src/ 子目录中创建新模块EventBus.js 的 Events 枚举中Constants.js 中(零硬编码值)GameState.js 中Game.js(导入、实例化、在循环中更新)npm run build 以确认没有错误原因: 新代码与现有的 EventBus 事件或 GameState 字段冲突。修复: 检查 EventBus.js 中是否存在事件名称冲突。确保新状态字段在 GameState.reset() 中有默认值。
原因: 修改了共享常量或碰撞组。修复: 添加新常量而不是更改现有常量。更改后测试原始游戏玩法。
告诉用户:
npm run dev 并尝试 [具体操作]”/add-feature add a speed boost power-up that spawns randomly
结果:创建 src/entities/PowerUp.js,将 POWER_UP 事件添加到 EventBus,将生成时间和持续时间添加到 Constants.js,连接到 Game.js。玩家收集道具 → 速度加倍持续 8 秒。
/add-feature add combo multiplier that increases when you score quickly
结果:将 comboMultiplier 和 comboTimer 添加到 GameState,在计分系统中创建连击逻辑,添加 COMBO_CHANGED 事件用于 UI 更新。
你可以根据需要多次运行此命令以持续添加功能。每个新功能都建立在前一个的基础上。
当你对游戏玩法满意时,运行
/game-creator:design-game来优化视觉效果,运行/game-creator:add-audio添加音乐和音效,或运行/game-creator:review-game进行全面的质量检查。
每周安装量
100
仓库
GitHub 星标数
31
首次出现
2026年2月21日
安全审计
安装于
claude-code83
opencode50
cursor48
gemini-cli48
github-copilot48
amp48
Add a new feature to your game. Just describe what you want in plain English — for example, "add a double-jump power-up" or "add a high score leaderboard" — and the feature will be built following your game's existing patterns.
The user wants to add: $ARGUMENTS
package.json to identify the engine (Three.js or Phaser)src/core/Constants.js for existing configurationsrc/core/EventBus.js for existing eventssrc/core/GameState.js for existing statesrc/core/Game.js (or GameConfig.js) for existing system wiringBefore writing code, explain the plan in plain English:
Then determine what's needed technically:
Follow these rules strictly:
src/ subdirectoryEventBus.js Events enumConstants.js (zero hardcoded values)GameState.jsGame.js (import, instantiate, update in loop)npm run build to confirm no errorsCause: New code conflicts with existing EventBus events or GameState fields. Fix: Check for event name collisions in EventBus.js. Ensure new state fields have defaults in GameState.reset().
Cause: Modified shared constants or collision groups. Fix: Add new constants rather than changing existing ones. Test original gameplay after changes.
Tell the user:
npm run dev and try [specific action]"/add-feature add a speed boost power-up that spawns randomly
Result: Creates src/entities/PowerUp.js, adds POWER_UP events to EventBus, adds spawn timing and duration to Constants.js, wires into Game.js. Player collects power-up → speed doubles for 8 seconds.
/add-feature add combo multiplier that increases when you score quickly
Result: Adds comboMultiplier and comboTimer to GameState, creates combo logic in scoring system, adds COMBO_CHANGED event for UI updates.
You can run this command as many times as you want to keep adding features. Each one builds on the last.
When you're happy with the gameplay, run
/game-creator:design-gameto polish the visuals,/game-creator:add-audiofor music and sound effects, or/game-creator:review-gamefor a full quality check.
Weekly Installs
100
Repository
GitHub Stars
31
First Seen
Feb 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code83
opencode50
cursor48
gemini-cli48
github-copilot48
amp48
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
46,600 周安装