From aiskills
Use when the user has Google Stitch design exports and wants to do anything with them — build a gallery, organize screens, generate a navigable showcase, process zip files, or browse designs. Triggers: "organiza mis diseños de Stitch", "arma el muestrario", "organize my Stitch designs", "build the showcase", "tengo los zips de Stitch", "mis exports de Stitch", or any mention of Stitch exports, screen.png + code.html pairs, or design zip files. Also: "optimiza el showcase", "mejora las descripciones", "enrich the showcase" to improve an existing showcase.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aiskills:stitch-showcaseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Converts Google Stitch exports (zips with `code.html` + `screen.png`) into a navigable showcase with `index.html` + `viewer.html` + `catalog.html`.
references/01-navbar.mdreferences/02-hero.mdreferences/03-design-system.mdreferences/04-screen-gallery.mdreferences/05-viewer-web.mdreferences/06-viewer-mobile.mdreferences/07-theme-system.mdreferences/08-type-detection.mdreferences/09-quality-standards.mdreferences/10-component-standardization.mdreferences/11-component-catalog.mdreferences/12-video-embedding.mdreferences/13-language-detection.mdreferences/14-troubleshooting-known-issues.mdreferences/15-build-flags.mdreferences/16-design-md-format.mdreferences/catalog-template.htmlreferences/index.htmlreferences/viewer.htmlscripts/apply_canonical.pyConverts Google Stitch exports (zips with code.html + screen.png) into a navigable showcase with index.html + viewer.html + catalog.html.
Architecture: Python script generates all HTML from pre-built templates in ~3 seconds. AI enrichment (descriptions, sections, hero text) is optional and on-demand — only when the user asks to optimize. The AI NEVER writes index.html or viewer.html from scratch.
Scripts require Python 3.8+. No external dependencies (stdlib only).
All commands below use <SKILL_DIR>/scripts/... as a placeholder. Replace <SKILL_DIR> with the absolute "Base directory for this skill" shown in the system message when this skill loads (e.g. ~/.claude/plugins/cache/<plugin>/<version>/skills/stitch-showcase for plugin installs, or ~/.claude/skills/stitch-showcase for standalone installs). Do not assume ~/.claude/skills/... — the path differs by install type.
digraph showcase {
"User trigger" -> "What mode?";
"What mode?" -> "Mode 1: Build" [label="new showcase"];
"What mode?" -> "Mode 2: Enrich" [label="optimize/improve"];
"What mode?" -> "Mode 3: Update" [label="add screens"];
"What mode?" -> "Mode 4: Standardize" [label="unify components"];
"Mode 1: Build" -> "Run build_showcase.py";
"Run build_showcase.py" -> "Showcase ready (~3s)";
"Showcase ready (~3s)" -> "Offer: optimize titles?";
"Mode 2: Enrich" -> "Extract text → improve DESIGN.md → rebuild";
"Mode 3: Update" -> "Copy new zips → --update → classify → rebuild";
"Mode 4: Standardize" -> "Review catalog → apply_canonical → rebuild";
}
CRITICAL: Always run build_showcase.py WITHOUT --context to generate HTMLs from templates. The --context flag is ONLY for debugging/inspecting the data JSON. NEVER have the AI write index.html or viewer.html manually — the templates handle layout, grid, viewer, theme, tabs, search, and all interactive features.
Triggers: "arma el muestrario", "build the showcase", user gives a zip/folder path, or any request to create a new showcase.
This is the default mode. No AI analysis needed — the script handles everything with smart defaults.
Steps:
python <SKILL_DIR>/scripts/build_showcase.py /path/to/source
showcase/ pathopen /path/to/showcase/index.html
That's it. No pre-flight questions, no DESIGN.md enrichment, no --extract-text, no --init.
Only ask --type or --name if the script fails or the user explicitly wants to override. Full flag reference in references/15-build-flags.md.
Triggers: "optimiza", "optimiza el showcase", "mejora las descripciones", "enrich", "optimize titles", "mejora el DESIGN.md", or any request to improve an existing showcase's content quality.
This mode improves the AI-generated content in DESIGN.md and rebuilds the showcase with enriched data.
Steps:
showcase.json)--extract-text to get screen summaries:
python <SKILL_DIR>/scripts/build_showcase.py /path/to/source --extract-text
This generates screen_summaries.txt — a compact text file with visible text from all screen HTMLs.DESIGN.md (in the source folder) + screen_summaries.txtscripts/slug_demangle.py already converts mangled slugs like configuraci_n_oscuro → "Configuración Oscuro" and membres_as → "Membresías". Use the Title | Description override only when the demangler can't infer the right title (rare word) or you want a title different from what the slug would yield.## Colors and ## Typography sections if they're missing or incomplete.python <SKILL_DIR>/scripts/build_showcase.py /path/to/source
Title override format (Title | Description):
When the demangler doesn't cover a slug (uncommon word or composite), provide both pieces explicitly. The parser splits on | — everything before is the display title, everything after is the description:
### Cuenta
- weird_man_leado_slug: Título Correcto | Descripción de la pantalla.
For slugs that the demangler already handles correctly, the plain - slug: description form is enough. Full DESIGN.md format in references/16-design-md-format.md.
Triggers: "add these new screens", "el cliente pidió una pantalla más", "coloca este zip en el proyecto", "agrégalos al muestrario", or any similar update request.
Steps:
build_showcase.py /path/to/source --update
### Por Clasificar in DESIGN.mdbuild_showcase.py /path/to/source --extract-text to generate screen_summaries.txt with text from ALL screens (existing + new)screen_summaries.txt and the current DESIGN.md### Por Clasificar:
### Section headerTitle | Description using the extracted text (especially if slug has mangled chars)build_showcase.py /path/to/sourceTriggers: "standardize the navbars", "make all footers the same", "usa el navbar del home", "estandariza los botones", or similar.
Open catalog.html to compare variants, decide a canonical, then run apply_canonical.py and rebuild. Full workflow in references/10-component-standardization.md.
Confirm with the user:
index.html — thumbnails visible and correctThe catalog is generated automatically as part of every build. Open catalog.html to browse components by type (Structural, Atomic, Composite), compare variants side-by-side with similarity scores, see what's already unified, and copy component HTML. Design details in references/11-component-catalog.md.
| Script | Purpose |
|---|---|
scripts/build_showcase.py | Main orchestrator — generates index.html + viewer.html |
scripts/extract_zips.py | Extracts and renames zips → assets/ |
scripts/extract_text.py | Extracts visible text from HTML files → compact summaries for LLM |
scripts/detect_components.py | Detects shared components (nav, footer, tabbar) across screens |
scripts/extract_catalog.py | Extracts atomic + composite components for visual catalog |
scripts/component_utils.py | Shared HTML parsing helpers (stdlib html.parser) |
scripts/parse_design_md.py | Parses DESIGN.md → metadata dict |
scripts/slug_demangle.py | De-mangles Stitch slugs back to accented titles (configuraci_n → Configuración) |
scripts/apply_canonical.py | Applies a canonical component variant across selected screens |
| Template | Purpose |
|---|---|
references/index.html | Unified showcase — hero, design system, section tabs, grid/list toggle, mobile/web view mode toggle |
references/viewer.html | Unified viewer — phone frame + browser chrome toggled by view mode, prev/next, fullscreen |
references/catalog-template.html | Visual component catalog with tabs, previews, code snippets |
| Guide | Purpose |
|---|---|
references/01-navbar.md through references/09-quality-standards.md | Design decisions documentation for each section |
references/07-theme-system.md | Theme system, smart default, showcase color strategy (never use brand colors for surfaces) |
references/08-type-detection.md | Mobile vs web detection (project-level keywords + per-screen HTML signals) |
references/10-component-standardization.md | Component standardization design + Mode 4 workflow |
references/11-component-catalog.md | Component catalog design doc |
references/12-video-embedding.md | How to embed videos in slots (autoplay, aspect ratio, AV1 → H.264) |
references/13-language-detection.md | How <html lang> is resolved (auto-detect + overrides) |
references/14-troubleshooting-known-issues.md | Known issues and workarounds |
references/15-build-flags.md | Build script reference: flags, output structure, source discovery, supported input layouts |
references/16-design-md-format.md | DESIGN.md & showcase.json formats: project metadata, screen grouping, description sources priority |
| Problem | Solution |
|---|---|
| No zips found | Point to project root (with showcase.json) or directly to the screens folder |
| Broken thumbnails | screen.png must be inside the zip alongside code.html |
| Ambiguous type | Pass --type mobile or --type web explicitly |
| Empty DESIGN.md | Pass --name and --type via CLI; descriptions inferred from HTML |
| Encoding errors | Stitch HTML files use UTF-8; verify terminal encoding matches |
| Web screens in phone frame | Use --type web to force web viewer |
| Poor/missing descriptions | Use Mode 2 (Enrich): extract text → improve DESIGN.md → rebuild |
npx claudepluginhub maccesar/aiskills --plugin aiskillsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.