stitch-kit 1.5.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 (98) hide show
  1. package/AGENTS.md +139 -0
  2. package/CHANGELOG.md +86 -0
  3. package/README.md +167 -0
  4. package/agents/stitch-kit.md +93 -0
  5. package/bin/stitch-kit.mjs +430 -0
  6. package/docs/architecture.md +118 -0
  7. package/docs/color-prompt-guide.md +119 -0
  8. package/docs/mcp-naming-convention.md +64 -0
  9. package/docs/mcp-schemas/README.md +130 -0
  10. package/docs/mcp-schemas/apply_design_system.json +36 -0
  11. package/docs/mcp-schemas/create_design_system.json +78 -0
  12. package/docs/mcp-schemas/create_project.json +290 -0
  13. package/docs/mcp-schemas/delete_project.json +20 -0
  14. package/docs/mcp-schemas/edit_screens.json +46 -0
  15. package/docs/mcp-schemas/generate_screen_from_text.json +242 -0
  16. package/docs/mcp-schemas/generate_variants.json +77 -0
  17. package/docs/mcp-schemas/get_project.json +137 -0
  18. package/docs/mcp-schemas/get_screen.json +92 -0
  19. package/docs/mcp-schemas/list_design_systems.json +32 -0
  20. package/docs/mcp-schemas/list_projects.json +136 -0
  21. package/docs/mcp-schemas/list_screens.json +56 -0
  22. package/docs/mcp-schemas/update_design_system.json +32 -0
  23. package/docs/mcp-schemas/upload_screens_from_images.json +52 -0
  24. package/docs/prd-to-stitch-workflow.md +137 -0
  25. package/docs/skills-index.md +108 -0
  26. package/docs/tailwind-reference.md +207 -0
  27. package/package.json +41 -0
  28. package/skills/stitch-a11y/SKILL.md +428 -0
  29. package/skills/stitch-a11y/resources/audit-checklist.md +102 -0
  30. package/skills/stitch-animate/SKILL.md +371 -0
  31. package/skills/stitch-animate/resources/animation-patterns.md +248 -0
  32. package/skills/stitch-design-md/SKILL.md +215 -0
  33. package/skills/stitch-design-md/examples/DESIGN.md +54 -0
  34. package/skills/stitch-design-md/examples/usage.md +67 -0
  35. package/skills/stitch-design-md/scripts/fetch-stitch.sh +35 -0
  36. package/skills/stitch-design-system/SKILL.md +314 -0
  37. package/skills/stitch-design-system/resources/tokens-template.css +237 -0
  38. package/skills/stitch-html-components/SKILL.md +344 -0
  39. package/skills/stitch-html-components/resources/architecture-checklist.md +74 -0
  40. package/skills/stitch-html-components/scripts/fetch-stitch.sh +45 -0
  41. package/skills/stitch-loop/SKILL.md +183 -0
  42. package/skills/stitch-loop/examples/SITE.md +39 -0
  43. package/skills/stitch-loop/examples/next-prompt.md +24 -0
  44. package/skills/stitch-loop/examples/usage.md +77 -0
  45. package/skills/stitch-mcp-apply-design-system/SKILL.md +82 -0
  46. package/skills/stitch-mcp-create-design-system/SKILL.md +117 -0
  47. package/skills/stitch-mcp-create-project/SKILL.md +77 -0
  48. package/skills/stitch-mcp-delete-project/SKILL.md +62 -0
  49. package/skills/stitch-mcp-edit-screens/SKILL.md +121 -0
  50. package/skills/stitch-mcp-generate-screen-from-text/SKILL.md +102 -0
  51. package/skills/stitch-mcp-generate-screen-from-text/examples/desktop.md +53 -0
  52. package/skills/stitch-mcp-generate-screen-from-text/examples/mobile.md +71 -0
  53. package/skills/stitch-mcp-generate-variants/SKILL.md +124 -0
  54. package/skills/stitch-mcp-get-project/SKILL.md +67 -0
  55. package/skills/stitch-mcp-get-screen/SKILL.md +117 -0
  56. package/skills/stitch-mcp-get-screen/scripts/fetch-stitch.sh +35 -0
  57. package/skills/stitch-mcp-list-design-systems/SKILL.md +84 -0
  58. package/skills/stitch-mcp-list-projects/SKILL.md +77 -0
  59. package/skills/stitch-mcp-list-screens/SKILL.md +69 -0
  60. package/skills/stitch-mcp-update-design-system/SKILL.md +82 -0
  61. package/skills/stitch-mcp-upload-screens-from-images/SKILL.md +95 -0
  62. package/skills/stitch-mcp-upload-screens-from-images/scripts/encode-image.sh +43 -0
  63. package/skills/stitch-nextjs-components/SKILL.md +181 -0
  64. package/skills/stitch-nextjs-components/resources/architecture-checklist.md +65 -0
  65. package/skills/stitch-nextjs-components/resources/component-template.tsx +101 -0
  66. package/skills/stitch-nextjs-components/scripts/fetch-stitch.sh +45 -0
  67. package/skills/stitch-orchestrator/SKILL.md +337 -0
  68. package/skills/stitch-orchestrator/examples/workflow.md +173 -0
  69. package/skills/stitch-react-components/SKILL.md +236 -0
  70. package/skills/stitch-react-components/references/tailwind-to-react.md +117 -0
  71. package/skills/stitch-react-components/resources/architecture-checklist.md +34 -0
  72. package/skills/stitch-react-components/resources/component-template.tsx +35 -0
  73. package/skills/stitch-react-components/scripts/fetch-stitch.sh +35 -0
  74. package/skills/stitch-react-native-components/SKILL.md +333 -0
  75. package/skills/stitch-react-native-components/resources/architecture-checklist.md +74 -0
  76. package/skills/stitch-react-native-components/resources/component-template.tsx +104 -0
  77. package/skills/stitch-react-native-components/scripts/fetch-stitch.sh +45 -0
  78. package/skills/stitch-remotion/SKILL.md +280 -0
  79. package/skills/stitch-setup/SKILL.md +183 -0
  80. package/skills/stitch-shadcn-ui/SKILL.md +255 -0
  81. package/skills/stitch-skill-creator/SKILL.md +257 -0
  82. package/skills/stitch-skill-creator/references/output-patterns.md +71 -0
  83. package/skills/stitch-skill-creator/scripts/init_stitch_skill.py +229 -0
  84. package/skills/stitch-svelte-components/SKILL.md +282 -0
  85. package/skills/stitch-svelte-components/resources/architecture-checklist.md +62 -0
  86. package/skills/stitch-svelte-components/resources/component-template.svelte +193 -0
  87. package/skills/stitch-svelte-components/scripts/fetch-stitch.sh +36 -0
  88. package/skills/stitch-swiftui-components/SKILL.md +424 -0
  89. package/skills/stitch-swiftui-components/resources/architecture-checklist.md +83 -0
  90. package/skills/stitch-swiftui-components/resources/component-template.swift +131 -0
  91. package/skills/stitch-swiftui-components/resources/layout-mapping.md +155 -0
  92. package/skills/stitch-swiftui-components/scripts/fetch-stitch.sh +45 -0
  93. package/skills/stitch-ued-guide/SKILL.md +124 -0
  94. package/skills/stitch-ui-design-spec-generator/SKILL.md +115 -0
  95. package/skills/stitch-ui-design-spec-generator/examples/usage.md +79 -0
  96. package/skills/stitch-ui-design-variants/SKILL.md +127 -0
  97. package/skills/stitch-ui-prompt-architect/SKILL.md +196 -0
  98. package/skills/stitch-ui-prompt-architect/references/KEYWORDS.md +170 -0
