inspecting-hermes-desktop-dom

Inspect the live Hermes desktop DOM and computed CSS over Chrome DevTools Protocol.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill inspecting-hermes-desktop-dom-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: inspecting-hermes-desktop-dom
Source: https://github.com/CHENHUI-X/toolbox/tree/main/official-skills/software-development/inspecting-hermes-desktop-dom
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill inspecting-hermes-desktop-dom-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When developing the Hermes desktop app, guessing why a style did not apply or whether a UI change took effect wastes time. This Skill reads the live rendered DOM of the running Electron window over the Chrome DevTools Protocol, answering factual questions about computed styles, geometry, winning CSS rules, and console output. ## Core Features & Use Cases - Live DOM inspection: Connect to the CDP port on 127.0.0.1:9222 and evaluate expressions against the real renderer using the shared CDP client and stable data-slot selectors. - CSS rule diagnosis: Determine which rule actually won by reading computed styles and ancestor classes, distinguishing inherited values from directly applied ones. - Isolated probe instances: Launch a separate Electron instance with its own user-data directory, HERMES_HOME, and CDP port so the user's running app is never disturbed. - Use Case: A developer changes a component's font weight but the UI looks unchanged. Instead of editing every call site, they query the live node, discover the value is inherited from a plugin stylesheet rule, and override it on the shared class. ## Quick Start Ask the assistant to check the computed style of a specific element in the running Hermes desktop app using the CDP port on 127.0.0.1:9222.

Frequently Asked Questions about inspecting-hermes-desktop-dom

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I inspect the DOM of a running Electron app?

Connect to the Chrome DevTools Protocol port the dev server opens on 127.0.0.1:9222, then evaluate expressions against the renderer. Verify the port first with curl against /json/version before running any evaluation script.

How do I find which CSS rule is overriding my style?

Read the live node's computed style and walk its ancestor classes via CDP evaluation. If the node carries no class of its own, the value is inherited, so override the ancestor or plugin stylesheet rule rather than editing each call site.

Why is the CDP port not open on 9222?

The port is closed for packaged builds and for unpackaged runs without HERMES_DESKTOP_DEV_SERVER set. Check HERMES_DESKTOP_CDP_PORT in case it was moved or set to off, and never relaunch the user's app to force a port.

Can I inspect the app without disturbing the user's running instance?

Yes, launch an isolated Electron instance with a separate --user-data-dir, a throwaway HERMES_HOME, and a different CDP port such as 9333. This avoids Electron's single-instance lock and keeps real sessions untouched.

What are the limitations of CDP-based DOM inspection?

CDP answers factual questions like computed values and selector matches but cannot judge visual quality or aesthetics. It is also unsuited for performance profiling or heap analysis, which need dedicated debugging tools.