⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
hohjs-browser-mcp
Drive the Head over Heels remake's UI via the chrome-devtools MCP. Use this skill when the user asks for browser automation, capturing localStorage, dispatching game actions, or anything that involves driving the running game on localhost.
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
// README
Head over heels web-based game remake and level editor.
Features mobile and desktop support, support for gamepads, keyboard, and touch interfaces.
Shaders
- CRT shaders made for this project spun out into their own repo here: jims_shaders.
Discord/social
If you'd like, you can discuss the project on Discord
Developing
See the DEVELOPING guide.
Credits
- Jon Ritman and Bernie Drummond for making the original game.
- Reference Room data was originally converted to json, from the xml in Doug Mencken's remake. Now that I have the json, the room data is forked and I'm updating the json in the the level editor.
- Some HoH audio also forked and re-encoded from Doug Mencken's remake under the terms of the GPL v3
- Recolourised 16 colour sprites are built from rips by Toppy on Spriters Resource based on original artwork by Bernie Drummand (sadly no longer with us).
- Toppy also contributing redrawn artwork in the form of his spritesheet (go to Options -> Display -> Sprites)
- I built snarkdown-in-react for this project, forked from the original snarkdown
- This repo has a fork built from toposort, adjusted ot be a bit more tolerant of cyclic paths in the graph
- Playtesting, ideas, map design, and general support by my brother, Tom Higson
- Playtesting, moral support, and constant comms by Jon Albaugh
- Head over heels font recreated by Patrick H. Lauke is used in save dialogs for the level editor
- PyDPainter used in this project for period-correct pixel art editing
License
This project is licensed under the GNU Affero General Public License v3.0 (only) - see the LICENSE file for details. All code is original except where indicated otherwise.
Sprite Pixel art work contributed by Toppy is released under Creative Commons BY NC SA.
©2025 Jim Higson
// HOW IT'S BUILT
// FILES
2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.
.claude/skills/hohjs-browser-mcp/SKILL.md6.0 KBupstream ↗
--- name: hohjs-browser-mcp description: Drive the Head over Heels remake's UI via the chrome-devtools MCP. Use this skill when the user asks for browser automation, capturing localStorage, dispatching game actions, or anything that involves driving the running game on localhost. --- Driving this game's UI via the chrome-devtools MCP has known quirks; following these patterns avoids the trial-and-error from prior sessions. ## Connecting To attach the chrome-devtools MCP to the user's everyday Chrome (so it sees their open tabs) or to a dedicated debug Chrome, including first-time setup on a new machine (`chrome://inspect/#remote-debugging`, `chrome://flags/#enable-webmcp-testing`, the `~/.claude.json` args), follow the `use-web-mcp` skill's "Connect to a webmcp Chrome" section. ## Dev server Default URL: `http://localhost:5200/?cheats=1&track=0`. Add `?cheats=1` to expose the cheats panel; add `&track=0` to disable analytics tracking. For URL-driven scenarios: - `?campaignName=data:<base64>` — playtest mode (campaign encoded in URL). - `?campaignAuthorUserId=<userId>&campaignName=<name>` — community/named campaign URL. - `?device=mobile` — force mobile device-detection (useful for testing touch UI on a desktop browser). ## Starting a game from the main menu A fresh page load lands on the **main menu** even with a `#roomId` hash — the hash does **not** auto-start a game, and `window._e2e_gamePageGameAi` stays `undefined` until a game is actually running. To get into a room: 1. Click **Play the game** (`[data-menuitem_id="playGame"]`). 2. On the "Select which game" submenu, click the campaign you want — e.g. **Original Remastered** (the burnt-in original campaign, the one playable offline). 3. An intro **crowns dialog** appears and blocks the room from rendering. **Click anywhere on the dialog to dismiss it** and enter the room: ```js document.querySelector('[data-dialog-id="crowns"]').click(); ``` The whole dialog is the click target — don't hunt for a button. This is exactly what the `exitCrownsDialog` e2e helper does (`page.click('[data-dialog-id="crowns"]')`). Only after the crowns dialog detaches does `window._e2e_gamePageGameAi.gameState` populate and the room render. To jump straight to a specific room once a game is running, use the cheats goto-room buttons (`[data-test-id="cheats-goto-room-<roomId>"]`), not the URL hash. ## Clicking menu items: do NOT use MCP click directly Menu items are `<li role="menuitem">` styled with `display: contents`. The element has zero bounding rect, so coordinate-based clicking (Playwright actionability check) **fails with a timeout** ("did not become interactive within 5000ms"). **Two working approaches:** ### Option 1 — `evaluate_script` with DOM-direct `.click()` (preferred) ```js document.querySelector('[data-menuitem_id="playGame"]').click() ``` The click event bubbles up to the menuitem's onSelect handler. Works for any menu item. No bounding-box check. ### Option 2 — MCP click on the label-container child In a verbose snapshot, each menuitem has children. The second child (the label container `<div>`, sized roughly `wide × 30px`) has a real bounding box and is clickable via MCP. Click bubbles up to the parent's handler. ``` uid=8_3 menuitem "⏩⏩ Back to the game" uid=9_44 ignored ← icon container (small, 48×30) uid=9_50 generic ← label-container DIV (large, ~384×30) ← click this ``` Use `take_snapshot({ verbose: true })` to expose child nodes; without verbose, only the menuitem itself appears. ### Cheats panel buttons (and anything else that's a real `<button>`) Regular buttons (cheats panel, dialog content buttons) work with MCP click directly — they have normal bounding boxes. Only menu items inside `MenuItems` need the workarounds above. ## Keyboard input `mcp__chrome-devtools__press_key` synthesises keystrokes that **don't reach the game's input handlers** (the game listens on `window` for KeyboardEvent; MCP's keypress doesn't fire there). Use: ```js window.dispatchEvent(new KeyboardEvent("keydown", { key: "Enter", code: "Enter" })) window.dispatchEvent(new KeyboardEvent("keyup", { key: "Enter", code: "Enter" })) ``` This is the same pattern e2e tests use (`dispatchKeyPress` in `e2e/testUtils/gameInteractions.ts`). ## Reading state The redux store is exposed as `window._e2e_store`: ```js window._e2e_store.getState().gameMenus.openMenus.map(m => m.menuId) window._e2e_store.getState().gameInPlay.gameInPlay.campaignLocator ``` The game state (live engine state, not redux) is at `window._e2e_gamePageGameAi.gameState`: ```js window._e2e_gamePageGameAi.gameState.currentCharacterName window._e2e_gamePageGameAi.gameState.characterRooms[ window._e2e_gamePageGameAi.gameState.currentCharacterName ].id ``` ## localStorage / persisted save Per-slice persist keys (post slice-split): - `persist:hohol/savedGames` — saves dict + lastSavedCampaignLocator - `persist:hohol/userSettings` — display/sound/input preferences - `persist:hohol/spritesheetOverride` — uploaded-spritesheet override Each is double-encoded JSON: outer object has stringified field-by-field children plus a `_persist` metadata stringified. To trigger a save, dispatch a save-causing action — easiest is a cheats room change, which calls `saveGameThunk`: ```js document.querySelector('[data-test-id="cheats-open-button"]').click(); await new Promise(r => setTimeout(r, 300)); document.querySelector('[data-test-id="cheats-goto-room-egyptus1"]').click(); await new Promise(r => setTimeout(r, 1500)); ``` After ~1.5s the save is in `localStorage.getItem("persist:hohol/savedGames")`. ## Reference: e2e test conventions `e2e/testUtils/menuNavigation.ts` and `e2e/testUtils/gameInteractions.ts` have battle-tested helpers for the same operations. Patterns to mirror: - Selectors: `[data-menuitem_id="..."]`, `[data-dialog-id="..."]`, `[data-test-id="cheats-..."]`. - Wait for dialog: poll for `[data-dialog-id="X"]` to appear/detach. - Always wait ~500–1500ms after a state-changing action before reading state (gives the game tick + redux dispatch time to settle).README.mdupstream ↗
Contents are not inlined in the catalog. Open the upstream file.
Plain-text copy, no login: /skill-bundles/jimhigson-head-over-heels-online-claude-skills-hohjs-browser-mcp.md