mozaic-mcp-server 1.0.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 (161) hide show
  1. package/INSTALLATION.md +232 -0
  2. package/README.md +262 -0
  3. package/SKILLS.md +411 -0
  4. package/bin/install-skills.js +171 -0
  5. package/data/mozaic.db +0 -0
  6. package/data/mozaic.db-shm +0 -0
  7. package/data/mozaic.db-wal +0 -0
  8. package/dist/__tests__/sanity-check.test.d.ts +2 -0
  9. package/dist/__tests__/sanity-check.test.d.ts.map +1 -0
  10. package/dist/__tests__/sanity-check.test.js +167 -0
  11. package/dist/__tests__/sanity-check.test.js.map +1 -0
  12. package/dist/__tests__/tools.integration.test.d.ts +2 -0
  13. package/dist/__tests__/tools.integration.test.d.ts.map +1 -0
  14. package/dist/__tests__/tools.integration.test.js +220 -0
  15. package/dist/__tests__/tools.integration.test.js.map +1 -0
  16. package/dist/db/queries.d.ts +144 -0
  17. package/dist/db/queries.d.ts.map +1 -0
  18. package/dist/db/queries.js +536 -0
  19. package/dist/db/queries.js.map +1 -0
  20. package/dist/db/schema.d.ts +4 -0
  21. package/dist/db/schema.d.ts.map +1 -0
  22. package/dist/db/schema.js +253 -0
  23. package/dist/db/schema.js.map +1 -0
  24. package/dist/index.d.ts +3 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +416 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/parsers/__tests__/docs-parser.test.d.ts +2 -0
  29. package/dist/parsers/__tests__/docs-parser.test.d.ts.map +1 -0
  30. package/dist/parsers/__tests__/docs-parser.test.js +251 -0
  31. package/dist/parsers/__tests__/docs-parser.test.js.map +1 -0
  32. package/dist/parsers/__tests__/icons-parser.test.d.ts +2 -0
  33. package/dist/parsers/__tests__/icons-parser.test.d.ts.map +1 -0
  34. package/dist/parsers/__tests__/icons-parser.test.js +169 -0
  35. package/dist/parsers/__tests__/icons-parser.test.js.map +1 -0
  36. package/dist/parsers/__tests__/react-parser.test.d.ts +2 -0
  37. package/dist/parsers/__tests__/react-parser.test.d.ts.map +1 -0
  38. package/dist/parsers/__tests__/react-parser.test.js +274 -0
  39. package/dist/parsers/__tests__/react-parser.test.js.map +1 -0
  40. package/dist/parsers/__tests__/scss-parser.test.d.ts +2 -0
  41. package/dist/parsers/__tests__/scss-parser.test.d.ts.map +1 -0
  42. package/dist/parsers/__tests__/scss-parser.test.js +364 -0
  43. package/dist/parsers/__tests__/scss-parser.test.js.map +1 -0
  44. package/dist/parsers/__tests__/tokens-parser.test.d.ts +2 -0
  45. package/dist/parsers/__tests__/tokens-parser.test.d.ts.map +1 -0
  46. package/dist/parsers/__tests__/tokens-parser.test.js +172 -0
  47. package/dist/parsers/__tests__/tokens-parser.test.js.map +1 -0
  48. package/dist/parsers/__tests__/vue-parser.test.d.ts +2 -0
  49. package/dist/parsers/__tests__/vue-parser.test.d.ts.map +1 -0
  50. package/dist/parsers/__tests__/vue-parser.test.js +207 -0
  51. package/dist/parsers/__tests__/vue-parser.test.js.map +1 -0
  52. package/dist/parsers/docs-parser.d.ts +4 -0
  53. package/dist/parsers/docs-parser.d.ts.map +1 -0
  54. package/dist/parsers/docs-parser.js +237 -0
  55. package/dist/parsers/docs-parser.js.map +1 -0
  56. package/dist/parsers/icons-parser.d.ts +33 -0
  57. package/dist/parsers/icons-parser.d.ts.map +1 -0
  58. package/dist/parsers/icons-parser.js +125 -0
  59. package/dist/parsers/icons-parser.js.map +1 -0
  60. package/dist/parsers/react-parser.d.ts +3 -0
  61. package/dist/parsers/react-parser.d.ts.map +1 -0
  62. package/dist/parsers/react-parser.js +406 -0
  63. package/dist/parsers/react-parser.js.map +1 -0
  64. package/dist/parsers/scss-parser.d.ts +9 -0
  65. package/dist/parsers/scss-parser.d.ts.map +1 -0
  66. package/dist/parsers/scss-parser.js +351 -0
  67. package/dist/parsers/scss-parser.js.map +1 -0
  68. package/dist/parsers/tokens/border-parser.d.ts +3 -0
  69. package/dist/parsers/tokens/border-parser.d.ts.map +1 -0
  70. package/dist/parsers/tokens/border-parser.js +83 -0
  71. package/dist/parsers/tokens/border-parser.js.map +1 -0
  72. package/dist/parsers/tokens/color-parser.d.ts +3 -0
  73. package/dist/parsers/tokens/color-parser.d.ts.map +1 -0
  74. package/dist/parsers/tokens/color-parser.js +88 -0
  75. package/dist/parsers/tokens/color-parser.js.map +1 -0
  76. package/dist/parsers/tokens/grid-parser.d.ts +3 -0
  77. package/dist/parsers/tokens/grid-parser.d.ts.map +1 -0
  78. package/dist/parsers/tokens/grid-parser.js +97 -0
  79. package/dist/parsers/tokens/grid-parser.js.map +1 -0
  80. package/dist/parsers/tokens/index.d.ts +9 -0
  81. package/dist/parsers/tokens/index.d.ts.map +1 -0
  82. package/dist/parsers/tokens/index.js +10 -0
  83. package/dist/parsers/tokens/index.js.map +1 -0
  84. package/dist/parsers/tokens/screen-parser.d.ts +3 -0
  85. package/dist/parsers/tokens/screen-parser.d.ts.map +1 -0
  86. package/dist/parsers/tokens/screen-parser.js +54 -0
  87. package/dist/parsers/tokens/screen-parser.js.map +1 -0
  88. package/dist/parsers/tokens/shadow-parser.d.ts +3 -0
  89. package/dist/parsers/tokens/shadow-parser.d.ts.map +1 -0
  90. package/dist/parsers/tokens/shadow-parser.js +62 -0
  91. package/dist/parsers/tokens/shadow-parser.js.map +1 -0
  92. package/dist/parsers/tokens/spacing-parser.d.ts +4 -0
  93. package/dist/parsers/tokens/spacing-parser.d.ts.map +1 -0
  94. package/dist/parsers/tokens/spacing-parser.js +85 -0
  95. package/dist/parsers/tokens/spacing-parser.js.map +1 -0
  96. package/dist/parsers/tokens/types.d.ts +33 -0
  97. package/dist/parsers/tokens/types.d.ts.map +1 -0
  98. package/dist/parsers/tokens/types.js +42 -0
  99. package/dist/parsers/tokens/types.js.map +1 -0
  100. package/dist/parsers/tokens/typography-parser.d.ts +3 -0
  101. package/dist/parsers/tokens/typography-parser.d.ts.map +1 -0
  102. package/dist/parsers/tokens/typography-parser.js +76 -0
  103. package/dist/parsers/tokens/typography-parser.js.map +1 -0
  104. package/dist/parsers/tokens-parser.d.ts +18 -0
  105. package/dist/parsers/tokens-parser.d.ts.map +1 -0
  106. package/dist/parsers/tokens-parser.js +57 -0
  107. package/dist/parsers/tokens-parser.js.map +1 -0
  108. package/dist/parsers/vue-parser.d.ts +3 -0
  109. package/dist/parsers/vue-parser.d.ts.map +1 -0
  110. package/dist/parsers/vue-parser.js +343 -0
  111. package/dist/parsers/vue-parser.js.map +1 -0
  112. package/dist/tools/generate-react-component.d.ts +35 -0
  113. package/dist/tools/generate-react-component.d.ts.map +1 -0
  114. package/dist/tools/generate-react-component.js +81 -0
  115. package/dist/tools/generate-react-component.js.map +1 -0
  116. package/dist/tools/generate-vue-component.d.ts +35 -0
  117. package/dist/tools/generate-vue-component.d.ts.map +1 -0
  118. package/dist/tools/generate-vue-component.js +81 -0
  119. package/dist/tools/generate-vue-component.js.map +1 -0
  120. package/dist/tools/get-component-info.d.ts +52 -0
  121. package/dist/tools/get-component-info.d.ts.map +1 -0
  122. package/dist/tools/get-component-info.js +94 -0
  123. package/dist/tools/get-component-info.js.map +1 -0
  124. package/dist/tools/get-css-utility.d.ts +41 -0
  125. package/dist/tools/get-css-utility.d.ts.map +1 -0
  126. package/dist/tools/get-css-utility.js +57 -0
  127. package/dist/tools/get-css-utility.js.map +1 -0
  128. package/dist/tools/get-design-tokens.d.ts +44 -0
  129. package/dist/tools/get-design-tokens.d.ts.map +1 -0
  130. package/dist/tools/get-design-tokens.js +124 -0
  131. package/dist/tools/get-design-tokens.js.map +1 -0
  132. package/dist/tools/get-icon.d.ts +32 -0
  133. package/dist/tools/get-icon.d.ts.map +1 -0
  134. package/dist/tools/get-icon.js +108 -0
  135. package/dist/tools/get-icon.js.map +1 -0
  136. package/dist/tools/get-install-info.d.ts +39 -0
  137. package/dist/tools/get-install-info.d.ts.map +1 -0
  138. package/dist/tools/get-install-info.js +160 -0
  139. package/dist/tools/get-install-info.js.map +1 -0
  140. package/dist/tools/list-components.d.ts +32 -0
  141. package/dist/tools/list-components.d.ts.map +1 -0
  142. package/dist/tools/list-components.js +62 -0
  143. package/dist/tools/list-components.js.map +1 -0
  144. package/dist/tools/list-css-utilities.d.ts +27 -0
  145. package/dist/tools/list-css-utilities.d.ts.map +1 -0
  146. package/dist/tools/list-css-utilities.js +48 -0
  147. package/dist/tools/list-css-utilities.js.map +1 -0
  148. package/dist/tools/search-documentation.d.ts +37 -0
  149. package/dist/tools/search-documentation.d.ts.map +1 -0
  150. package/dist/tools/search-documentation.js +120 -0
  151. package/dist/tools/search-documentation.js.map +1 -0
  152. package/dist/tools/search-icons.d.ts +41 -0
  153. package/dist/tools/search-icons.d.ts.map +1 -0
  154. package/dist/tools/search-icons.js +134 -0
  155. package/dist/tools/search-icons.js.map +1 -0
  156. package/package.json +98 -0
  157. package/skills/mozaic-css-utilities/skill.md +633 -0
  158. package/skills/mozaic-design-tokens/skill.md +621 -0
  159. package/skills/mozaic-icons/skill.md +624 -0
  160. package/skills/mozaic-react-builder/skill.md +652 -0
  161. package/skills/mozaic-vue-builder/skill.md +491 -0
