inspecting-hermes-desktop-dom

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

2|Updated Oct 20, 2017
One-click install
npx skills add https://github.com/rbudiharso/dotfiles --skill inspecting-hermes-desktop-dom-rbudiharso
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: inspecting-hermes-desktop-dom
Source: https://github.com/rbudiharso/dotfiles/tree/main/hermes/.hermes/skills/software-development/inspecting-hermes-desktop-dom
Command: npx skills add https://github.com/rbudiharso/dotfiles --skill inspecting-hermes-desktop-dom-rbudiharso

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When developing the Hermes desktop app, inferring UI behavior from .tsx source files often leads to wrong conclusions about which CSS rule won, whether an element rendered, or what a computed value actually is. This Skill lets you read the live rendered DOM of the running app over the Chrome DevTools Protocol, answering factual questions about styles, geometry, selectors, and console output without disturbing the user's session. ## Core Features & Use Cases - Live DOM and computed style reading: Connect to the CDP port on 127.0.0.1:9222 and evaluate expressions against the real renderer to get computed styles, geometry, and element presence. - Winning-rule diagnosis: Determine which CSS rule actually applied to a node, including inherited values and plugin stylesheet overrides, before editing any call sites. - Isolated probe instances: Launch a separate Electron instance with its own HERMES_HOME, user-data-dir, and CDP port so you never kill or relaunch the user's running app. - Use Case: A style change "isn't applying" to assistant message links. Instead of editing every call site, you evaluate the real node, discover the font-weight is inherited from a @tailwindcss/typography rule, and override it on the shared class once. ## Quick Start Ask the agent to check the computed style of a specific element in the running Hermes desktop app, for example: "Check whether the composer element rendered and what the computed value of --radius-scalar is in the running desktop app."

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. In this repo, run node scripts/eval.mjs with your expression from apps/desktop, or use the shared CDP client for multi-step work.

How do I find which CSS rule is styling an element?▼

Read the real node in the live DOM and check its own classes, computed style, and ancestor chain. If the node carries no class of its own, the value is inherited, so overriding the ancestor or shared class rule fixes it instead of editing every call site.

Why is the CDP port 9222 not responding?▼

The port is closed for packaged builds and for unpackaged runs without HERMES_DESKTOP_DEV_SERVER. Verify with curl against /json/version, and never relaunch the user's app; start your own isolated instance with HERMES_DESKTOP_CDP_PORT set to a different port.

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

Yes. Launch a separate Electron instance with its own --user-data-dir, a throwaway HERMES_HOME, and a different CDP port such as 9333. This dodges Electron's single-instance lock and keeps the probe away from real sessions.

What are the limitations of inspecting the DOM over CDP?▼

CDP answers factual questions like computed values and element presence, but cannot judge aesthetics such as color balance or spacing feel. It is also not suited for perf profiling or heap analysis, and you should never dump the whole DOM since outerHTML output will flood your context.