.claude/skills/test-multiplayer/SKILL.md
# Skill: Test Multiplayer Locally Use this skill any time you need to verify multiplayer behavior in MultiMagicDungeonWeb. ## Stack - Game: `index.html` (open as `file://` — no HTTP server needed) - WS server: `server/index.js` on port 8080 - Node binary: `~/.nvm/versions/node/v22.22.0/bin/node` (shell aliases don't apply in Bash tool) ## Step 1: Start the WS server ```bash export PATH="$HOME/.nvm/versions/node/v22.22.0/bin:$PATH" cd /Users/douglasschonholtz/repos/MultiMagicDungeonWeb/server
npx skillsauth add dschonholtz/MultiMagicDungeonWeb .claude/skills/test-multiplayerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill any time you need to verify multiplayer behavior in MultiMagicDungeonWeb.
index.html (open as file:// — no HTTP server needed)server/index.js on port 8080~/.nvm/versions/node/v22.22.0/bin/node (shell aliases don't apply in Bash tool)export PATH="$HOME/.nvm/versions/node/v22.22.0/bin:$PATH"
cd /Users/douglasschonholtz/repos/MultiMagicDungeonWeb/server
npm install --silent
pkill -f 'node.*index.js' 2>/dev/null; sleep 0.5
node --watch index.js &
WS_PID=$!
sleep 1 && lsof -i :8080 | grep LISTEN && echo "Server up at ws://localhost:8080"
Tell the user to open in two separate tabs:
file:///Users/douglasschonholtz/repos/MultiMagicDungeonWeb/index.html
playerIdwelcome message arrives with spawnPoint, sessionId, dungeonSeedplayer_move messagesspell_cast message includes type, position, direction, ownerIdplayer_leave)After verifying the above, take a screenshot of EACH tab and explicitly describe what you see:
Tab A screenshot — describe: Is the scene rendering? Is there a player visible? Any console errors? Tab B screenshot — describe: Is the remote player model visible? Correct position/color? Any visual anomalies?
Do NOT report "multiplayer working" unless you have taken screenshots of both tabs and confirmed the remote player model is visible in each. Claiming success without visual confirmation is how bugs get shipped.
kill $WS_PID 2>/dev/null || pkill -f 'node.*index.js'
lsof -ti :8080 | xargs kill before startingnode not found: use the full nvm path abovetools
# Skill: Extend the WebSocket Protocol Use this when adding a new message type. Both client and server must be updated together. ## Message flow ``` Client → Server: join, move, spell_cast, rename, [new type] Server → Client: welcome, player_join, player_leave, player_move, spell_cast, player_rename, [new type] ``` ## Step 1: Define the message before coding Document these before touching any file: - **Name**: snake_case - **Direction**: client→server, server→client, or
development
# Skill: Add a Three.js Feature to MultiMagicDungeonWeb This game is a **single monolithic `index.html`** — no build step, no bundler. Everything lives in one file. ## File structure inside index.html ``` <html> <head> ... styles ... </head> <body> <!-- HUD overlay divs: #hud, #rename-panel, etc. --> <canvas id="c"></canvas> <script type="module"> // === CONSTANTS (WS_URL, PLAYER_SPEED, HP_MAX, etc.) === // === GLOBALS (scene, camera, renderer, clock) === //
development
Creates simple Three.js web apps with scene setup, lighting, geometries, materials, animations, and responsive rendering. Use for: "Create a threejs scene/app/showcase" or when user wants 3D web content. Supports ES modules, modern Three.js r150+ APIs.
development
# Skill: Task Workflow Use this checklist for every non-trivial piece of work. Four steps, always in order. Never skip or merge steps. --- ## Step 1 — Plan _(requires user approval before any code is written)_ - [ ] Create `tasks/active/NNN-short-title.md` from `tasks/TEMPLATE.md` - [ ] Document 2–3 options with pros/cons - [ ] Pick the best option and explain why, clearly - [ ] Write numbered, measurable **success criteria** (not "looks better" — testable outcomes) - [ ] Write a **testing s