@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.
Files changed (73) hide show
  1. package/README.md +531 -0
  2. package/bin/aiskills.js +76 -0
  3. package/lib/cache.js +49 -0
  4. package/lib/cleanup.js +77 -0
  5. package/lib/commands/auto-update.js +131 -0
  6. package/lib/commands/doctor.js +139 -0
  7. package/lib/commands/list.js +77 -0
  8. package/lib/commands/skills.js +263 -0
  9. package/lib/commands/status.js +94 -0
  10. package/lib/commands/uninstall.js +182 -0
  11. package/lib/commands/update.js +149 -0
  12. package/lib/config.js +90 -0
  13. package/lib/downloader.js +110 -0
  14. package/lib/hooks.js +74 -0
  15. package/lib/installer.js +114 -0
  16. package/lib/platform.js +112 -0
  17. package/lib/prompts/checkboxCancel.js +264 -0
  18. package/lib/prompts/selectCancel.js +204 -0
  19. package/lib/symlink.js +154 -0
  20. package/lib/utils.js +49 -0
  21. package/package.json +61 -0
  22. package/skills/humaniza/SKILL.md +51 -0
  23. package/skills/humaniza/agents/openai.yaml +4 -0
  24. package/skills/humaniza/references/ai-patterns-es.md +51 -0
  25. package/skills/humaniza/references/checklist.md +9 -0
  26. package/skills/humaniza/references/examples.md +17 -0
  27. package/skills/humaniza/references/lexicon-es-mx.md +36 -0
  28. package/skills/humaniza/references/modes-es-mx.md +41 -0
  29. package/skills/humaniza/references/voice-es-mx.md +24 -0
  30. package/skills/refactoring-ui/SKILL.md +59 -0
  31. package/skills/refactoring-ui/references/01-design-process.md +72 -0
  32. package/skills/refactoring-ui/references/02-visual-hierarchy.md +84 -0
  33. package/skills/refactoring-ui/references/03-layout-spacing.md +69 -0
  34. package/skills/refactoring-ui/references/04-typography.md +70 -0
  35. package/skills/refactoring-ui/references/05-color.md +96 -0
  36. package/skills/refactoring-ui/references/06-depth-shadows.md +74 -0
  37. package/skills/refactoring-ui/references/07-images.md +75 -0
  38. package/skills/refactoring-ui/references/08-finishing-touches.md +91 -0
  39. package/skills/stitch-showcase/SKILL.md +411 -0
  40. package/skills/stitch-showcase/references/01-navbar.md +52 -0
  41. package/skills/stitch-showcase/references/02-hero.md +56 -0
  42. package/skills/stitch-showcase/references/03-design-system.md +102 -0
  43. package/skills/stitch-showcase/references/04-screen-gallery.md +102 -0
  44. package/skills/stitch-showcase/references/05-viewer-web.md +105 -0
  45. package/skills/stitch-showcase/references/06-viewer-mobile.md +104 -0
  46. package/skills/stitch-showcase/references/07-theme-system.md +77 -0
  47. package/skills/stitch-showcase/references/08-type-detection.md +81 -0
  48. package/skills/stitch-showcase/references/09-quality-standards.md +126 -0
  49. package/skills/stitch-showcase/references/10-component-standardization.md +40 -0
  50. package/skills/stitch-showcase/references/11-component-catalog.md +70 -0
  51. package/skills/stitch-showcase/references/catalog-template.html +841 -0
  52. package/skills/stitch-showcase/references/index.html +299 -0
  53. package/skills/stitch-showcase/references/viewer.html +412 -0
  54. package/skills/stitch-showcase/scripts/__pycache__/build_showcase.cpython-314.pyc +0 -0
  55. package/skills/stitch-showcase/scripts/__pycache__/component_utils.cpython-313.pyc +0 -0
  56. package/skills/stitch-showcase/scripts/__pycache__/detect_components.cpython-313.pyc +0 -0
  57. package/skills/stitch-showcase/scripts/__pycache__/extract_catalog.cpython-313.pyc +0 -0
  58. package/skills/stitch-showcase/scripts/__pycache__/extract_text.cpython-313.pyc +0 -0
  59. package/skills/stitch-showcase/scripts/__pycache__/extract_zips.cpython-313.pyc +0 -0
  60. package/skills/stitch-showcase/scripts/__pycache__/parse_design_md.cpython-313.pyc +0 -0
  61. package/skills/stitch-showcase/scripts/apply_canonical.py +238 -0
  62. package/skills/stitch-showcase/scripts/build_showcase.py +2103 -0
  63. package/skills/stitch-showcase/scripts/component_utils.py +398 -0
  64. package/skills/stitch-showcase/scripts/detect_components.py +284 -0
  65. package/skills/stitch-showcase/scripts/extract_catalog.py +913 -0
  66. package/skills/stitch-showcase/scripts/extract_text.py +268 -0
  67. package/skills/stitch-showcase/scripts/extract_zips.py +178 -0
  68. package/skills/stitch-showcase/scripts/parse_design_md.py +397 -0
  69. package/skills/vscode-extension-dev/SKILL.md +114 -0
  70. package/skills/vscode-extension-dev/references/api-patterns.md +625 -0
  71. package/skills/vscode-extension-dev/references/architecture.md +287 -0
  72. package/skills/vscode-extension-dev/references/package-json-schema.md +345 -0
  73. 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