@maccesar/aiskills 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +531 -0
- package/bin/aiskills.js +76 -0
- package/lib/cache.js +49 -0
- package/lib/cleanup.js +77 -0
- package/lib/commands/auto-update.js +131 -0
- package/lib/commands/doctor.js +139 -0
- package/lib/commands/list.js +77 -0
- package/lib/commands/skills.js +263 -0
- package/lib/commands/status.js +94 -0
- package/lib/commands/uninstall.js +182 -0
- package/lib/commands/update.js +149 -0
- package/lib/config.js +90 -0
- package/lib/downloader.js +110 -0
- package/lib/hooks.js +74 -0
- package/lib/installer.js +114 -0
- package/lib/platform.js +112 -0
- package/lib/prompts/checkboxCancel.js +264 -0
- package/lib/prompts/selectCancel.js +204 -0
- package/lib/symlink.js +154 -0
- package/lib/utils.js +49 -0
- package/package.json +61 -0
- package/skills/humaniza/SKILL.md +51 -0
- package/skills/humaniza/agents/openai.yaml +4 -0
- package/skills/humaniza/references/ai-patterns-es.md +51 -0
- package/skills/humaniza/references/checklist.md +9 -0
- package/skills/humaniza/references/examples.md +17 -0
- package/skills/humaniza/references/lexicon-es-mx.md +36 -0
- package/skills/humaniza/references/modes-es-mx.md +41 -0
- package/skills/humaniza/references/voice-es-mx.md +24 -0
- package/skills/refactoring-ui/SKILL.md +59 -0
- package/skills/refactoring-ui/references/01-design-process.md +72 -0
- package/skills/refactoring-ui/references/02-visual-hierarchy.md +84 -0
- package/skills/refactoring-ui/references/03-layout-spacing.md +69 -0
- package/skills/refactoring-ui/references/04-typography.md +70 -0
- package/skills/refactoring-ui/references/05-color.md +96 -0
- package/skills/refactoring-ui/references/06-depth-shadows.md +74 -0
- package/skills/refactoring-ui/references/07-images.md +75 -0
- package/skills/refactoring-ui/references/08-finishing-touches.md +91 -0
- package/skills/stitch-showcase/SKILL.md +411 -0
- package/skills/stitch-showcase/references/01-navbar.md +52 -0
- package/skills/stitch-showcase/references/02-hero.md +56 -0
- package/skills/stitch-showcase/references/03-design-system.md +102 -0
- package/skills/stitch-showcase/references/04-screen-gallery.md +102 -0
- package/skills/stitch-showcase/references/05-viewer-web.md +105 -0
- package/skills/stitch-showcase/references/06-viewer-mobile.md +104 -0
- package/skills/stitch-showcase/references/07-theme-system.md +77 -0
- package/skills/stitch-showcase/references/08-type-detection.md +81 -0
- package/skills/stitch-showcase/references/09-quality-standards.md +126 -0
- package/skills/stitch-showcase/references/10-component-standardization.md +40 -0
- package/skills/stitch-showcase/references/11-component-catalog.md +70 -0
- package/skills/stitch-showcase/references/catalog-template.html +841 -0
- package/skills/stitch-showcase/references/index.html +299 -0
- package/skills/stitch-showcase/references/viewer.html +412 -0
- package/skills/stitch-showcase/scripts/__pycache__/build_showcase.cpython-314.pyc +0 -0
- package/skills/stitch-showcase/scripts/__pycache__/component_utils.cpython-313.pyc +0 -0
- package/skills/stitch-showcase/scripts/__pycache__/detect_components.cpython-313.pyc +0 -0
- package/skills/stitch-showcase/scripts/__pycache__/extract_catalog.cpython-313.pyc +0 -0
- package/skills/stitch-showcase/scripts/__pycache__/extract_text.cpython-313.pyc +0 -0
- package/skills/stitch-showcase/scripts/__pycache__/extract_zips.cpython-313.pyc +0 -0
- package/skills/stitch-showcase/scripts/__pycache__/parse_design_md.cpython-313.pyc +0 -0
- package/skills/stitch-showcase/scripts/apply_canonical.py +238 -0
- package/skills/stitch-showcase/scripts/build_showcase.py +2103 -0
- package/skills/stitch-showcase/scripts/component_utils.py +398 -0
- package/skills/stitch-showcase/scripts/detect_components.py +284 -0
- package/skills/stitch-showcase/scripts/extract_catalog.py +913 -0
- package/skills/stitch-showcase/scripts/extract_text.py +268 -0
- package/skills/stitch-showcase/scripts/extract_zips.py +178 -0
- package/skills/stitch-showcase/scripts/parse_design_md.py +397 -0
- package/skills/vscode-extension-dev/SKILL.md +114 -0
- package/skills/vscode-extension-dev/references/api-patterns.md +625 -0
- package/skills/vscode-extension-dev/references/architecture.md +287 -0
- package/skills/vscode-extension-dev/references/package-json-schema.md +345 -0
- package/skills/vscode-extension-dev/references/publishing.md +251 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Component Catalog
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
|
|
5
|
+
Stitch HTML exports contain reusable UI components (buttons, cards, inputs) that users want to extract for Blade templates, design system documentation, or consistency audits. Manually finding and extracting these from 10-20 screen files is tedious.
|
|
6
|
+
|
|
7
|
+
## Solution
|
|
8
|
+
|
|
9
|
+
Every build automatically extracts all atomic and composite components, deduplicates them, clusters variants by similarity, and generates a visual catalog (`catalog.html`) alongside a machine-readable JSON (`component_catalog.json`).
|
|
10
|
+
|
|
11
|
+
## Atomic Components
|
|
12
|
+
|
|
13
|
+
| Type | Detection |
|
|
14
|
+
|------|-----------|
|
|
15
|
+
| Buttons | `<button>`, `<a.btn>`, `<input type="submit">` — variant detected by CSS class |
|
|
16
|
+
| Headings | `<h1>` through `<h6>` with associated styles |
|
|
17
|
+
| Inputs | `<input>`, `<select>`, `<textarea>` with placeholders/labels |
|
|
18
|
+
| Badges | `<span>` with classes badge/tag/pill/chip |
|
|
19
|
+
| Links | Standalone `<a>` (excludes nav links and button-like links) |
|
|
20
|
+
| Icons | Material Symbols spans, SVGs with icon class |
|
|
21
|
+
|
|
22
|
+
## Composite Components
|
|
23
|
+
|
|
24
|
+
| Type | Detection |
|
|
25
|
+
|------|-----------|
|
|
26
|
+
| Cards | `<div>` with card/shadow classes containing image + text |
|
|
27
|
+
| Price tables | Sections containing `$`, `€`, `plan`, `price` keywords |
|
|
28
|
+
| CTAs | Heading + text + prominent button combo in a section |
|
|
29
|
+
| Testimonials | Blocks with quote/testimonial/review classes or `<blockquote>` |
|
|
30
|
+
| Hero sections | First large section with h1/h2 + text + optional button |
|
|
31
|
+
|
|
32
|
+
## Deduplication
|
|
33
|
+
|
|
34
|
+
Components are deduplicated by hashing normalized HTML (whitespace removed, text content stripped, structure only). Same hash = same component, found_in lists are merged.
|
|
35
|
+
|
|
36
|
+
## Design Tokens
|
|
37
|
+
|
|
38
|
+
Extracted from all HTML/CSS across screens:
|
|
39
|
+
- **Colors**: hex values from `color`, `background-color`, CSS variables (sorted by frequency)
|
|
40
|
+
- **Fonts**: from `font-family` declarations and Google Fonts links
|
|
41
|
+
- **Border radius**: from `border-radius` declarations
|
|
42
|
+
|
|
43
|
+
## Similarity Clustering
|
|
44
|
+
|
|
45
|
+
Atomic components are clustered by similarity (85% threshold) within semantic context:
|
|
46
|
+
- **Context detection**: each component is tagged with its nearest ancestor semantic element (`<form>`, `<nav>`, `<header>`, `<section>`, etc.)
|
|
47
|
+
- **Context-aware clustering**: form buttons are grouped separately from CTA buttons
|
|
48
|
+
- **Canonical selection**: priority is home-like slug → most screens → most DOM nodes → first found
|
|
49
|
+
- **Cluster output**: JSON includes `clusters` key with canonical, variants, similarity scores, and context per cluster
|
|
50
|
+
|
|
51
|
+
## Visual Catalog
|
|
52
|
+
|
|
53
|
+
`catalog.html` features:
|
|
54
|
+
- **Comparison view**: component variants displayed side-by-side in cluster groups
|
|
55
|
+
- **Canonical badge (★)**: auto-detected best version highlighted with accent border
|
|
56
|
+
- **Similarity scores**: percentage bars showing how close each variant is to canonical
|
|
57
|
+
- **Styled previews**: components render with original Tailwind CSS (CDN + config extracted from screens)
|
|
58
|
+
- **Already Unified section**: collapsed list of components with only one variant
|
|
59
|
+
- Tabs for Structural, Atomic types, Composite, Already Unified, Design Tokens
|
|
60
|
+
- Dark/light mode toggle, search by component name
|
|
61
|
+
- Copyable code snippet per component
|
|
62
|
+
|
|
63
|
+
## Standardization Workflow
|
|
64
|
+
|
|
65
|
+
1. Build the showcase (catalog is generated automatically)
|
|
66
|
+
2. Open `catalog.html` and review component variants
|
|
67
|
+
3. Tell the AI which variant to use: "use the navbar from home"
|
|
68
|
+
4. AI runs `apply_canonical.py` to replace variants in screen HTMLs
|
|
69
|
+
5. Rebuild — catalog shows fewer variants, more items in "Already Unified"
|
|
70
|
+
6. Repeat until satisfied
|