You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Out-of-scope requests**: refuse and orient — domain components (project prefix, composition of `ui-*`) and core services belong to the main thread per `AGENTS.md`; token additions are proposed as a JSON diff + `npm run tokens:build`, applied only after user approval.
20
+
**Out-of-scope requests**: refuse and orient — domain components (project prefix, composition of `ui-*`) and core services belong to the main thread per `AGENTS.md`; token additions are proposed as a JSON diff + `pnpm tokens:build`, applied only after user approval.
21
21
22
22
## Sources of truth (consult, never duplicate)
23
23
@@ -76,7 +76,7 @@ If the verb matches none of these, or the phrasing is ambiguous (“check that
76
76
4. Create/modify the component files, **then** the co-located `.stories.ts` and `.mdx` — both mandatory.
77
77
5. Every color/spacing consumed must exist in `src/styles/src/generated/` — grep the variable name to confirm; cover light AND dark (and the 3 brands).
78
78
6. Update `components-index.md` (check off / add the component).
79
-
7. Verify: `npm run lint` + `npm run build-storybook` (the real AoT typecheck). For visual verification, suggest the `/verify` skill.
79
+
7. Verify: `pnpm lint` + `pnpm build-storybook` (the real AoT typecheck). For visual verification, suggest the `/verify` skill.
80
80
8. Final summary: files created/modified, lint/build status, propagations (new token needed → proposed JSON diff, consumers impacted via a references search).
81
81
82
82
### AUDIT mode — gap report, **zero modification**
@@ -136,14 +136,14 @@ For each component in scope, check:
136
136
2. Risky changes (renaming an exported component, changing a public `input()`/`output()` signature, moving between categories): **propose the diff** and ask for confirmation, listing consumers via a references search.
4.**Always** update `.stories.ts` + `.mdx` when the component changes (API, prop, visible behavior) — and `CHANGELOG.md``[Unreleased]` for user-visible changes.
139
-
5. Final verification: `npm run lint` + `npm run build-storybook`.
139
+
5. Final verification: `pnpm lint` + `pnpm build-storybook`.
140
140
141
141
## Guardrails
142
142
143
143
-**Out of scope**: refuse and orient (domain components, core services, token JSON, Figma).
144
-
-**Missing token**: never invent a variable — propose the addition in `src/design-tokens/*.json` + `npm run tokens:build`, ask first.
144
+
-**Missing token**: never invent a variable — propose the addition in `src/design-tokens/*.json` + `pnpm tokens:build`, ask first.
145
145
-**Doubt about a convention**: cite the source (AGENTS.md section, rule, reference pattern). Otherwise `Grep` the kit (>10 occurrences = de-facto convention; <3 = don't generalize).
146
-
-**Verification**: at minimum `npm run lint` + `npm run build-storybook` after any change; report status. Visual doubts → suggest `/verify`.
146
+
-**Verification**: at minimum `pnpm lint` + `pnpm build-storybook` after any change; report status. Visual doubts → suggest `/verify`.
147
147
-**Never commit** — report the touched files and let the user commit (via `/git-commit`).
Copy file name to clipboardExpand all lines: .claude/skills/generate-ui-component/SKILL.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ Rules:
113
113
114
114
### `///` comments = the theming doc (mandatory)
115
115
116
-
The doc's "Theming" table is **generated** from the `.scss` by `npm run docs:config`
116
+
The doc's "Theming" table is **generated** from the `.scss` by `pnpm docs:config`
117
117
(`scripts/docs.config.mjs` → `storybook/generated/ui-config.json`). So the SCSS comments are
118
118
what write the doc: nothing to copy elsewhere.
119
119
@@ -137,7 +137,7 @@ what write the doc: nothing to copy elsewhere.
137
137
project rebinds the variable.
138
138
- Describe the **role**, not the binding: the "Default (starter)" column and the chain to
139
139
`ui-config` are inferred automatically.
140
-
-**Every** config variable must have its `///` — `npm run docs:config` counts the missing ones
140
+
-**Every** config variable must have its `///` — `pnpm docs:config` counts the missing ones
141
141
(they don't appear in the table).
142
142
-**Exposed custom properties** (override points) are documented with a `///` where the hook
143
143
lives: on its declaration, or on the line reading it with its fallback
@@ -224,9 +224,9 @@ import { ConfigTable } from '<…>/storybook/blocks/config-table';
224
224
225
225
## Verification
226
226
227
-
1.`npx tsc --noEmit -p tsconfig.json` → must pass.
227
+
1.`pnpm exec tsc --noEmit -p tsconfig.json` → must pass.
228
228
2. Compile the SCSS: `node_modules/.bin/sass --load-path=src/styles --no-source-map --quiet <file.scss>` and check the generated selectors/values.
229
-
2bis. `npm run docs:config` → the component must appear, with **0 variables missing a `///`
229
+
2bis. `pnpm docs:config` → the component must appear, with **0 variables missing a `///`
230
230
comment** (the script prints the count), and every line resolved to a token, a map, a list, or
231
231
an accepted literal value.
232
232
3.**Live Storybook** (already running on `:6006`, HMR): via the browser tools, open `iframe.html?id=components-ui-{cat}-ui-{name}--<story>&viewMode=story`, measure (getBoundingClientRect, getComputedStyle), test the interaction (click/keyboard), and take a screenshot. Wait for transitions to settle before measuring.
0 commit comments