.claude/skills/inspect-elements/SKILL.md
Resolve on-screen 5chan DOM elements to React source files, line numbers, component names, and ownership stacks using the app's dev-only element-source helpers and playwright-cli. Use when Codex needs to inspect a page element, map a snapshot ref to source code, confirm which component rendered a node, or follow up after $profile-browsing finds a rerender hotspot and needs file-level attribution.
npx skillsauth add bitsocialnet/5chan inspect-elementsInstall 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 to jump from a concrete DOM node in the running 5chan app to the React file and component stack that produced it.
http://5chan.localhost:1355playwright-cli installedplaywright-cli.playwright-cli snapshot and choose the relevant element ref.playwright-cli -s=inspect eval "async el => JSON.stringify(await window.__ELEMENT_SOURCE__.resolve(el))" e7
The result includes:
source: the most useful file/line match for the elementcomponentName: the nearest meaningful React componentstack: ownership stack from the concrete node upwardtagName: the underlying DOM tagplaywright-cli -s=inspect open http://5chan.localhost:1355
playwright-cli -s=inspect goto http://5chan.localhost:1355/all
playwright-cli -s=inspect eval "window.__ELEMENT_SOURCE__?.ready ?? false"
playwright-cli -s=inspect snapshot
If ready is false, wait a moment and evaluate again. If window.__ELEMENT_SOURCE__?.error is set, report that error instead of continuing.
Prefer snapshot refs because they target the exact live DOM node you just inspected.
playwright-cli -s=inspect eval "async el => JSON.stringify(await window.__ELEMENT_SOURCE__.resolve(el))" e7
Use this only when the element is easy to target and a snapshot ref is not practical.
playwright-cli -s=inspect eval "JSON.stringify(await window.__ELEMENT_SOURCE__.resolveBySelector('[data-testid=\"composer\"]'))"
Useful when you have a screenshot or a visually obvious hotspot.
playwright-cli -s=inspect eval "JSON.stringify(await window.__ELEMENT_SOURCE__.resolveAtPoint(320, 420))"
playwright-cli -s=inspect eval "async el => { const info = await window.__ELEMENT_SOURCE__.resolve(el); return JSON.stringify({ ...info, formattedStack: window.__ELEMENT_SOURCE__.formatStack(info.stack, 5) }); }" e7
Use formattedStack when you need a short, readable trace for the final report.
When $profile-browsing reports a hot route or rerender-heavy area:
window.__ELEMENT_SOURCE__.resolve(...).source.filePath as the direct edit target and stack to understand parent ownership.This is a complement to react-scan, not a replacement. react-scan tells you which components rerender too often. inspect-elements tells you which exact source file produced the node you are looking at.
source is null but stack exists, use the first useful stack frame rather than guessing.source and stack are empty, report that the node could not be resolved and pick a nearby parent element instead.tools
Profile app performance while browsing, collecting Web Vitals and React rerender data via react-scan. Orchestrates parallel profiler subagents via playwright-cli to capture navigation timing, long tasks, layout shifts, LCP, React commit counts, render bursts, and per-component render data. Use when profiling browsing performance, finding bottlenecks, diagnosing excessive rerenders, or auditing page performance.
tools
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
tools
Create a GitHub issue from recent changes, commit only relevant diffs on a short-lived task branch, push that branch, and open a PR into master that will close the issue on merge. Use when the user says "make closed issue", "close issue", or wants to create a tracked, already-resolved GitHub issue for completed work.
development
Formats GitHub issue titles and descriptions for tracking problems that were fixed. Use when proposing or implementing code changes, creating GitHub issues, or when the user asks for issue suggestions.