inspect

Parse natural-language descriptions of page visual elements (e.g., “the red button in the hero area,” “the third card from the top”) into the specific DOM element in the current preview and return its source-code location. Uses Chrome DevTools MCP take_snapshot UID for deterministic locating. Use this when a user asks to change, style, or remove a visual element but did not point to source code.

Last repository push
GitHub Stars
112
Forks
11
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "inspect" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-c9908b18daa51c4b6fb31df401306f23bdac6dad4792163a7aaa2be79cba739f. Verify the upstream source and version against https://github.com/bluzir/claude-code-design before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Parse natural-language descriptions of page visual elements (e.g., “the red button in the hero area,” “the third card from the top”) into the specific DOM element in the current preview and return its source-code location. Uses Chrome DevTools MCP take_snapshot UID for deterministic locating. Use this when a user asks to change, style, or remove a visual element but did not point to source code.

0 Downloads

Introduction source: third_party · bluzir · 0.0.1 Reference

SkillPi interpretation

Tasks
Resolve a natural-language element description ("the red button in the hero", "the third card from the top") to a concrete DOM element in the current preview + source-code location. Uses Chrome DevTools MCP take_snapshot UIDs for deterministic targeting. Use when user asks to change/style/remove a specific visual element without pointing at source code.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Chrome DevTools MCP has a page loaded (via `/preview` or `/done`) `.claude/last-snapshot.json` exists (produced by `/done`) — or we snapshot fresh
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: inspect
description: Resolve a natural-language element description ("the red button in the hero", "the third card from the top") to a concrete DOM element in the current preview + source-code location. Uses Chrome DevTools MCP take_snapshot UIDs for deterministic targeting. Use when user asks to change/style/remove a specific visual element without pointing at source code.
argument-hint: <natural-language description>
allowed-tools: Read Grep Glob mcp__chrome-devtools__take_snapshot mcp__chrome-devtools__evaluate_script mcp__chrome-devtools__take_screenshot

Inspect

Replaces Claude Design's <mentioned-element> inline-comment protocol with a terminal-native alternative: user describes an element in English, Claude resolves to a specific DOM node + source location for surgical edits.

Prerequisites

  • Chrome DevTools MCP has a page loaded (via /preview or /done)
  • .claude/last-snapshot.json exists (produced by /done) — or we snapshot fresh

Pipeline

  1. Get snapshot:

    • Prefer Read .claude/last-snapshot.json if recent (< 5 min, same URL)
    • Otherwise mcp__chrome-devtools__take_snapshot to get fresh tree
  2. Match the description against snapshot nodes. Use vision + text heuristics:

    • Role/tag match ("button" → role=button, tag=button)
    • Text content match ("the CTA that says 'Get started'")
    • Positional hints ("hero", "top", "third from left", "right sidebar")
    • Color hints ("the red button") — if ambiguous, take screenshot and visually match
    • Size hints ("the big heading")
    • Hierarchy ("inside the first card")
  3. Pick the best UID. If multiple candidates, show the top 3 to the user with a one-line summary each:

    Candidates for "red button in hero":
      [uid=3_12] <button> "Get started" — background #d83
      [uid=3_28] <a class="btn"> "Try free" — background #c55
      [uid=3_07] <div role=button> "Sign up" — background #d80
    Which one (or describe differently)?
  4. Resolve to source location. Once UID is confirmed:

    • mcp__chrome-devtools__evaluate_script — select by UID and return useful identifiers:
      // (Pass the picked uid as an arg to the evaluate function)
      (el) => ({
        tag: el.tagName.toLowerCase(),
        id: el.id || null,
        classList: Array.from(el.classList),
        textContent: el.textContent.trim().slice(0, 80),
        dataAttrs: Object.fromEntries(
          Array.from(el.attributes)
            .filter(a => a.name.startsWith('data-'))
            .map(a => [a.name, a.value])
        ),
        outerHTML: el.outerHTML.slice(0, 300),
      })
    • With these signals, Grep the source HTML (current artifacts/<name>.html) for the matching element — preferring id > data-* > unique class combination > text snippet > outerHTML substring.
    • Return: source file path + approximate line number.
  5. Report:

    Element: <button> "Get started" (uid 3_12)
    Source: artifacts/landing.html:142-148
    Selector: #cta-primary
  6. Optional next step: if user requested an edit alongside inspection ("make it bigger") — perform the Edit directly with the located line range. Otherwise just report and wait.

Heuristic priorities for "the red button" style references

When user phrase maps to multiple candidates:

  1. Explicit labels win — if <button aria-label="Subscribe"> and user says "the subscribe button", pick that regardless of visual cues
  2. Visible-first — prefer elements currently in viewport over below-fold
  3. Unique before common — a unique hero button beats the third of eight grid buttons
  4. Large before small — for "the big title" prefer larger font-size
  5. Top-first for ambiguous position — "the button" → closest to top-of-page in reading order

When to fall back to asking

If >3 candidates and vision can't disambiguate — ask the user: "you mean X, Y, or Z?"

Limits

  • Only resolves elements that rendered successfully (not in-error components)
  • React components with generated class names (CSS modules): selector might not round-trip — use outerHTML substring for source grep
  • Elements inside shadow DOM are visible to take_snapshot but Grep on source HTML won't find them — warn the user if this path fails

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 解决用户在预览页面中定位视觉元素的痛点,显著提升开发效率
  • 适用于设计稿调整、样式修改等高频场景
Trigger Precision88/100

Highlights

  • 触发词精准完整,覆盖多种变体,边界清晰
  • description 明确说明了使用场景和参数格式
Structure and Standards85/100

Highlights

  • Phase/步骤清晰,有出口条件,含端到端示例
  • frontmatter完整,单文件≤500行
Execution Reliability82/100

Highlights

  • 工具来源明确,参数正确,覆盖主要异常
  • 不可逆操作有确认机制
Evidence Verifiability (mean of the first four)87/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Chrome DevTools MCP has a page loaded (via `/preview` or `/done`) `.claude/last-snapshot.json` exists (produced by `/done`) — or we snapshot fresh

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.