Add feature

From PlayableIntelligence/game-creator · View interactive version

Add feature is an AI agent skill from the GitHub repository PlayableIntelligence/game-creator. Add a new gameplay feature to an existing browser game following its architecture patterns. Use when the user says "add a feature", "add double-jump", "add a power-up", "add a leaderboard", or describes a specific game mechanic to implement. Do NOT use for visual-only changes (use design-game) or re

How to use this skill

Skill file

Performance Notes

Add Feature

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.

Instructions

The user wants to add: $ARGUMENTS

Step 1: Understand the codebase

Step 2: Plan the feature

Before writing code, explain the plan in plain English:

  1. What it does: Describe the feature from the player's perspective
  2. How it works: List the new files, events, and settings that will be created
  3. What it touches: List existing files that need small changes to wire in the feature

Then determine what's needed technically:

Step 3: Implement

Follow these rules strictly:

  1. Create the new module in the correct src/ subdirectory
  2. Add ALL new events to EventBus.js Events enum
  3. Add ALL configuration values to Constants.js (zero hardcoded values)
  4. Add any new state domains to GameState.js
  5. Wire the new system into Game.js (import, instantiate, update in loop)
  6. Use EventBus for ALL communication with other systems
  7. Follow the existing code style and patterns in the project

Step 4: Verify

Troubleshooting

Game breaks after adding feature

Cause: 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().

Feature works but breaks existing gameplay

Cause: Modified shared constants or collision groups.

Fix: Add new constants rather than changing existing ones. Test original gameplay after changes.

Output

Tell the user:

  1. What the feature does (from the player's perspective)
  2. What files were created or changed
  3. How to test it — "Run npm run dev and try [specific action]"

Example Usage

Adding a power-up

/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.

Adding a scoring mechanic

/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.

Tips

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-game to polish the visuals, /game-creator:add-audio for music and sound effects, or /game-creator:review-game for a full quality check.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.