package/SKILLS.md ADDED
@@ -0,0 +1,411 @@
1
+ # Mozaic Design System Skills
2
+
3
+ This document describes the Claude Code skills created for the Mozaic Design System. These skills work in conjunction with the Mozaic MCP server to provide interactive, guided workflows for building applications with Mozaic.
4
+
5
+ ## Overview
6
+
7
+ **5 Claude Skills** that use the **Mozaic MCP Server** (11 tools) to provide procedural knowledge and workflows.
8
+
9
+ **Architecture Pattern**: Skills provide the "how" (workflows), MCP provides the "what" (data access)
10
+
11
+ ## Skills Summary
12
+
13
+ | Skill | Type | Description | MCP Tools Used |
14
+ |-------|------|-------------|----------------|
15
+ | `mozaic-vue-builder` | Framework | Interactive Vue 3 component generator | 4 tools |
16
+ | `mozaic-react-builder` | Framework | Interactive React/TSX component generator | 4 tools |
17
+ | `mozaic-design-tokens` | Agnostic | Design tokens and styling expert | 2 tools |
18
+ | `mozaic-css-utilities` | Agnostic | CSS utility classes and layouts | 3 tools |
19
+ | `mozaic-icons` | Both | Icon search and integration | 2 tools |
20
+
21
+ **Total**: 5 skills covering all 11 MCP tools
22
+
23
+ ---
24
+
25
+ ## Skill 1: mozaic-vue-builder
26
+
27
+ **Location**: `skills/mozaic-vue-builder/skill.md`
28
+
29
+ ### Purpose
30
+ Interactive assistant for building Vue 3 applications with Mozaic Design System.
31
+
32
+ ### MCP Tools
33
+ - `mcp__mozaic__list_components`
34
+ - `mcp__mozaic__get_component_info` (framework: vue)
35
+ - `mcp__mozaic__generate_vue_component`
36
+ - `mcp__mozaic__get_install_info` (framework: vue)
37
+
38
+ ### Key Features
39
+ - Browse components by category (forms, navigation, feedback, layout, etc.)
40
+ - Interactive component selection with proposals
41
+ - Generate complete Vue 3 SFC code
42
+ - Props configuration with v-model bindings
43
+ - Installation commands (npm/yarn/pnpm)
44
+
45
+ ### Example Usage
46
+ ```
47
+ User: "I need a login form"
48
+ Skill: Proposes TextInput + Button combinations → Generates Vue code
49
+ ```
50
+
51
+ ### Use When
52
+ - Building Vue 3 UI components
53
+ - Need component props and slots guidance
54
+ - Want installation instructions
55
+ - Building forms, modals, navigation
56
+
57
+ ---
58
+
59
+ ## Skill 2: mozaic-react-builder
60
+
61
+ **Location**: `skills/mozaic-react-builder/skill.md`
62
+
63
+ ### Purpose
64
+ Interactive assistant for building React applications with Mozaic Design System and full TypeScript support.
65
+
66
+ ### MCP Tools
67
+ - `mcp__mozaic__list_components`
68
+ - `mcp__mozaic__get_component_info` (framework: react)
69
+ - `mcp__mozaic__generate_react_component`
70
+ - `mcp__mozaic__get_install_info` (framework: react)
71
+
72
+ ### Key Features
73
+ - Browse React components by category
74
+ - Interactive component selection
75
+ - Generate TypeScript/React code
76
+ - Full type safety with interfaces
77
+ - Installation commands + TypeScript config
78
+
79
+ ### Example Usage
80
+ ```
81
+ User: "I need a registration form with TypeScript"
82
+ Skill: Proposes components with TypeScript interfaces → Generates typed React code
83
+ ```
84
+
85
+ ### Use When
86
+ - Building React UI components
87
+ - Need TypeScript type definitions
88
+ - Want framework-specific props guidance
89
+ - Building forms, modals, tables
90
+
91
+ ---
92
+
93
+ ## Skill 3: mozaic-design-tokens
94
+
95
+ **Location**: `skills/mozaic-design-tokens/skill.md`
96
+
97
+ ### Purpose
98
+ Expert for working with Mozaic design tokens (colors, typography, spacing, shadows, borders, breakpoints, grid).
99
+
100
+ ### MCP Tools
101
+ - `mcp__mozaic__get_design_tokens`
102
+ - `mcp__mozaic__search_documentation`
103
+
104
+ ### Key Features
105
+ - Browse tokens by category
106
+ - Multiple formats (JSON, SCSS, CSS, JS)
107
+ - Responsive breakpoint values
108
+ - Usage examples for Vue & React
109
+ - Consistent styling guidance
110
+
111
+ ### Token Categories
112
+ - **Colors**: Brand, semantic, component colors
113
+ - **Typography**: Font sizes, weights, line heights
114
+ - **Spacing**: Magic unit scale (4px base)
115
+ - **Shadows**: Elevation levels
116
+ - **Borders**: Widths, radius, colors
117
+ - **Screens**: Responsive breakpoints
118
+ - **Grid**: Gutters, columns, containers
119
+
120
+ ### Example Usage
121
+ ```
122
+ User: "What are the brand colors?"
123
+ Skill: Returns colors in requested format (SCSS/CSS/JS) with usage examples
124
+ ```
125
+
126
+ ### Use When
127
+ - Need brand or semantic colors
128
+ - Want consistent typography scale
129
+ - Need spacing values
130
+ - Working with responsive breakpoints
131
+ - Need shadows or border values
132
+
133
+ ---
134
+
135
+ ## Skill 4: mozaic-css-utilities
136
+
137
+ **Location**: `skills/mozaic-css-utilities/skill.md`
138
+
139
+ ### Purpose
140
+ Expert for Mozaic CSS-only utility classes (no framework needed).
141
+
142
+ ### MCP Tools
143
+ - `mcp__mozaic__list_css_utilities`
144
+ - `mcp__mozaic__get_css_utility`
145
+ - `mcp__mozaic__search_documentation`
146
+
147
+ ### Key Features
148
+ - Flexy grid system (flexbox-based)
149
+ - Container utilities
150
+ - Margin and Padding utilities
151
+ - Ratio utilities (aspect ratios)
152
+ - Scroll utilities
153
+ - Responsive modifiers
154
+
155
+ ### Available Utilities
156
+ - **Flexy**: Responsive grid (12-column)
157
+ - **Container**: Centered containers
158
+ - **Margin**: Spacing utilities (m-*, mt-*, mb-*, etc.)
159
+ - **Padding**: Padding utilities (p-*, pt-*, pb-*, etc.)
160
+ - **Ratio**: Aspect ratio containers (16:9, 4:3, 1:1, etc.)
161
+ - **Scroll**: Scroll behavior control
162
+
163
+ ### Example Usage
164
+ ```
165
+ User: "I need a 3-column responsive grid"
166
+ Skill: Returns Flexy grid HTML with responsive breakpoints
167
+ ```
168
+
169
+ ### Use When
170
+ - Building responsive layouts
171
+ - Need consistent spacing
172
+ - Want utility-first CSS approach
173
+ - Don't want to write custom CSS
174
+ - Building grids, containers, aspect ratios
175
+
176
+ ---
177
+
178
+ ## Skill 5: mozaic-icons
179
+
180
+ **Location**: `skills/mozaic-icons/skill.md`
181
+
182
+ ### Purpose
183
+ Icon search and integration for Vue & React applications.
184
+
185
+ ### MCP Tools
186
+ - `mcp__mozaic__search_icons`
187
+ - `mcp__mozaic__get_icon`
188
+
189
+ ### Key Features
190
+ - Search icons by keyword
191
+ - Browse by category (navigation, media, social, commerce, etc.)
192
+ - Filter by size (16, 24, 32, 48, 64)
193
+ - Generate Vue or React code
194
+ - Raw SVG output
195
+ - Accessibility guidance
196
+
197
+ ### Icon Categories
198
+ - Navigation (arrows, chevrons, menu)
199
+ - Media (play, pause, volume)
200
+ - Actions (edit, delete, save)
201
+ - Social (Facebook, Twitter, Instagram)
202
+ - Commerce (cart, payment, shipping)
203
+ - Interface (user, notification, calendar)
204
+ - Communication (email, message, phone)
205
+ - Files (document, image, video)
206
+
207
+ ### Example Usage
208
+ ```
209
+ User: "I need a shopping cart icon"
210
+ Skill: Shows cart icons → User selects size/framework → Generates code
211
+ ```
212
+
213
+ ### Use When
214
+ - Finding icons for UI
215
+ - Need icons in specific sizes
216
+ - Want Vue or React icon components
217
+ - Building navigation, actions, social links
218
+
219
+ ---
220
+
221
+ ## How Skills Use MCP Tools
222
+
223
+ ### Best Practice Pattern
224
+
225
+ Skills **do not duplicate** database logic. Instead, they:
226
+ 1. Use MCP tools via fully qualified names (e.g., `mcp__mozaic__list_components`)
227
+ 2. Provide procedural workflows and guidance
228
+ 3. Teach **how** to use the tools effectively
229
+ 4. Offer interactive, guided experiences
230
+
231
+ ### Example: mozaic-vue-builder Workflow
232
+
233
+ ```
234
+ 1. User: "I need a form"
235
+ 2. Skill uses mcp__mozaic__list_components → Shows form components
236
+ 3. User selects components
237
+ 4. Skill uses mcp__mozaic__get_component_info → Gets props/details
238
+ 5. Skill proposes 2-3 combinations
239
+ 6. User refines selection
240
+ 7. Skill uses mcp__mozaic__generate_vue_component → Generates code
241
+ 8. Skill uses mcp__mozaic__get_install_info → Installation commands
242
+ ```
243
+
244
+ ---
245
+
246
+ ## Installation
247
+
248
+ ### Skills Location
249
+
250
+ Skills are located in this repository:
251
+ ```
252
+ mozaic-mcp-server/skills/
253
+ ├── mozaic-vue-builder/
254
+ │ └── skill.md
255
+ ├── mozaic-react-builder/
256
+ │ └── skill.md
257
+ ├── mozaic-design-tokens/
258
+ │ └── skill.md
259
+ ├── mozaic-css-utilities/
260
+ │ └── skill.md
261
+ └── mozaic-icons/
262
+ └── skill.md
263
+ ```
264
+
265
+ ### Installation Methods
266
+
267
+ #### Method 1: NPX (Recommended)
268
+
269
+ Install the latest skills directly from npm:
270
+
271
+ ```bash
272
+ # Install skills
273
+ npx mozaic-mcp-server install
274
+
275
+ # Uninstall skills
276
+ npx mozaic-mcp-server uninstall
277
+ ```
278
+
279
+ This method:
280
+ - ✅ Always gets the latest version
281
+ - ✅ No need to clone the repository
282
+ - ✅ Works from anywhere
283
+ - ✅ No database/build required
284
+
285
+ #### Method 2: Local Scripts
286
+
287
+ From the repository:
288
+
289
+ ```bash
290
+ # Install skills
291
+ ./scripts/install-skills.sh
292
+
293
+ # Or using npm/pnpm
294
+ pnpm install-skills
295
+
296
+ # Uninstall
297
+ pnpm uninstall-skills
298
+ ```
299
+
300
+ #### Method 3: Manual Copy
301
+
302
+ ```bash
303
+ # From repository
304
+ cp -r skills/* ~/.claude/skills/
305
+ ```
306
+
307
+ ### MCP Server Configuration
308
+
309
+ Ensure the Mozaic MCP server is configured in Claude Code settings:
310
+
311
+ ```json
312
+ {
313
+ "mcpServers": {
314
+ "mozaic": {
315
+ "command": "node",
316
+ "args": ["/path/to/mozaic-mcp-server/dist/index.js"]
317
+ }
318
+ }
319
+ }
320
+ ```
321
+
322
+ ---
323
+
324
+ ## Skill Activation
325
+
326
+ Skills activate automatically based on context, or you can invoke them:
327
+
328
+ - **Auto-activation**: When user mentions relevant keywords
329
+ - **Manual**: `/skill mozaic-vue-builder`
330
+
331
+ ---
332
+
333
+ ## Cross-Skill Integration
334
+
335
+ Skills work well together:
336
+
337
+ 1. **mozaic-design-tokens** → Get colors
338
+ 2. **mozaic-vue-builder** → Build component with those colors
339
+ 3. **mozaic-css-utilities** → Add Flexy grid layout
340
+ 4. **mozaic-icons** → Add icons to the component
341
+
342
+ ---
343
+
344
+ ## Benefits of This Architecture
345
+
346
+ ✅ **No Code Duplication** - Skills use existing MCP tools
347
+ ✅ **Clear Separation** - Vue vs React vs Agnostic
348
+ ✅ **Single Source of Truth** - Database stays in MCP server
349
+ ✅ **Best Practice** - Follows official Anthropic guidance
350
+ ✅ **Maintainable** - Update MCP server, all skills benefit
351
+ ✅ **Interactive** - Skills provide guided workflows
352
+ ✅ **Shareable** - Markdown files easy to distribute
353
+
354
+ ---
355
+
356
+ ## Development
357
+
358
+ ### File Structure
359
+ Each skill follows this structure:
360
+ ```markdown
361
+ ---
362
+ name: skill-name
363
+ description: Brief description
364
+ version: 1.0.0
365
+ ---
366
+
367
+ # Skill Name
368
+
369
+ [Overview]
370
+
371
+ ## What This Skill Does
372
+ ## MCP Tools Used
373
+ ## When to Use This Skill
374
+ ## Interactive Workflow
375
+ ## Common Use Cases
376
+ ## Best Practices
377
+ ## Commands
378
+ ## Example Session
379
+ ```
380
+
381
+ ### Adding New Skills
382
+
383
+ 1. Create skill directory: `~/.claude/skills/new-skill/`
384
+ 2. Create `skill.md` with frontmatter
385
+ 3. Reference MCP tools with fully qualified names
386
+ 4. Provide interactive workflows
387
+ 5. Include examples and best practices
388
+
389
+ ---
390
+
391
+ ## Resources
392
+
393
+ - **MCP Server**: `mozaic-mcp-server/`
394
+ - **Database**: `data/mozaic.db`
395
+ - **Website**: `website/` (skill playground)
396
+ - **Documentation**: Check MCP server README
397
+
398
+ ---
399
+
400
+ ## Support
401
+
402
+ For issues or questions:
403
+ - MCP Server: Check `mozaic-mcp-server/README.md`
404
+ - Skills: This document
405
+ - Claude Code: https://code.claude.com/docs
406
+
407
+ ---
408
+
409
+ **Created**: March 23, 2026
410
+ **Author**: Mozaic MCP Server Team
411
+ **License**: MIT
@@ -0,0 +1,171 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execSync } from 'child_process';
4
+ import { existsSync, mkdirSync, cpSync, rmSync } from 'fs';
5
+ import { homedir } from 'os';
6
+ import { join, dirname } from 'path';
7
+ import { fileURLToPath } from 'url';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ const SKILLS_DEST = join(homedir(), '.claude', 'skills');
13
+ const SKILLS_SOURCE = join(__dirname, '..', 'skills');
14
+
15
+ const SKILLS = [
16
+ 'mozaic-vue-builder',
17
+ 'mozaic-react-builder',
18
+ 'mozaic-design-tokens',
19
+ 'mozaic-css-utilities',
20
+ 'mozaic-icons'
21
+ ];
22
+
23
+ const COLORS = {
24
+ reset: '\x1b[0m',
25
+ bright: '\x1b[1m',
26
+ green: '\x1b[32m',
27
+ blue: '\x1b[34m',
28
+ yellow: '\x1b[33m',
29
+ red: '\x1b[31m',
30
+ cyan: '\x1b[36m'
31
+ };
32
+
33
+ function log(message, color = 'reset') {
34
+ console.log(`${COLORS[color]}${message}${COLORS.reset}`);
35
+ }
36
+
37
+ function printHeader() {
38
+ console.log('');
39
+ log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', 'cyan');
40
+ log(' Mozaic Design System Skills - Installation', 'bright');
41
+ log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', 'cyan');
42
+ console.log('');
43
+ }
44
+
45
+ function printFooter(installed) {
46
+ console.log('');
47
+ log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', 'cyan');
48
+ log(' Installation Complete!', 'bright');
49
+ log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', 'cyan');
50
+ console.log('');
51
+ log(`✅ Installed ${installed} skills successfully`, 'green');
52
+ console.log('');
53
+ log('Skills installed:', 'bright');
54
+ SKILLS.forEach(skill => {
55
+ if (existsSync(join(SKILLS_DEST, skill))) {
56
+ log(` • ${skill}`, 'green');
57
+ }
58
+ });
59
+ console.log('');
60
+ log('📖 Documentation: https://github.com/merzoukemansouri/adeo-mozaic-mcp/blob/main/SKILLS.md', 'blue');
61
+ console.log('');
62
+ log('Skills are now available in Claude Code!', 'bright');
63
+ log('They will activate automatically based on context.', 'cyan');
64
+ console.log('');
65
+ }
66
+
67
+ async function installSkills() {
68
+ printHeader();
69
+
70
+ // Check if skills source exists
71
+ if (!existsSync(SKILLS_SOURCE)) {
72
+ log('❌ Error: Skills directory not found', 'red');
73
+ log(` Expected at: ${SKILLS_SOURCE}`, 'red');
74
+ process.exit(1);
75
+ }
76
+
77
+ log(`Installing skills from: ${SKILLS_SOURCE}`, 'blue');
78
+ log(`Installing skills to: ${SKILLS_DEST}`, 'blue');
79
+ console.log('');
80
+
81
+ // Create destination directory if needed
82
+ if (!existsSync(SKILLS_DEST)) {
83
+ log('📁 Creating skills directory...', 'yellow');
84
+ mkdirSync(SKILLS_DEST, { recursive: true });
85
+ }
86
+
87
+ let installed = 0;
88
+
89
+ // Install each skill
90
+ for (const skill of SKILLS) {
91
+ const source = join(SKILLS_SOURCE, skill);
92
+ const dest = join(SKILLS_DEST, skill);
93
+
94
+ if (!existsSync(source)) {
95
+ log(`⚠️ Skipping ${skill} (not found)`, 'yellow');
96
+ continue;
97
+ }
98
+
99
+ try {
100
+ // Check if skill already exists
101
+ if (existsSync(dest)) {
102
+ log(`🔄 Updating: ${skill}`, 'yellow');
103
+ rmSync(dest, { recursive: true, force: true });
104
+ } else {
105
+ log(`✨ Installing: ${skill}`, 'green');
106
+ }
107
+
108
+ // Copy skill
109
+ cpSync(source, dest, { recursive: true });
110
+ installed++;
111
+ } catch (error) {
112
+ log(`❌ Failed to install ${skill}: ${error.message}`, 'red');
113
+ }
114
+ }
115
+
116
+ printFooter(installed);
117
+ }
118
+
119
+ // Handle command line arguments
120
+ const args = process.argv.slice(2);
121
+ const command = args[0];
122
+
123
+ if (command === 'uninstall') {
124
+ // Uninstall skills
125
+ console.log('');
126
+ log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', 'cyan');
127
+ log(' Mozaic Design System Skills - Uninstallation', 'bright');
128
+ log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', 'cyan');
129
+ console.log('');
130
+
131
+ if (!existsSync(SKILLS_DEST)) {
132
+ log('✅ No skills directory found. Nothing to uninstall.', 'green');
133
+ process.exit(0);
134
+ }
135
+
136
+ log(`Removing skills from: ${SKILLS_DEST}`, 'blue');
137
+ console.log('');
138
+
139
+ let removed = 0;
140
+
141
+ for (const skill of SKILLS) {
142
+ const dest = join(SKILLS_DEST, skill);
143
+
144
+ if (existsSync(dest)) {
145
+ try {
146
+ log(`🗑️ Removing: ${skill}`, 'yellow');
147
+ rmSync(dest, { recursive: true, force: true });
148
+ removed++;
149
+ } catch (error) {
150
+ log(`❌ Failed to remove ${skill}: ${error.message}`, 'red');
151
+ }
152
+ }
153
+ }
154
+
155
+ console.log('');
156
+ log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', 'cyan');
157
+ log(' Uninstallation Complete!', 'bright');
158
+ log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', 'cyan');
159
+ console.log('');
160
+ log(`✅ Removed ${removed} skills successfully`, 'green');
161
+ console.log('');
162
+ } else {
163
+ // Default: install
164
+ installSkills().catch(error => {
165
+ console.error('');
166
+ log('❌ Installation failed:', 'red');
167
+ log(error.message, 'red');
168
+ console.error('');
169
+ process.exit(1);
170
+ });
171
+ }
package/data/mozaic.db ADDED
Binary file
Binary file
File without changes
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sanity-check.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanity-check.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/sanity-check.test.ts"],"names":[],"mappings":""}