experience-lwc-runtime-observe
Skill by forcedotcom
Runs a Salesforce Lightning Preview for an LWC app or component and extracts the rendered runtime DOM. Built for developers who need to inspect what actually renders, not just the template.
Install experience-lwc-runtime-observe
Built from the published package, never by AI.
git clone --depth 1 https://github.com/forcedotcom/sf-skills /tmp/sf-skills && mkdir -p ~/.claude/skills && cp -r /tmp/sf-skills/skills/experience-lwc-runtime-observe ~/.claude/skills/experience-lwc-runtime-observeRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install experience-lwc-runtime-observe in Claude Code
git clone --depth 1 https://github.com/forcedotcom/sf-skills /tmp/sf-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/sf-skills/skills/experience-lwc-runtime-observe ~/.gemini/antigravity-cli/skills/experience-lwc-runtime-observeAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install experience-lwc-runtime-observe in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill starts a Salesforce Lightning Preview with the Salesforce CLI so a Lightning Web Component app or a single component renders in a local dev environment. It uses the sf lightning dev app and sf lightning dev component commands and sets an environment variable so the CLI does not open a browser window.
Once the preview is running, the skill guides a browser automation driver to open the preview URL and read the rendered subtree, including the component's shadow root. Bundled scripts check the toolchain, fetch a front-door URL without exposing the token in agent context, and wrap the output in fixed markers. It is for developers who want to inspect runtime DOM, not for writing LWC source code or reviewing code statically.
Written from the project's SKILL.md and checked against it.
What it can do
- Verify toolchainRuns a bundled script that checks the Salesforce CLI, the Lightning Dev plugin and the target org alias.
- Start Lightning PreviewLaunches an app or component preview with sf lightning dev app or sf lightning dev component.
- Get front-door URL safelyUses a helper script to obtain the preview login URL without writing the token into the transcript.
- Extract runtime DOMDirects the browser driver to read the rendered HTML subtree of the app or component.
- Shadow DOM traversalReads element.shadowRoot.innerHTML because LWC template content is not on the host element.
- Wrap DOM outputUses a script to wrap extracted HTML in DOM_OUTPUT_START and DOM_OUTPUT_END markers.
What you need
- Salesforce CLI (sf) version 2.0.0 or later
- python3 version 3.0.0 or later
- The @salesforce/plugin-lightning-dev plugin installed
- An authenticated Salesforce org with Local Dev enabled
- Browser automation available in the agent harness, such as Playwright, Puppeteer or Chrome DevTools Protocol
Try asking
- Preview my LWC component locally with sf lightning dev component
- Extract the rendered DOM of my component from the live preview
- Launch a Local Dev preview for my Lightning app
Good to know
- DOM extraction needs browser automation; the scripts do not drive the browser.
- The OPEN_BROWSER=false setting is undocumented in the CLI help.
- Front-door login tokens expire quickly, so the browser must navigate within about 60 seconds.
- Not for authoring LWC code or static code review.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/experience-lwc-runtime-observe/SKILL.md, skills/experience-lwc-runtime-observe/scripts/extract-dom.sh, skills/experience-lwc-runtime-observe/scripts/open-frontdoor.sh, skills/experience-lwc-runtime-observe/scripts/verify-toolchain.sh. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB -
examples/component-preview-and-dom.md1 KB -
scripts/extract-dom.sh2 KB -
scripts/open-frontdoor.sh2 KB -
scripts/verify-toolchain.sh2 KB
Alternatives to experience-lwc-runtime-observe
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
experience-lwc-runtime-observe: common questions
Why is my component's template empty in the DOM?
LWC uses Shadow DOM, so the template is not on the host element's innerHTML. The skill reads element.shadowRoot.innerHTML instead.
Can this skill write or edit LWC code?
No. The source says authoring or editing LWC source code should use the experience-lwc-generate skill.
Why does the preview open a browser window?
The source says this happens when OPEN_BROWSER=false is not set on the preview command, so the skill prefixes it.
How do I install experience-lwc-runtime-observe?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is experience-lwc-runtime-observe free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is experience-lwc-runtime-observe safe to use?
It scores 84 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to experience-lwc-runtime-observe?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
