Find UI Component

VerifiedSafe

Maps UI screenshots or visual descriptions to frontend component source files. Automatically activates before /scout when a screenshot is pasted with UI intent, extracting visual signals (text, layout, colors) and matching them against a component index with confidence scoring. Outputs a Mermaid diagram of component relationships to streamline navigation.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude Code
#frontend#component-discovery#screenshot-analysis#source-mapping

Recommended for

Automated summary

This skill identifies source code components corresponding to UI screenshots or visual descriptions.

Strengths

  • Precise matching through multiple visual signals (text, BEM, Material, layout, color, data shape).
  • Automatic component indexing with incremental updates.
  • Integration upstream of /scout to narrow search scope.
  • Component dependency graph for architecture understanding.

Limitations

  • Requires the component index to be up-to-date.
  • Depends on screenshot quality (resolution, hidden elements).
  • Only works for projects already configured with the expected folder structure.
When to use it

Use this skill when a developer needs to quickly locate the source code of a UI element visible in a screenshot.

When not to use it

Do not use it for code modifications without a visual reference, or when the screenshot does not clearly show specific components.

Security analysis

Safe
Quality score90/100

The skill runs local Node.js scripts and uses Bash to generate a component index, then reads JSON and source files. It does not perform network operations, data exfiltration, or destructive actions. All tools are used within the user's own codebase for legitimate UI component discovery.

No concerns found

How this analysis is made

Examples

Find component from screenshot
I have a screenshot of a login button with a Material Design style. Find the component responsible for it.
Locate page component
Find the page component that renders the dashboard layout shown in this screenshot.
Refresh component index
Update the component index after recent edits to shared components.

name: find-component description: >- [Frontend] Find source code components from UI screenshots or visual descriptions. Runs BEFORE /scout when screenshot is pasted with UI intent. Triggers on: find component, find this component, where is this code, where is this page, which component, locate component, find the source, what component is this, refresh component index, update component index, sync component index. Maps visual signals to source files with confidence scoring and Mermaid component graph. allowed-tools: Read, Grep, Glob, Bash, Task

Anti-Hallucination Requirement

Read: .claude/skills/shared/anti-hallucination-protocol.md Read: references/confidence-scoring-guide.md

Every claimed match MUST have grep-verified evidence. HALT if confidence <85% — show candidates, never fabricate.

Workflow

Step 1: Load Component Index

# Full scan (rebuild entire index):
node .claude/skills/find-component/scripts/generate-component-index.cjs

# Incremental (only re-scan git-changed component files):
node .claude/skills/find-component/scripts/generate-component-index.cjs --git-changes

# Then read:
Read: docs/component-index.json

When to use which mode:

  • --git-changes — fast update after editing components (merges into existing index)
  • No flag — full rebuild when index missing, stale, or after major refactors
  • Fallback: live grep if index unavailable

Step 2: Extract Visual Signals from Screenshot

Read: references/visual-signal-extraction.md

Read the screenshot. Extract 6 signal types (text, BEM, Material, layout, color, data shape). List each signal with what you ACTUALLY see — never infer.

Step 3: Bottom-Up Component Search

Read: references/component-matching-protocol.md

  1. Reusable components first — match signals against platform-core/ and libs/ components
  2. Domain components — match against shared/components/
  3. Page component — find parent that composes matched children
  4. If no reusable match → search page templates directly

Step 4: Score Confidence

Read: references/confidence-scoring-guide.md

  • ≥85% (≥2 grep-verified signals) → report as confirmed match
  • <85% → show top candidates with per-signal breakdown, ask user

Step 5: Build Component Relationship Graph

Output Mermaid diagram:

graph TD
  A[PageComponent] --> B[ChildComponent1]
  A --> C[ChildComponent2]
  B --> D[SharedComponent]

Verify each edge by reading actual template HTML. Never infer from imports alone.

Step 6: Report

Output: matched components, file paths (TS/HTML/SCSS), confidence %, Mermaid graph, and any unresolved ambiguities.

Integration — Pre-Scout Activation (IMPORTANT)

When a screenshot is pasted with UI-related intent (fix, update, find, debug), this skill runs BEFORE /scout in any workflow. It narrows the search scope so scout is targeted.

Auto-activation priority: /find-component → /scout → remaining workflow steps

Applies to: bugfix, feature, refactor, fix-ui, verification workflows. Output (matched file paths + component graph) feeds directly into scout/investigate steps.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/find-ui-component-mm5t8baq/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/find-ui-component-mm5t8baq' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/find-ui-component-mm5t8baq/download' --output '.skill-downloads/find-ui-component-mm5t8baq/SKILL.md.part' && mv '.skill-downloads/find-ui-component-mm5t8baq/SKILL.md.part' '.skill-downloads/find-ui-component-mm5t8baq/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Grep, Glob, Bash, Task

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/find-ui-component-mm5t8baq/SKILL.md' && test -s '.skill-downloads/find-ui-component-mm5t8baq/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/find-component' && cp -R '.skill-downloads/find-ui-component-mm5t8baq' '.claude/skills/find-component'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/find-ui-component-mm5t8baq'

openskills read 'find-ui-component-mm5t8baq'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/find-ui-component-mm5t8baq/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills