Skip to content
dcode:find-component logo

dcode:find-component

Find UI components from screenshots, route paths, or component names. Use when a designer asks "where does this live?", shares a screenshot and wants to find the code, needs to locate a component by its visual appearance, or wants to understand how a UI element is built. Works with React, Vue, An...

SKILL.md

Full skill instructions

Find Component

Find where UI components live in a codebase—from screenshots, routes, or names.

For designers who ask: "I see this button in the app... where's the code?"

Input Types

The target can be:

  1. Screenshot path: /​path/​to/​screenshot.png - Find code from a visual
  2. Route path: settings/​profile, dashboard/​analytics - Find components for a URL
  3. Component name: UserAvatar, PricingCard - Find definition and usage

Instructions

1. Determine Input Type

Check if input is:

  • A file path ending in .png, .jpg, .jpeg, .webp → Screenshot
  • Contains capital letters or PascalCase → Component name
  • Otherwise → Route path

2A. For Screenshots

  1. Read the screenshot using the Read tool
  2. Identify visible UI elements:
    • Text content (buttons, labels, headings)
    • Distinctive patterns (cards, modals, forms)
    • Icons or images
    • Layout structure
  3. Search the codebase for:
    • Exact text strings (most reliable)
    • Component patterns matching the layout
    • CSS class names or data attributes if visible
  4. Cross-reference findings to narrow down the exact file

2B. For Route Paths

Map routes to likely component locations. Common patterns:

FrameworkTypical Structure
Next.jsapp/​{route}/​page.tsx or pages/​{route}.tsx
React RouterCheck route config, often src/​pages/ or src/​views/
Vuesrc/​views/ or src/​pages/
Angularsrc/​app/​{feature}/

Search for route registration:

# Find route definitions
grep -r "path.*['\"]/​{route}" --include="*.tsx" --include="*.ts" --include="*.js"

2C. For Component Names

Search for the component definition:

# Find component file
grep -r "function ComponentName\|const ComponentName\|class ComponentName" --include="*.tsx" --include="*.jsx" --include="*.vue"

3. Find Related Files

Once the main component is found, gather the full picture:

TypePatternPurpose
Main componentindex.tsx, ComponentName.tsxCore logic and JSX
Styles*.scss, *.css, *.styled.tsVisual styling
Typestypes.ts, *.types.tsTypeScript definitions
Tests*.test.tsx, *.spec.tsTest coverage
Hooksuse-*.ts, hooks/Custom React hooks
Sub-componentsChild directoriesNested components
Stories*.stories.tsxStorybook examples

4. Output Format

Present findings clearly:

## Found: {target}

### Main Component
| File | Purpose |
|------|---------|
| `src/​components/​UserCard/​index.tsx` | Main component |
| `src/​components/​UserCard/​styles.scss` | Styling |

### Related Files
| File | Purpose |
|------|---------|
| `src/​components/​UserCard/​Avatar.tsx` | Sub-component |
| `src/​hooks/​useUserData.ts` | Data fetching |

### Quick Start
- **To modify styling**: Edit `styles.scss`
- **To change behavior**: Edit `index.tsx`
- **To see examples**: Check `*.stories.tsx`

5. Provide Context for Designers

After listing files, add helpful guidance:

  • Which file to start with based on likely task
  • What design tokens/​variables are used
  • Any gotchas (e.g., "styles are using CSS modules")
  • Related components that share patterns

Examples

Input: Screenshot of a pricing card Output: Located PricingCard component, styles, and data source

Input: settings/​notifications Output: Files for the notifications settings page

Input: DatePicker Output: Component definition, styles, and usage examples

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View