# UI Scanner

> Analyzes an existing Vue project's UI to map components, extract design tokens, and identify code patterns, then generates a project-specific contextual skill file for consistent future development.

- Skill: `pwdev-solucoes/ui-scanner` (Agent Skill)
- Install (CLI): `npx skillmds@latest add pwdev-solucoes/ui-scanner`
- Raw SKILL.md: https://api.skillmd.com/api/skills/pwdev-solucoes/ui-scanner/raw
- Safety review: CAUTION (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend, Coding & Dev Tools, Frontend Frameworks
- Tags: Code Patterns, Component Inventory, Css Tokens, Project Skill, Shadcn Vue, Ui Analysis, Vue
- Author: pwdev-solucoes (https://skillmd.com/u/pwdev-solucoes)
- Updated: 2026-08-22
- Page: https://skillmd.com/skills/pwdev-solucoes/ui-scanner

---


# Skill: UI Scanner

This skill analyzes the project's existing UI and generates a project-specific
contextual skill to guide new development.

## When to use

- Before starting development on an existing project (`/pwdev-uiux:scan`)
- When the ui-builder needs real project context
- For consistency auditing of the existing design system
- To map what exists before deciding what to build

## What it produces

Generates `.planning/ui/project-ui-skill.md` — contextual skill with:
- Confirmed Vue stack and actual versions
- Project custom CSS tokens
- Inventory of installed shadcn-vue components
- Mapped product components
- Identified code patterns (SFC style, form pattern, etc.)
- Naming conventions
- Visual observations (when browser is available)
- Inconsistencies to avoid repeating

## Execution protocol

### Step 1 — Verify project structure

```bash
# Directory structure
find . -maxdepth 3 -type d | grep -v node_modules | grep -v .git | sort

# Installed stack
cat package.json | python3 -m json.tool 2>/dev/null | grep -A2 '"dependencies"'
```

### Step 2 — Analyze components

```bash
# Total SFCs
find . -name "*.vue" | grep -v node_modules | wc -l

# Installed shadcn-vue components
ls components/ui/ 2>/dev/null || ls src/components/ui/ 2>/dev/null

# Product components (sample)
find components/ src/components/ -name "*.vue" 2>/dev/null | \
  grep -v "/ui/" | head -20

# Read 3-5 representative components to understand patterns
```

### Step 3 — Extract tokens

```bash
# globals.css or app.css or assets/
find . -name "*.css" | grep -v node_modules | xargs grep "^--" 2>/dev/null | head -40

# tailwind.config
cat tailwind.config.ts 2>/dev/null || cat tailwind.config.js 2>/dev/null
```

### Step 4 — Check browser (if available)

```bash
# Dev server running?
PORT=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000 2>/dev/null)
PORT5173=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:5173 2>/dev/null)
echo "3000: $PORT, 5173: $PORT5173"
```

If accessible, analyze visually via WebFetch.

### Step 5 — Generate skill

Write result to `.planning/ui/project-ui-skill.md` following the template
documented in the `ui-scanner` agent.

## Usage example

```
/pwdev-uiux:scan                    # Scan current project
/pwdev-uiux:scan http://localhost:3000/dashboard  # Focus on a specific route
/pwdev-uiux:scan --visual-only      # Visual analysis only (no code)
/pwdev-uiux:scan --code-only        # Code analysis only (no browser)
```

## Expected output

```
✅ UI Scanner completed

Project: [name]
Vue Components: 47
shadcn-vue installed: 18/58 available
Custom tokens found: 12
Patterns identified: script setup TS, vee-validate, composables per feature

Skill generated at: .planning/ui/project-ui-skill.md
The ui-builder will use this skill as a reference for new components.

Next step: /pwdev-uiux:start "description of the new feature"
```

