create-claude-workspace 1.1.33 → 1.1.35
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/dist/template/.claude/agents/ui-engineer.md +1 -1
- package/dist/template/.claude/profiles/angular.md +16 -14
- package/dist/template/.claude/profiles/react.md +17 -14
- package/dist/template/.claude/profiles/svelte.md +16 -13
- package/dist/template/.claude/profiles/vue.md +16 -13
- package/package.json +1 -1
|
@@ -101,7 +101,7 @@ Write clean, elegant code that is easy to test and reason about:
|
|
|
101
101
|
- If Figma MCP is available and design exists: implement from Figma with 1:1 fidelity
|
|
102
102
|
- If UX.md exists: follow its design tokens, typography, colors, breakpoints
|
|
103
103
|
- If neither: use `/frontend-design` skill for high-quality UI generation
|
|
104
|
-
- Always use @themecraft
|
|
104
|
+
- Always use @themecraft generated SCSS variables (`colors.$token`, `sizes.$token`, `typo.level()`) — no hardcoded color/size values, no direct `color-var()`/`size-var()` calls
|
|
105
105
|
|
|
106
106
|
## Output Format
|
|
107
107
|
|
|
@@ -157,25 +157,29 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
157
157
|
4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
|
|
158
158
|
5. `@themecraft/angular` → `provideTheme()` for runtime switching, `provideThemeServer()` for SSR (no FOUC)
|
|
159
159
|
|
|
160
|
-
**SCSS
|
|
160
|
+
**Component SCSS** — import generated variables, NEVER call `color-var()`/`size-var()` directly:
|
|
161
161
|
```scss
|
|
162
|
+
@use 'generated/theme/colors' as colors;
|
|
163
|
+
@use 'generated/theme/sizes' as sizes;
|
|
164
|
+
@use 'generated/theme/typography' as typo;
|
|
162
165
|
@use '@themecraft/core/theming' as theming;
|
|
163
166
|
|
|
164
167
|
.card {
|
|
165
|
-
background:
|
|
166
|
-
color:
|
|
167
|
-
padding:
|
|
168
|
-
@include
|
|
168
|
+
background: colors.$surface;
|
|
169
|
+
color: colors.$on-surface;
|
|
170
|
+
padding: sizes.$card-padding;
|
|
171
|
+
@include typo.body-primary();
|
|
169
172
|
@include theming.theme-transition(); // smooth theme switch
|
|
170
173
|
}
|
|
171
174
|
```
|
|
172
175
|
|
|
173
|
-
**
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
- `
|
|
177
|
-
-
|
|
178
|
-
|
|
176
|
+
**How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
|
|
177
|
+
|
|
178
|
+
**Token source (pick one):**
|
|
179
|
+
- **With Figma:** `npx themecraft figma-sync` pulls design variables into `tokens.json`, then `npx themecraft generate`
|
|
180
|
+
- **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
|
|
181
|
+
|
|
182
|
+
Either way, the result is the same: typed SCSS files in `generated/theme/` ready to import.
|
|
179
183
|
|
|
180
184
|
**Theme definition** (`themes/light.scss`):
|
|
181
185
|
```scss
|
|
@@ -226,8 +230,6 @@ switchTheme(name: string) { this.#theme.load(name); }
|
|
|
226
230
|
|
|
227
231
|
**PostCSS optimization** — add `@themecraft/core/postcss` plugin to remove unused token declarations from compiled CSS.
|
|
228
232
|
|
|
229
|
-
**Figma sync** (optional): `npx themecraft figma-sync` pulls design variables from Figma API into `tokens.json`.
|
|
230
|
-
|
|
231
233
|
## Atomic UI Component Library
|
|
232
234
|
|
|
233
235
|
Atomic design: atoms -> molecules -> organisms -> templates -> pages.
|
|
@@ -298,7 +300,7 @@ When reviewing Angular code, check:
|
|
|
298
300
|
- Subscription cleanup (DestroyRef/takeUntilDestroyed)
|
|
299
301
|
- Resource disposal (ImageBitmap.close(), stream.stop(), BroadcastChannel.close())
|
|
300
302
|
- No memory leaks in effects or event listeners
|
|
301
|
-
- Theme compliance:
|
|
303
|
+
- Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
|
|
302
304
|
- Lazy loading via loadComponent/loadChildren, no eager page imports
|
|
303
305
|
- @defer for heavy below-fold components
|
|
304
306
|
- Naming: PascalCase components, lib- selectors, kebab-case files
|
|
@@ -167,24 +167,29 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
167
167
|
4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
|
|
168
168
|
5. `ThemeManager` (from `@themecraft/core/runtime`) — runtime theme switching, storage persistence, FOUC prevention
|
|
169
169
|
|
|
170
|
-
**SCSS
|
|
170
|
+
**Component SCSS** (`.module.scss`) — import generated variables, NEVER call `color-var()`/`size-var()` directly:
|
|
171
171
|
```scss
|
|
172
|
+
@use 'generated/theme/colors' as colors;
|
|
173
|
+
@use 'generated/theme/sizes' as sizes;
|
|
174
|
+
@use 'generated/theme/typography' as typo;
|
|
172
175
|
@use '@themecraft/core/theming' as theming;
|
|
173
176
|
|
|
174
177
|
.card {
|
|
175
|
-
background:
|
|
176
|
-
color:
|
|
177
|
-
padding:
|
|
178
|
-
@include
|
|
178
|
+
background: colors.$surface;
|
|
179
|
+
color: colors.$on-surface;
|
|
180
|
+
padding: sizes.$card-padding;
|
|
181
|
+
@include typo.body-primary();
|
|
179
182
|
@include theming.theme-transition();
|
|
180
183
|
}
|
|
181
184
|
```
|
|
182
185
|
|
|
183
|
-
**
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
-
|
|
187
|
-
- `
|
|
186
|
+
**How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
|
|
187
|
+
|
|
188
|
+
**Token source (pick one):**
|
|
189
|
+
- **With Figma:** `npx themecraft figma-sync` pulls design variables into `tokens.json`, then `npx themecraft generate`
|
|
190
|
+
- **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
|
|
191
|
+
|
|
192
|
+
Either way, the result is the same: typed SCSS files in `generated/theme/` ready to import.
|
|
188
193
|
|
|
189
194
|
**Runtime setup** (in layout or `_app.tsx`):
|
|
190
195
|
```typescript
|
|
@@ -211,12 +216,10 @@ const themeManager = new ThemeManager({
|
|
|
211
216
|
|
|
212
217
|
**PostCSS optimization** — add `@themecraft/core/postcss` plugin to remove unused token declarations.
|
|
213
218
|
|
|
214
|
-
**Figma sync** (optional): `npx themecraft figma-sync` pulls design variables from Figma API into `tokens.json`.
|
|
215
|
-
|
|
216
219
|
Component style usage:
|
|
217
220
|
```tsx
|
|
218
221
|
import styles from './user-card.module.scss';
|
|
219
|
-
//
|
|
222
|
+
// generated SCSS variables compile to CSS custom properties
|
|
220
223
|
```
|
|
221
224
|
|
|
222
225
|
## Atomic UI Component Library
|
|
@@ -290,7 +293,7 @@ When reviewing React code, check:
|
|
|
290
293
|
- SSR safety: no direct `window`/`document`/`navigator` access in Server Components, correct `'use client'` boundaries
|
|
291
294
|
- Server/client separation: Flag WARN if a module mixes server and browser logic without clear boundaries
|
|
292
295
|
- No memory leaks in effects, event listeners, or subscriptions
|
|
293
|
-
- Theme compliance:
|
|
296
|
+
- Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
|
|
294
297
|
- Code splitting: `React.lazy` + `Suspense` for heavy routes/components, no eager imports of page-level components
|
|
295
298
|
- Dynamic imports for heavy third-party libraries
|
|
296
299
|
- Naming: PascalCase components, camelCase hooks, kebab-case files
|
|
@@ -168,26 +168,31 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
168
168
|
4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
|
|
169
169
|
5. `ThemeManager` (from `@themecraft/core/runtime`) — runtime switching, storage, FOUC prevention
|
|
170
170
|
|
|
171
|
-
**SCSS
|
|
171
|
+
**Component SCSS** — import generated variables, NEVER call `color-var()`/`size-var()` directly:
|
|
172
172
|
```svelte
|
|
173
173
|
<style lang="scss">
|
|
174
|
+
@use 'generated/theme/colors' as colors;
|
|
175
|
+
@use 'generated/theme/sizes' as sizes;
|
|
176
|
+
@use 'generated/theme/typography' as typo;
|
|
174
177
|
@use '@themecraft/core/theming' as theming;
|
|
175
178
|
|
|
176
179
|
.card {
|
|
177
|
-
background:
|
|
178
|
-
color:
|
|
179
|
-
padding:
|
|
180
|
-
@include
|
|
180
|
+
background: colors.$surface;
|
|
181
|
+
color: colors.$on-surface;
|
|
182
|
+
padding: sizes.$card-padding;
|
|
183
|
+
@include typo.body-primary();
|
|
181
184
|
@include theming.theme-transition();
|
|
182
185
|
}
|
|
183
186
|
</style>
|
|
184
187
|
```
|
|
185
188
|
|
|
186
|
-
**
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
-
|
|
190
|
-
- `
|
|
189
|
+
**How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
|
|
190
|
+
|
|
191
|
+
**Token source (pick one):**
|
|
192
|
+
- **With Figma:** `npx themecraft figma-sync` pulls design variables into `tokens.json`, then `npx themecraft generate`
|
|
193
|
+
- **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
|
|
194
|
+
|
|
195
|
+
Either way, the result is the same: typed SCSS files in `generated/theme/` ready to import.
|
|
191
196
|
|
|
192
197
|
**Runtime setup** (in `+layout.svelte` or `hooks.server.ts`):
|
|
193
198
|
```typescript
|
|
@@ -211,8 +216,6 @@ Component-scoped styles are the default and preferred approach.
|
|
|
211
216
|
|
|
212
217
|
**PostCSS optimization** — add `@themecraft/core/postcss` plugin to remove unused token declarations.
|
|
213
218
|
|
|
214
|
-
**Figma sync** (optional): `npx themecraft figma-sync` pulls design variables from Figma API into `tokens.json`.
|
|
215
|
-
|
|
216
219
|
## Atomic UI Component Library
|
|
217
220
|
|
|
218
221
|
Atomic design: atoms -> molecules -> organisms -> templates -> pages.
|
|
@@ -294,7 +297,7 @@ When reviewing Svelte code, check:
|
|
|
294
297
|
- Server/client separation: secrets and DB in `+page.server.ts`, not `+page.ts`
|
|
295
298
|
- `$lib/` imports — no deep relative paths (`../../../`)
|
|
296
299
|
- `$lib/server/` for server-only modules — enforced by SvelteKit
|
|
297
|
-
- Theme compliance:
|
|
300
|
+
- Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
|
|
298
301
|
- Lazy loading: routes auto-split, dynamic `import()` for heavy non-route components
|
|
299
302
|
- Accessibility: all Svelte compiler a11y warnings resolved (not suppressed)
|
|
300
303
|
- No `{@html}` without sanitization
|
|
@@ -193,26 +193,31 @@ npx themecraft generate # generates type-safe SCSS from tokens.json
|
|
|
193
193
|
4. `@themecraft/core/themes` → `variables()` mixin emits CSS custom properties at `:root`
|
|
194
194
|
5. `ThemeManager` (from `@themecraft/core/runtime`) — runtime switching, storage, FOUC prevention
|
|
195
195
|
|
|
196
|
-
**SCSS
|
|
196
|
+
**Component SCSS** — import generated variables, NEVER call `color-var()`/`size-var()` directly:
|
|
197
197
|
```vue
|
|
198
198
|
<style scoped lang="scss">
|
|
199
|
+
@use 'generated/theme/colors' as colors;
|
|
200
|
+
@use 'generated/theme/sizes' as sizes;
|
|
201
|
+
@use 'generated/theme/typography' as typo;
|
|
199
202
|
@use '@themecraft/core/theming' as theming;
|
|
200
203
|
|
|
201
204
|
.card {
|
|
202
|
-
background:
|
|
203
|
-
color:
|
|
204
|
-
padding:
|
|
205
|
-
@include
|
|
205
|
+
background: colors.$surface;
|
|
206
|
+
color: colors.$on-surface;
|
|
207
|
+
padding: sizes.$card-padding;
|
|
208
|
+
@include typo.body-primary();
|
|
206
209
|
@include theming.theme-transition();
|
|
207
210
|
}
|
|
208
211
|
</style>
|
|
209
212
|
```
|
|
210
213
|
|
|
211
|
-
**
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
-
|
|
215
|
-
- `
|
|
214
|
+
**How it works:** `npx themecraft generate` reads `tokens.json` and produces typed SCSS files (`generated/theme/colors.scss`, `sizes.scss`, `typography.scss`) that wrap `color-var()`/`size-var()` internally. Components consume these generated variables — never the raw accessor functions.
|
|
215
|
+
|
|
216
|
+
**Token source (pick one):**
|
|
217
|
+
- **With Figma:** `npx themecraft figma-sync` pulls design variables into `tokens.json`, then `npx themecraft generate`
|
|
218
|
+
- **Without Figma:** `npx themecraft init` creates `tokens.json` scaffold → manually define token names (color groups, size groups, typography levels) → `npx themecraft generate`
|
|
219
|
+
|
|
220
|
+
Either way, the result is the same: typed SCSS files in `generated/theme/` ready to import.
|
|
216
221
|
|
|
217
222
|
**Runtime setup** (in `App.vue` or plugin):
|
|
218
223
|
```typescript
|
|
@@ -238,8 +243,6 @@ const themeManager = new ThemeManager({
|
|
|
238
243
|
|
|
239
244
|
**PostCSS optimization** — add `@themecraft/core/postcss` plugin to remove unused token declarations.
|
|
240
245
|
|
|
241
|
-
**Figma sync** (optional): `npx themecraft figma-sync` pulls design variables from Figma API into `tokens.json`.
|
|
242
|
-
|
|
243
246
|
## Atomic UI Component Library
|
|
244
247
|
|
|
245
248
|
Atomic design: atoms -> molecules -> organisms -> templates -> pages.
|
|
@@ -320,7 +323,7 @@ When reviewing Vue code, check:
|
|
|
320
323
|
- SSR safety: no direct `window`/`document`/`navigator` access outside `onMounted` or client guards
|
|
321
324
|
- SSR/Client separation: Flag WARN if a composable mixes server and browser logic
|
|
322
325
|
- `<style scoped>` on all components — no unscoped styles leaking globally
|
|
323
|
-
- Theme compliance:
|
|
326
|
+
- Theme compliance: generated @themecraft SCSS variables — no hardcoded colors/sizes, no direct `color-var()`/`size-var()` calls
|
|
324
327
|
- Lazy loading: `defineAsyncComponent` for heavy components, dynamic imports for routes
|
|
325
328
|
- No `v-html` without sanitization (XSS risk)
|
|
326
329
|
- Props defined with TypeScript types via `defineProps<{ ... }>()` — not runtime-only validation
|