bitovi/ai-enablement-prompts/2-discovery-assets
Claude Code and agent skill by bitovi/ai-enablement-prompts
- community
Checking that the SKILL.md file is still in the repository.
Subagent for figma-from-code Phase 0b. Discovers all Lucide icons and SVG file assets imported across the codebase via static analysis. Extracts SVG markup and maps which components use which icons. No dev server or Figma access needed.
Install
npx vskill@latest install bitovi/ai-enablement-prompts/2-discovery-assetsSKILL.md
Skill: Icon & Asset Discovery
Discovers all Lucide icons and SVG file assets imported across the codebase, extracts their SVG markup, and maps which components use which icons. This is pure static analysis — no dev server or Figma access needed.
When to Use
- Before
figma-from-codePhase 3 (icon preamble builds Figma icon components from this data) - Standalone audit of icon and asset usage across the codebase
- When resuming a build and
icons.jsonis missing
Prerequisites
- Source directory exists at
{sourceDir}(the directory containing the project's component source files) node_modules/lucide-reactinstalled (for resolving icon SVG data; only required whenconfig.iconLibraryislucide-react)
Placeholders like{sourceDir}resolve fromstate.json → config. Whenconfig.iconLibraryisnullor thelucide-reactpackage is absent, icon extraction is skipped and an emptyiconsarray is written toicons.json— the phase still completes and recordstotalIcons: 0in the summary.
Required Inputs
| Input | Description | |
|---|---|---|
sourceDir | Path to the source directory to scan (from state.json → config.sourceDir) |
Output Files
Written to .temp/figma-from-code/:
| File | Contents | |
|---|---|---|
icons.json | Icon/asset manifest with SVG strings and per-component mapping |
icons.json structure
Workflow
1. Ensure output directory exists
2. Run the icon extraction script
The script:
- Recursively finds all
.tsx?files (excludesnode_modules, test files) - Parses static imports from
lucide-react - Resolves each icon's SVG from
node_modules/lucide-react/dist/esm/icons/ - Finds and extracts SVG file imports (e.g.,
import Logo from '@/assets/logo.svg') - Maps which components use which icons/assets
3. Read and summarize the output
Read .temp/figma-from-code/icons.json and extract:
summary.totalIcons— number of Lucide icons foundsummary.totalAssets— number of SVG file assets foundsummary.componentsWithIcons— how many components use iconsicons[].name— list of icon namesassets[].name— list of asset names
4. Write icons summary for the orchestrator
Extract the data the orchestrator needs into a small summary file so it never has to read the full icons.json (which contains SVG strings):
Write to .temp/figma-from-code/icons-summary.json. The orchestrator reads only this file (~500 bytes) instead of the full icons.json.
5. Report
Scripts Reference
| Script | Location | Purpose | |
|---|---|---|---|
extract-icons.js | {skillRoot}/scripts/extract-icons.js | Static analysis of imports to find icons/assets and extract SVG data |
Do NOT modify this script.
Skip / Resume
If called with resume: true, check whether .temp/figma-from-code/icons.json exists on disk. If it does, skip and read the existing file. If it's missing, re-run.
Error Handling
| Scenario | Action | |
|---|---|---|
extract-icons.js fails | Verify the source directory exists and node_modules/lucide-react is installed | |
| Icon SVG resolution fails | Script logs warnings per-icon; other icons still extracted | |
| SVG file asset not found on disk | Script logs warning; asset entry created without svgString |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/figma-from-code/skills/figma-from-code/2-discovery-assets/SKILL.md
Popularity
- Repository stars
- 121
- Repository forks
- 63
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bitovi/ai-enablement-prompts/2-discovery-assets)