ui-ux-pro-max-skill/├── src/ui-ux-pro-max/ # Source of truth (edit here)├── cli/ # CLI installer code├── .claude/ # Local Claude Code testing└── .factory/ # Local Droid (Factory) testing
The search engine is in src/ui-ux-pro-max/scripts/:
search.py - CLI entry point, argument parsing
core.py - BM25 ranking algorithm, CSV loading
design_system.py - Design system generation logic
Example: Modifying search ranking
# src/ui-ux-pro-max/scripts/core.pydef calculate_bm25_score(query_terms, doc_terms, doc_length, avg_doc_length, N, df): k1 = 1.5 # Increase this to boost term frequency importance b = 0.75 # Increase this to boost document length normalization # ...
Templates control how skill files are generated for different AI assistants:
src/ui-ux-pro-max/templates/├── base/│ ├── skill-content.md # Common content for all platforms│ └── quick-reference.md # Quick reference (Claude only)└── platforms/ ├── claude.json # Claude Code config ├── opencode.json # OpenCode config └── ...
Example: Editing base content
<!-- src/ui-ux-pro-max/templates/base/skill-content.md --># {{TITLE}}{{DESCRIPTION}}## UsageThis {{SKILL_OR_WORKFLOW}} provides design intelligence for building professional UI/UX.## Search Command```bashpython3 {{SCRIPT_PATH}} "<query>" --domain <domain>
**Available placeholders:**- `{{TITLE}}` - Skill title- `{{DESCRIPTION}}` - Skill description- `{{SCRIPT_PATH}}` - Path to search.py- `{{SKILL_OR_WORKFLOW}}` - "skill" or "workflow" depending on platform- `{{QUICK_REFERENCE}}` - Quick reference section (if enabled)### Testing with SymlinksThe `.claude/` and `.factory/` directories use symlinks to `src/ui-ux-pro-max/`:```bash# Changes to source are immediately availableecho "New style,General,Description,..." >> src/ui-ux-pro-max/data/styles.csv# Test in Claude Code (if installed)python3 .claude/skills/ui-ux-pro-max/scripts/search.py "new style" --domain style# Test in Droid/Factory (if installed)python3 .factory/skills/ui-ux-pro-max/scripts/search.py "new style" --domain style
This creates dist/index.js with all dependencies bundled.
4
Test locally
# Create a test directorymkdir /tmp/test-installcd /tmp/test-install# Run CLI from source with --offline flagnode ~/path/to/ui-ux-pro-max-skill/cli/dist/index.js init --ai claude --offline# Verify installationls -la .claude/skills/ui-ux-pro-max/python3 .claude/skills/ui-ux-pro-max/scripts/search.py "glassmorphism" --domain style
# Build CLIcd cli && bun run build# Test in temporary directorymkdir /tmp/test-cli && cd /tmp/test-clinode ~/path/to/ui-ux-pro-max-skill/cli/dist/index.js init --ai claude --offline# Verify files were createdls -la .claude/skills/ui-ux-pro-max/cat .claude/skills/ui-ux-pro-max/SKILL.md# Test search functionalitypython3 .claude/skills/ui-ux-pro-max/scripts/search.py "test query" --domain style
def search(query: str, domain: str | None = None, max_results: int = 5) -> list[dict]: """Search the database using BM25 ranking. Args: query: Search query string domain: Optional domain to search (product, style, color, etc.) max_results: Maximum number of results to return Returns: List of matching entries sorted by relevance score """ # Implementation...