@@ -0,0 +1,255 @@
1
+ ---
2
+ name: stitch-shadcn-ui
3
+ description: Integrates shadcn/ui into React apps generated from Stitch designs. Component discovery and installation, token alignment with Stitch design system, customization patterns, and blocks (auth, dashboard, sidebar). Use with stitch-react-components or stitch-nextjs-components.
4
+ allowed-tools:
5
+ - "shadcn*:*"
6
+ - "mcp_shadcn*"
7
+ - "Bash"
8
+ - "Read"
9
+ - "Write"
10
+ ---
11
+
12
+ # shadcn/ui Integration
13
+
14
+ **Constraint:** Use when the user asks about shadcn/ui, or wants to add shadcn components to a Stitch-generated React app.
15
+
16
+ You are a frontend engineer specializing in shadcn/ui — reusable, accessible, customizable components built on Radix UI (or Base UI) and Tailwind CSS. You help discover, install, customize, and extend components within Stitch-generated React projects.
17
+
18
+ ## What shadcn/ui is (and isn't)
19
+
20
+ shadcn/ui is **not a library** — components are **copied into your project**:
21
+
22
+ - Code lives in `src/components/ui/` — you own it fully
23
+ - No version lock-in — update components on your schedule
24
+ - Full customization — modify styles, behavior, and structure
25
+ - No extra bundle size — only the components you add are included
26
+
27
+ Components are built on **Radix UI** primitives: accessible by default, keyboard navigable, ARIA compliant.
28
+
29
+ ## Prerequisites
30
+
31
+ - React app (Vite or Next.js) with Tailwind CSS
32
+ - Ideally: `stitch-react-components` or `stitch-nextjs-components` has already converted the Stitch design
33
+
34
+ ## Step 1: Initialize shadcn/ui
35
+
36
+ ### New project
37
+
38
+ ```bash
39
+ npx shadcn@latest init
40
+ ```
41
+
42
+ Follow the prompts:
43
+ - **Style:** `default` (rounded, clean) or `new-york` (sharp, minimal)
44
+ - **Base color:** `slate` (cool), `zinc` (neutral), `stone` (warm)
45
+ - **CSS variables:** Yes (required for Stitch token alignment)
46
+
47
+ ### Existing project
48
+
49
+ ```bash
50
+ npx shadcn@latest init
51
+ ```
52
+
53
+ This creates `components.json` with your project configuration.
54
+
55
+ ---
56
+
57
+ ## Step 2: Align tokens with Stitch design system
58
+
59
+ After running `stitch-design-system`, you'll have `design-tokens.css` with the Stitch color palette. Map these to shadcn's CSS variable format in `globals.css`:
60
+
61
+ ```css
62
+ /* globals.css — map Stitch tokens to shadcn's variable names */
63
+ :root {
64
+ --background: [from --color-background];
65
+ --foreground: [from --color-text];
66
+ --card: [from --color-surface];
67
+ --card-foreground: [from --color-text];
68
+ --primary: [from --color-primary];
69
+ --primary-foreground: [from --color-primaryFg];
70
+ --secondary: [from --color-surface];
71
+ --secondary-foreground: [from --color-text];
72
+ --muted: [from --color-surface];
73
+ --muted-foreground: [from --color-textMuted];
74
+ --border: [from --color-border];
75
+ --ring: [from --color-primary];
76
+ --radius: 0.5rem; /* match Stitch's border-radius scale */
77
+ }
78
+
79
+ .dark {
80
+ /* Same mapping from dark token values */
81
+ --background: [dark --color-background];
82
+ /* ... */
83
+ }
84
+ ```
85
+
86
+ ---
87
+
88
+ ## Step 3: Discover and install components
89
+
90
+ ### Browse components
91
+
92
+ Use shadcn MCP `list_components` if available, or browse https://ui.shadcn.com/docs/components
93
+
94
+ ### Install individual components
95
+
96
+ ```bash
97
+ npx shadcn@latest add button
98
+ npx shadcn@latest add card
99
+ npx shadcn@latest add input
100
+ npx shadcn@latest add dialog
101
+ npx shadcn@latest add dropdown-menu
102
+ npx shadcn@latest add table
103
+ npx shadcn@latest add select
104
+ npx shadcn@latest add badge
105
+ npx shadcn@latest add avatar
106
+ npx shadcn@latest add tooltip
107
+ ```
108
+
109
+ ### Install a full block (auth, dashboard, etc.)
110
+
111
+ shadcn provides pre-built blocks:
112
+
113
+ ```bash
114
+ # List available blocks (if MCP available)
115
+ # OR browse: https://ui.shadcn.com/blocks
116
+
117
+ npx shadcn@latest add [block-name]
118
+ ```
119
+
120
+ Common blocks: `login-01`, `dashboard-01`, `sidebar-01`, `products-01`, `calendar-01`
121
+
122
+ ---
123
+
124
+ ## Step 4: Replace Stitch HTML elements with shadcn components
125
+
126
+ | Stitch HTML element | Replace with shadcn |
127
+ |---------------------|---------------------|
128
+ | `<button>` primary | `<Button>` with default variant |
129
+ | `<button>` secondary | `<Button variant="outline">` |
130
+ | `<button>` ghost | `<Button variant="ghost">` |
131
+ | `<button>` destructive | `<Button variant="destructive">` |
132
+ | Card/panel container | `<Card><CardHeader><CardContent>` |
133
+ | `<input type="text">` | `<Input>` |
134
+ | `<input type="password">` | `<Input type="password">` |
135
+ | `<select>` | `<Select><SelectTrigger><SelectContent>` |
136
+ | Overlay/popup | `<Dialog><DialogContent>` |
137
+ | Context menu | `<DropdownMenu>` |
138
+ | Notification badge | `<Badge>` |
139
+ | User avatar | `<Avatar><AvatarImage><AvatarFallback>` |
140
+ | Data table | `<Table><TableHeader><TableBody>` |
141
+ | Navigation tabs | `<Tabs><TabsList><TabsContent>` |
142
+ | Alert/banner | `<Alert><AlertDescription>` |
143
+
144
+ ---
145
+
146
+ ## Step 5: Using the `cn()` utility
147
+
148
+ All shadcn components use `cn()` (clsx + tailwind-merge) for class merging. Keep it in `lib/utils.ts`:
149
+
150
+ ```ts
151
+ // src/lib/utils.ts
152
+ import { type ClassValue, clsx } from 'clsx'
153
+ import { twMerge } from 'tailwind-merge'
154
+
155
+ export function cn(...inputs: ClassValue[]) {
156
+ return twMerge(clsx(inputs))
157
+ }
158
+ ```
159
+
160
+ Use it when combining Stitch design token classes with shadcn component classes:
161
+
162
+ ```tsx
163
+ <Button
164
+ className={cn(
165
+ "w-full", // Stitch layout
166
+ isLoading && "opacity-50" // Conditional state
167
+ )}
168
+ style={{ backgroundColor: theme.primary }} // Stitch token
169
+ >
170
+ Sign In
171
+ </Button>
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Customization patterns
177
+
178
+ ### Extend a component variant
179
+
180
+ ```tsx
181
+ // src/components/ui/button.tsx (after npx shadcn add button)
182
+ // Add a new variant in the cva() definition:
183
+ const buttonVariants = cva("...", {
184
+ variants: {
185
+ variant: {
186
+ default: "...",
187
+ outline: "...",
188
+ brand: "bg-[--color-primary] text-[--color-primaryFg] hover:opacity-90", // ← add this
189
+ },
190
+ },
191
+ })
192
+ ```
193
+
194
+ ### Wrap a component with project-specific props
195
+
196
+ ```tsx
197
+ // src/components/PrimaryButton.tsx
198
+ // Wrap (don't modify) the shadcn Button for project-specific defaults
199
+ import { Button, type ButtonProps } from '@/components/ui/button'
200
+
201
+ export function PrimaryButton({ children, ...props }: ButtonProps) {
202
+ return (
203
+ <Button variant="default" className="w-full" {...props}>
204
+ {children}
205
+ </Button>
206
+ )
207
+ }
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Accessibility
213
+
214
+ Radix UI primitives handle most accessibility automatically:
215
+ - Keyboard navigation (Tab, Enter, Escape, Arrow keys)
216
+ - ARIA attributes (`role`, `aria-expanded`, `aria-haspopup`)
217
+ - Focus management (trapping focus in dialogs, restoring focus on close)
218
+
219
+ When customizing, **do not remove** ARIA attributes or keyboard handlers from the base components. Add to them, don't replace them.
220
+
221
+ ---
222
+
223
+ ## Integration with Stitch workflow
224
+
225
+ The typical flow:
226
+
227
+ ```
228
+ stitch-mcp-get-screen → download HTML
229
+ stitch-design-system → extract tokens → design-tokens.css
230
+ stitch-react-components or stitch-nextjs-components → base components
231
+ stitch-shadcn-ui → replace raw HTML elements with shadcn components
232
+ → align globals.css with design-tokens.css
233
+ stitch-animate → add transitions to shadcn interactive elements
234
+ stitch-a11y → verify accessibility (shadcn handles most of it)
235
+ ```
236
+
237
+ ---
238
+
239
+ ## Troubleshooting
240
+
241
+ | Issue | Fix |
242
+ |-------|-----|
243
+ | Import path errors (`@/components/ui/...`) | Check `tsconfig.json` and `vite.config.ts` have `@/*` → `./src/*` alias |
244
+ | Colors not matching Stitch design | Map Stitch tokens to shadcn's CSS variables in `globals.css` |
245
+ | Dark mode not working | Ensure `ThemeProvider` (from `next-themes`) wraps the app, or toggle `.dark` class on `<html>` |
246
+ | Missing peer deps | Run `npx shadcn@latest add [component]` again — it auto-installs deps |
247
+ | `cn()` not found | Run `npx shadcn@latest init` to create `lib/utils.ts` |
248
+
249
+ ## References
250
+
251
+ - shadcn/ui docs: https://ui.shadcn.com/docs
252
+ - Radix UI: https://www.radix-ui.com/
253
+ - `stitch-react-components` — convert Stitch design to base React components first
254
+ - `stitch-nextjs-components` — if using Next.js App Router
255
+ - `stitch-design-system` — extract Stitch tokens before aligning with shadcn
@@ -0,0 +1,257 @@
1
+ ---
2
+ name: stitch-skill-creator
3
+ description: Meta-skill for creating new stitch-kit skills. Enforces naming conventions, SKILL.md structure, examples format, and the Design-First SOP. Use when adding new framework support, a new domain-specific prompt architect, or any new capability to the stitch-kit plugin.
4
+ allowed-tools:
5
+ - "Bash"
6
+ - "Read"
7
+ - "Write"
8
+ ---
9
+
10
+ # Stitch Skill Creator
11
+
12
+ A factory for creating new **stitch-kit skills**. Enforces standard structure, naming conventions, and the plugin's architectural patterns.
13
+
14
+ ## When to use this skill
15
+
16
+ - Adding support for a new framework (e.g. "Astro", "Qwik", "Flutter")
17
+ - Creating a domain-specific prompt architect (e.g. `stitch-ui-ecommerce-architect`)
18
+ - Adding a new quality tool (e.g. `stitch-performance`, `stitch-seo`)
19
+ - Any time you need a new SKILL.md that integrates with the stitch-kit ecosystem
20
+
21
+ ---
22
+
23
+ ## Naming conventions
24
+
25
+ | Skill type | Name pattern | Example |
26
+ |------------|-------------|---------|
27
+ | Framework conversion | `stitch-[framework]-components` | `stitch-astro-components` |
28
+ | Domain prompt architect | `stitch-ui-[domain]-architect` | `stitch-ui-ecommerce-architect` |
29
+ | MCP wrapper | `stitch-mcp-[tool-name]` | `stitch-mcp-edit-screen` |
30
+ | Quality / analysis tool | `stitch-[capability]` | `stitch-performance` |
31
+ | Meta / utility | `stitch-[name]` | `stitch-setup` |
32
+
33
+ **Rules:**
34
+ - Always kebab-case
35
+ - Always starts with `stitch-`
36
+ - Framework conversion skills end with `-components`
37
+ - MCP wrappers follow `stitch-mcp-{snake_case_tool → kebab}` from `docs/mcp-naming-convention.md`
38
+
39
+ ---
40
+
41
+ ## Required directory structure
42
+
43
+ ```
44
+ skills/[skill-name]/
45
+ ├── SKILL.md ← Required: frontmatter + workflow (keep under 500 lines)
46
+ ├── examples/
47
+ │ └── usage.md ← Required: 2+ worked examples
48
+ ├── resources/ ← Optional: templates, checklists, reference tables
49
+ │ ├── component-template.[ext]
50
+ │ └── architecture-checklist.md
51
+ ├── scripts/ ← Optional: bash scripts
52
+ │ └── fetch-stitch.sh ← Copy from stitch-mcp-get-screen/scripts/ if needed
53
+ └── references/ ← Optional: style guides, contracts, long reference docs
54
+ ```
55
+
56
+ ---
57
+
58
+ ## SKILL.md template
59
+
60
+ ```markdown
61
+ ---
62
+ name: stitch-[skill-name]
63
+ description: [One clear sentence — when to use this skill and what it does. This is used for routing by the orchestrator and for marketplace display.]
64
+ allowed-tools:
65
+ - "stitch*:*" # Include if skill calls Stitch MCP tools
66
+ - "Bash" # Include if skill runs shell commands
67
+ - "Read" # Usually yes
68
+ - "Write" # Usually yes
69
+ ---
70
+
71
+ # Stitch → [Target] [Type]
72
+
73
+ **Constraint:** Only use this skill when the user explicitly mentions "Stitch" [and any additional trigger condition].
74
+
75
+ [One sentence explaining what this skill does and who the agent "is" while using it.]
76
+
77
+ ## When to use this skill vs. similar skills
78
+
79
+ [Table comparing this skill to its nearest alternatives — help the orchestrator route correctly]
80
+
81
+ ## Prerequisites
82
+
83
+ [What the user/environment needs before this skill can run]
84
+
85
+ ## Step 1: Retrieve the design
86
+
87
+ 1. Run `list_tools` → find Stitch MCP prefix
88
+ 2. Call `[prefix]:get_screen` with numeric `projectId` and `screenId`
89
+ 3. Download HTML: `bash scripts/fetch-stitch.sh "[htmlCode.downloadUrl]" "temp/source.html"`
90
+
91
+ ## Step 2: [Core conversion / workflow]
92
+
93
+ [The main logic of this skill]
94
+
95
+ ## Step N: Output
96
+
97
+ [What the skill produces — files, code, commands]
98
+
99
+ ## Troubleshooting
100
+
101
+ | Issue | Fix |
102
+ |-------|-----|
103
+
104
+ ## References
105
+
106
+ - `resources/component-template.[ext]` — [description]
107
+ - `resources/architecture-checklist.md` — Pre-ship checklist
108
+ - `scripts/fetch-stitch.sh` — Reliable GCS HTML downloader
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Examples template (examples/usage.md)
114
+
115
+ ```markdown
116
+ # [Skill Name] — Usage Examples
117
+
118
+ ## Example 1: [Scenario title]
119
+
120
+ **User:** "[Specific user request]"
121
+
122
+ **Skill activates because:** [Why this triggers the skill]
123
+
124
+ **What the skill does:**
125
+ 1. [Step 1]
126
+ 2. [Step 2]
127
+ 3. ...
128
+
129
+ **Output:**
130
+ [Description or code snippet of what gets generated]
131
+
132
+ ---
133
+
134
+ ## Example 2: [Different scenario]
135
+
136
+ [Same format]
137
+ ```
138
+
139
+ ---
140
+
141
+ ## Architecture checklist template (resources/architecture-checklist.md)
142
+
143
+ Adapt this to the target platform/framework:
144
+
145
+ ```markdown
146
+ # [Framework] Components — Architecture Checklist
147
+
148
+ Run through this checklist before marking the task complete.
149
+
150
+ ## Structure
151
+ - [ ] [Project structure check]
152
+ - [ ] Components are in separate files
153
+
154
+ ## [Framework-specific category]
155
+ - [ ] [Framework-specific check]
156
+
157
+ ## TypeScript / Types
158
+ - [ ] No `any` types
159
+ - [ ] All props have Readonly<> wrapper
160
+
161
+ ## Dark mode
162
+ - [ ] Theme tokens used everywhere — no hardcoded colors
163
+
164
+ ## Accessibility
165
+ - [ ] All interactive elements are keyboard accessible
166
+ - [ ] Images have descriptive alt text
167
+
168
+ ## Performance
169
+ - [ ] No console.log in production code
170
+ ```
171
+
172
+ ---
173
+
174
+ ## Creating a framework conversion skill
175
+
176
+ For a new framework (e.g. Astro):
177
+
178
+ ### 1. Create the directory
179
+
180
+ ```bash
181
+ mkdir -p skills/stitch-astro-components/resources
182
+ mkdir -p skills/stitch-astro-components/examples
183
+ mkdir -p skills/stitch-astro-components/scripts
184
+ ```
185
+
186
+ ### 2. Copy the fetch script
187
+
188
+ ```bash
189
+ cp skills/stitch-mcp-get-screen/scripts/fetch-stitch.sh \
190
+ skills/stitch-astro-components/scripts/fetch-stitch.sh
191
+ ```
192
+
193
+ ### 3. Write SKILL.md
194
+
195
+ Use the template above. Key sections for framework skills:
196
+ - **When to use vs. similar skills** — distinguish from Next.js, Svelte, etc.
197
+ - **Project structure** — show the file layout
198
+ - **HTML → Framework mapping** — table of HTML/CSS patterns → framework equivalents
199
+ - **Design tokens** — how to handle Stitch's CSS variables in this framework
200
+ - **Dark mode** — how this framework handles it
201
+ - **Accessibility** — framework-specific ARIA patterns
202
+
203
+ ### 4. Create component template
204
+
205
+ Write `resources/component-template.[ext]` — a working boilerplate component that demonstrates:
206
+ - Props interface
207
+ - Theme token usage
208
+ - Dark mode
209
+ - Accessibility attributes
210
+ - Conditional rendering patterns
211
+
212
+ ### 5. Create architecture checklist
213
+
214
+ Write `resources/architecture-checklist.md` with framework-specific checks.
215
+
216
+ ### 6. Write examples
217
+
218
+ At least 2 examples in `examples/usage.md`.
219
+
220
+ ### 7. Register in marketplace.json
221
+
222
+ Add to the appropriate plugin group in `.claude-plugin/marketplace.json`:
223
+ - Web frameworks → `stitch-frameworks`
224
+ - Mobile → `stitch-mobile`
225
+ - New category → create a new group
226
+
227
+ ### 8. Update docs/skills-index.md
228
+
229
+ Add the new skill to the table.
230
+
231
+ ### 9. Update README.md
232
+
233
+ Add to the appropriate layer table.
234
+
235
+ ---
236
+
237
+ ## Creating a domain-specific prompt architect
238
+
239
+ For a new domain (e.g. e-commerce):
240
+
241
+ The skill name: `stitch-ui-ecommerce-architect`
242
+
243
+ This skill **does not generate or execute** — it produces a structured Stitch prompt. Pattern:
244
+
245
+ 1. Identify domain-specific components (product card, cart, checkout flow, review stars, etc.)
246
+ 2. Define the `[Context] [Layout] [Components]` prompt template for this domain
247
+ 3. Reference `stitch-ued-guide` for visual vocabulary
248
+ 4. Output is: a ready-to-use prompt for `stitch-mcp-generate-screen-from-text`
249
+
250
+ ---
251
+
252
+ ## References
253
+
254
+ - `docs/skills-index.md` — existing skills (check before creating duplicates)
255
+ - `docs/mcp-naming-convention.md` — MCP tool naming rules
256
+ - `stitch-nextjs-components/SKILL.md` — reference for a well-structured framework conversion skill
257
+ - `stitch-swiftui-components/SKILL.md` — reference for a mobile platform skill
@@ -0,0 +1,71 @@
1
+ # Output Patterns
2
+
3
+ Consistency templates for newly created Stitch skills.
4
+
5
+ ---
6
+
7
+ ## Domain prompt architect output (STRICT)
8
+
9
+ A `stitch-ui-[domain]-architect` skill must return exactly one code block and no extra prose.
10
+
11
+ Required structure:
12
+
13
+ ```text
14
+ [Context]
15
+ ...
16
+
17
+ [Layout]
18
+ ...
19
+
20
+ [Components]
21
+ ...
22
+ ```
23
+
24
+ Hard requirements:
25
+ - Do not call any MCP tool — prompt assembly only, no execution
26
+ - Do not output multiple alternatives unless the user explicitly asks for variants
27
+ - Preserve the section labels exactly: `[Context]`, `[Layout]`, `[Components]`
28
+
29
+ ---
30
+
31
+ ## Skill creator output (recommended)
32
+
33
+ When `stitch-skill-creator` scaffolds a new skill, report artifacts concisely:
34
+
35
+ ```markdown
36
+ # Stitch Skill Created
37
+
38
+ ## Path
39
+ - skills/stitch-[name]
40
+
41
+ ## Files
42
+ - SKILL.md
43
+ - examples/usage.md
44
+ - resources/architecture-checklist.md (if framework conversion)
45
+ - scripts/fetch-stitch.sh (if needs HTML download)
46
+
47
+ ## Next steps
48
+ 1. Fill domain-specific details in SKILL.md (step-by-step workflow, routing table, troubleshooting).
49
+ 2. Replace placeholder examples in `examples/usage.md` with real input/output pairs.
50
+ 3. Add to `.claude-plugin/marketplace.json` in the appropriate plugin group.
51
+ 4. Add row to `docs/skills-index.md`.
52
+ 5. Add row to `README.md` in the appropriate layer table.
53
+ ```
54
+
55
+ ---
56
+
57
+ ## MCP wrapper skill output
58
+
59
+ `stitch-mcp-*` skills report the tool call result directly. No reformatting needed — just surface the relevant IDs and URLs clearly so downstream skills can use them.
60
+
61
+ Minimum output:
62
+
63
+ ```markdown
64
+ ## [Tool Name] complete
65
+
66
+ - **Project ID:** [numeric] ← use this for generate_screen_from_text and get_screen
67
+ - **Project path:** projects/[numeric] ← use this for get_project and list_screens
68
+ - **Screen ID:** [hex] ← use this for get_screen
69
+ - **HTML:** [downloadUrl]
70
+ - **Screenshot:** [downloadUrl]
71
+ ```