@captain_z/zsk-skills 0.1.0 → 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.
- package/README.md +68 -59
- package/bundles.yaml +2 -2
- package/design-handoff/figma-to-code/SKILL.md +7 -7
- package/frontend/nfr-web/SKILL.md +1 -1
- package/frontend/review-frontend/SKILL.md +1 -1
- package/frontend/{css-bem → styling-system}/SKILL.md +14 -8
- package/package.json +1 -1
- package/sdlc/coding/SKILL.md +125 -114
- package/sdlc/design/SKILL.md +144 -201
- package/sdlc/spec/SKILL.md +167 -125
- package/sdlc/verify/SKILL.md +103 -120
- package/design-handoff/.gitkeep +0 -0
- package/frontend/.gitkeep +0 -0
- package/meta/.gitkeep +0 -0
- package/quality/.gitkeep +0 -0
- package/sdlc/.gitkeep +0 -0
- package/system/.gitkeep +0 -0
package/README.md
CHANGED
|
@@ -62,202 +62,211 @@ zsk skill 是 LLM **按需自动触发**的资产:
|
|
|
62
62
|
| `frontend-with-design-handoff` | 31 | frontend-project + Figma 交付 2 |
|
|
63
63
|
| `custom` | 交互 | 通过 `zsk add` 任意多选 |
|
|
64
64
|
|
|
65
|
+
<!-- Auto-generated by tools/catalog.ts — do not edit manually. Total: 46 skills -->
|
|
66
|
+
|
|
67
|
+
<!-- Auto-generated by tools/catalog.ts — do not edit manually. Total: 46 skills -->
|
|
68
|
+
|
|
69
|
+
<!-- Auto-generated by tools/catalog.ts — do not edit manually. Total: 46 skills -->
|
|
70
|
+
|
|
71
|
+
<!-- Auto-generated by tools/catalog.ts — do not edit manually. Total: 46 skills -->
|
|
72
|
+
|
|
65
73
|
## Skill 清单(按领域)
|
|
66
74
|
|
|
67
75
|
> 内容由 `tools/catalog.ts` 从各 SKILL.md frontmatter 生成。重生成:`pnpm catalog`。
|
|
68
76
|
|
|
69
|
-
### `sdlc/` — SDLC · 7 阶段 + 3 变更工作流 + task
|
|
77
|
+
### `sdlc/` — SDLC · 7 阶段 + 3 变更工作流 + task 框架 (17)
|
|
70
78
|
|
|
71
79
|
- **`zsk:proposal`** *[stage 1 · stage · core]*
|
|
72
|
-
|
|
80
|
+
New-change framing (feature / bugfix / refactor) before spec work — why, success criteria, out-of-scope boundary, alternatives considered, and risks. Always the first stage of the 7-stage SDLC.
|
|
73
81
|
触发:`new feature proposal` · `bug report` · `refactor trigger` · `SMART goals`
|
|
74
82
|
|
|
75
83
|
- **`zsk:spec`** *[stage 2 · stage · core]*
|
|
76
|
-
|
|
77
|
-
触发:`writing spec` · `
|
|
84
|
+
Behavioral contract writing after proposal approval — scope, numbered functional and non-functional requirements, scenarios, acceptance criteria, edge cases, and impact boundaries. Stage 2 of the 7-stage SDLC.
|
|
85
|
+
触发:`writing spec` · `behavior contract` · `acceptance criteria` · `numbered requirements`
|
|
78
86
|
|
|
79
87
|
- **`zsk:design`** *[stage 3 · stage · core]*
|
|
80
|
-
|
|
81
|
-
触发:`technical design` · `
|
|
88
|
+
Solution design after spec freeze — current-state scan, architectural decisions, implementation mapping, delivery slices, risks, rollback, and observability. Stage 3 of the 7-stage SDLC.
|
|
89
|
+
触发:`technical design` · `solution design` · `architecture decision` · `current state scan`
|
|
82
90
|
|
|
83
91
|
- **`zsk:coding`** *[stage 4 · stage · core]*
|
|
84
|
-
|
|
85
|
-
触发:`implementing design` · `
|
|
92
|
+
Implementation execution after design freeze — smallest viable change, task-by-task delivery, test-first where risk is high, continuous evidence capture, and local quality gates before review. Stage 4 of the 7-stage SDLC.
|
|
93
|
+
触发:`implementing design` · `task by task delivery` · `local quality gates` · `smallest viable change`
|
|
86
94
|
|
|
87
95
|
- **`zsk:reviewing`** *[stage 5 · stage · core]*
|
|
88
|
-
|
|
96
|
+
PR code review — self-checklist, reviewer checklist, Conventional Comments prefixes, technical-rigor-over-performative-agreement when receiving feedback, dispute escalation path. Stage 5 of the 7-stage SDLC. This is the code-view (does the diff look right); the contract-view is zsk:verify.
|
|
89
97
|
触发:`code review` · `PR review` · `conventional comments` · `receiving feedback`
|
|
90
98
|
|
|
91
99
|
- **`zsk:verify`** *[stage 6 · stage · core]*
|
|
92
|
-
|
|
93
|
-
触发:`acceptance verification` · `
|
|
100
|
+
Acceptance verification before merge — independent contract check, FR/NFR coverage, AC evidence, gate records, and verdict with reproducible proof. Stage 6 of the 7-stage SDLC.
|
|
101
|
+
触发:`acceptance verification` · `evidence before assertion` · `FR coverage matrix` · `AC evidence`
|
|
94
102
|
|
|
95
103
|
- **`zsk:archive`** *[stage 7 · stage · core]*
|
|
96
|
-
|
|
104
|
+
Iteration closing / archive — move historical snapshots to docs/{module}/archive/, write postmortem (P0/P1 mandatory), update changelog (SemVer + Keep a Changelog), flush ADRs, update SYSTEM-SPEC if cross-module constraints emerged, feed back to standards/system docs. Stage 7 of the 7-stage SDLC.
|
|
97
105
|
触发:`archive iteration` · `postmortem` · `changelog` · `ADR flush`
|
|
98
106
|
|
|
99
107
|
- **`zsk:bugfix-tasks`** *[core]*
|
|
100
|
-
|
|
108
|
+
Bugfix task template with TDD enforcement — Step 1 Red (write failing reproduction test), Step 2 Green (minimal fix, no opportunistic refactor), Step 3 Regression (adjacent scenarios), Step 4 Evidence (before/after reproduction). Requires Superpowers' 3 confidence questions before starting.
|
|
101
109
|
触发:`bugfix task template` · `TDD bug fix` · `red green regression` · `bug confidence questions`
|
|
102
110
|
|
|
103
111
|
- **`zsk:dor-dod`** *[core]*
|
|
104
|
-
|
|
112
|
+
DoR/DoD gates between SDLC stages — generic DoR/DoD for all change types; frontend-specific rows (UE matrix / ue-mcp / 三语 i18n / 视觉回归 / axe) are in frontend:dor-dod-frontend.
|
|
105
113
|
触发:`definition of ready` · `definition of done` · `DoR DoD` · `task gate`
|
|
106
114
|
|
|
107
115
|
- **`zsk:refactor-tasks`** *[core]*
|
|
108
|
-
|
|
116
|
+
Refactor task template (characterization + small-step atomic) — Step 1 capture behavior baseline, Step 2 apply one Fowler technique per atomic commit (revert on red), Step 3 Parallel Change for large refactors (Expand → Migrate → Contract), Step 4 prepare behavior-unchanged evidence.
|
|
109
117
|
触发:`refactor task template` · `characterization baseline` · `Fowler techniques` · `Parallel Change tasks`
|
|
110
118
|
|
|
111
119
|
- **`zsk:task`** *[core]*
|
|
112
|
-
|
|
120
|
+
Cross-stage task execution mindset — what a task is, how it threads spec → verify, which template to pick by change type, cross-stage hard principles. Not for writing a specific task; use zsk:task-structure for that.
|
|
113
121
|
触发:`task framework` · `task execution overview` · `cross-stage tasks` · `which task template`
|
|
114
122
|
|
|
115
123
|
- **`zsk:task-evidence`** *[core]*
|
|
116
|
-
|
|
124
|
+
Task verification evidence discipline — FR coverage matrix (every FR/NFR from spec has coverage task + acceptance evidence), AC checklist with reproducible links, validation records per gate (lint/type-check/test/security/etc.). Enforces "evidence before assertion" — links must be clickable and reproducible.
|
|
117
125
|
触发:`FR coverage matrix` · `AC verification` · `validation record` · `evidence links`
|
|
118
126
|
|
|
119
127
|
- **`zsk:task-structure`** *[core]*
|
|
120
|
-
|
|
128
|
+
tasks.md authoring discipline — task granularity (0.5-2 person-days), two-level structure (parent/child, no deeper), estimation unit (T-shirt or Fibonacci), required fields per task (status/owner/covers-FR/deliverable/verification), FR coverage numbering rules.
|
|
121
129
|
触发:`task granularity` · `task estimation` · `T-shirt sizing` · `story points`
|
|
122
130
|
|
|
123
131
|
- **`zsk:task-tracking`** *[core]*
|
|
124
|
-
|
|
132
|
+
Task execution tracking — dependencies (Mermaid graph), blockers (dated log with severity H/M/L and escalation rules), milestones (stage exits with committed dates), and task state transitions (TODO → DOING → DONE, with BLOCKED requiring log entry).
|
|
125
133
|
触发:`task dependency graph` · `blocker log` · `milestones` · `task state flow`
|
|
126
134
|
|
|
127
135
|
- **`zsk:bugfix`** *[workflow · core]*
|
|
128
|
-
|
|
136
|
+
Bugfix end-to-end orchestration — triage → reproduce → RCA (5 Whys with confidence questions) → TDD fix (red first) → regression coverage → postmortem (P0/P1 mandatory). Enforces Superpowers' bug confidence questioning discipline.
|
|
129
137
|
触发:`bug fix workflow` · `fix defect` · `RCA` · `5 whys`
|
|
130
138
|
|
|
131
139
|
- **`zsk:feature`** *[workflow · core]*
|
|
132
|
-
|
|
140
|
+
Feature end-to-end orchestration across 7 SDLC stages — brainstorming → writing-plans → plan-eng-review → executing-plans+TDD → requesting/receiving-code-review → verification-before-completion → finishing-a-development-branch.
|
|
133
141
|
触发:`new feature workflow` · `feature end to end` · `start feature` · `feature stages`
|
|
134
142
|
|
|
135
143
|
- **`zsk:refactor`** *[workflow · core]*
|
|
136
|
-
|
|
144
|
+
Behavior-preserving refactor discipline — Fowler catalog, characterization tests as baseline, small atomic commits, Parallel Change / Strangler Fig for large refactors. Enforces "behavior preserved" as a hard contract (any behavior change means it is not a refactor).
|
|
137
145
|
触发:`refactor workflow` · `Fowler refactoring` · `characterization test` · `Parallel Change`
|
|
138
146
|
|
|
139
|
-
### `frontend/` — Frontend · React + Web
|
|
147
|
+
### `frontend/` — Frontend · React + Web 层实现规范 (16)
|
|
140
148
|
|
|
141
149
|
- **`zsk:spec-frontend`** *[stage 2 · stage · optional]*
|
|
142
|
-
|
|
150
|
+
Frontend component/page spec.md authoring — adds Component Public Contract (Props / Events / TS types), UE state matrix with a11y attributes, UE/MCP reference, and the 6-category Frontend NFR (performance / a11y / security / i18n / compat / observability). Extends the generic zsk:spec framework.
|
|
143
151
|
触发:`frontend spec` · `Component Public Contract` · `Props Event Contract` · `UE state matrix`
|
|
144
152
|
|
|
145
153
|
- **`zsk:design-frontend`** *[stage 3 · stage · optional]*
|
|
146
|
-
|
|
154
|
+
Frontend module design.md authoring — adds Props/state/event implementation mapping, UE-state-to-structure mapping, Figma-to-implementation mapping, performance budget (Core Web Vitals), ErrorBoundary placement. Extends the generic zsk:design framework.
|
|
147
155
|
触发:`frontend design` · `Props implementation mapping` · `UE state to structure` · `Figma to implementation`
|
|
148
156
|
|
|
149
157
|
- **`zsk:review-frontend`** *[stage 5 · stage · optional]*
|
|
150
|
-
|
|
158
|
+
Frontend PR code review — frontend-specific self-checklist and reviewer checklist covering TypeScript red lines (no any / @ts-ignore), React hooks rules, dangerouslySetInnerHTML, large-list performance hazards, visual regression, i18n three-language sync, jsx-a11y. Extends zsk:reviewing generic checklist.
|
|
151
159
|
触发:`frontend code review` · `React review checklist` · `TypeScript red lines` · `hooks review`
|
|
152
160
|
|
|
153
161
|
- **`zsk:dor-dod-frontend`** *[optional]*
|
|
154
|
-
|
|
162
|
+
Frontend-specific DoR/DoD for SDLC stage transitions — frontend-specific rows on top of the generic checklist. Covers UE state matrix completeness, ue-mcp.md registration, visual regression, three-language i18n sync, a11y (keyboard/aria/focus), frontend NFR (CWV) evidence.
|
|
155
163
|
触发:`frontend DoR DoD` · `frontend definition of ready done` · `UE matrix gate` · `visual regression gate`
|
|
156
164
|
|
|
157
165
|
- **`zsk:feature-tasks-frontend`** *[optional]*
|
|
158
|
-
|
|
166
|
+
Frontend component/page feature task template — 7-category mandatory (事实源对齐 / Props 契约 / UE-MCP 刷新 / UE 状态 / 测试 / 视觉回归 / 质量门禁). Enforces TDD-first, contract-driven, evidence-before-assertion.
|
|
159
167
|
触发:`frontend feature tasks` · `component tasks template` · `7 category tasks` · `Props UE state visual regression`
|
|
160
168
|
|
|
161
169
|
- **`zsk:nfr-web`** *[optional]*
|
|
162
|
-
|
|
170
|
+
Web-side NFR thresholds for the 7-category framework — Core Web Vitals (LCP/INP/CLS/TTFB/TTI targets), WCAG 2.1 AA itemized rules, Web security NFR items, i18n language list + baseline + entry + RTL, browser/OS/device compatibility matrix, responsive breakpoints, observability (web-vitals + error reporting), reliability (ErrorBoundary + timeout + retry). Inherits system/nfr-baseline; modules declare deviations only.
|
|
163
171
|
触发:`Web NFR` · `CWV thresholds` · `WCAG AA rules` · `browser matrix`
|
|
164
172
|
|
|
165
173
|
- **`zsk:a11y-web`** *[standard · optional]*
|
|
166
|
-
|
|
174
|
+
React/JSX accessibility implementation — label association (htmlFor/wrap), aria props usage, Modal focus trap (inert + initialFocus + restoreFocus), dialog role, live regions for async, skip link, axe-core + jsx-a11y toolchain, keyboard event handlers, prefers-reduced-motion. Implementation layer; principles (WCAG, POUR, contrast) live in quality/a11y-principles.
|
|
167
175
|
触发:`jsx a11y` · `focus trap` · `Modal accessibility` · `axe-core`
|
|
168
176
|
|
|
169
177
|
- **`zsk:api-contract-ts`** *[standard · optional]*
|
|
170
|
-
|
|
178
|
+
TypeScript frontend × backend API contract — never hand-write API types, always consume from the shared types package or generated codegen. Covers source-of-truth pattern (backend-owned types), codegen workflows (OpenAPI / GraphQL / tRPC / Protobuf), breaking-change handling, version discipline, runtime validation (Zod at boundary), and service-layer shape. Pairs with typescript.md red lines.
|
|
171
179
|
触发:`API type sync` · `do not hand-write API types` · `OpenAPI codegen` · `GraphQL codegen`
|
|
172
180
|
|
|
173
|
-
- **`zsk:css-bem`** *[standard · optional]*
|
|
174
|
-
Use when writing CSS / Less / Sass / CSS Modules / Tailwind in a frontend module — CSS scheme detection (Less/Sass/CSS Modules/Tailwind/native), BEM naming (Block__Element--Modifier), nesting discipline (≤3 layers), token usage rules (no hardcoded color/spacing), scope isolation, responsive breakpoints, and !important prohibition.
|
|
175
|
-
触发:`CSS scheme detection` · `BEM naming` · `Less nesting` · `design token`
|
|
176
|
-
|
|
177
181
|
- **`zsk:i18n`** *[standard · optional]*
|
|
178
|
-
|
|
182
|
+
Frontend module i18n implementation — unified entry (i18n.t with mandatory fallback), key namespace structure (namespace.module.leaf_key), three-language sync rule (commit-atomic), ICU MessageFormat for plural/select, Intl.* for date/number/currency, RTL declaration, React Trans component for JSX interpolation. Replaces standards/i18n for frontend scope.
|
|
179
183
|
触发:`i18n implementation` · `key namespace` · `fallback baseline` · `ICU plural`
|
|
180
184
|
|
|
181
185
|
- **`zsk:performance-web`** *[standard · optional]*
|
|
182
|
-
|
|
186
|
+
React / Web frontend performance for Core Web Vitals — CWV thresholds (LCP/INP/CLS/TTFB/TTI), React memoization discipline (when to memo vs not), virtualization for lists ≥ 200, lazy loading via React.lazy + Suspense + IntersectionObserver, bundle splitting + tree-shaking, image srcset + loading="lazy", debounce/throttle, re-render diagnosis with React DevTools Profiler. Implementation layer; budget framework in system/nfr-baseline + frontend/nfr-web.
|
|
183
187
|
触发:`Core Web Vitals` · `LCP INP CLS` · `React memo` · `virtual scrolling`
|
|
184
188
|
|
|
185
189
|
- **`zsk:react-components`** *[standard · optional]*
|
|
186
|
-
|
|
190
|
+
React component API design — layering (UI/logic separation via hooks), composition vs configuration (compound components over flat-prop explosion), granularity (5-question checklist), controlled vs uncontrolled boundary, Props API design. React-specific implementation of generic component discipline.
|
|
187
191
|
触发:`React component design` · `compound components` · `component granularity` · `controlled uncontrolled`
|
|
188
192
|
|
|
189
193
|
- **`zsk:react-naming`** *[standard · optional]*
|
|
190
|
-
|
|
194
|
+
React + TypeScript naming conventions — components, files, folders, variables, booleans, event handlers, event props, hooks, TS types/interfaces, constants, and i18n keys. Principles transfer to Vue/Svelte with syntax adjustments.
|
|
191
195
|
触发:`React naming` · `component file naming` · `event handler naming` · `boolean naming`
|
|
192
196
|
|
|
193
197
|
- **`zsk:security-web`** *[standard · optional]*
|
|
194
|
-
|
|
198
|
+
Web frontend security — XSS (React default escape + dangerouslySetInnerHTML red line + DOMPurify exception), URL protocol whitelist, Storage red lines (no sensitive data in Local/SessionStorage), CSRF token integration, console log scrubbing for production, CSP meta/header consumption, SRI for third-party scripts, clickjacking (frame-ancestors awareness), postMessage origin checks. Frontend UI is the convenience defense; backend is final.
|
|
195
199
|
触发:`dangerouslySetInnerHTML` · `XSS React` · `DOMPurify` · `LocalStorage sensitive`
|
|
196
200
|
|
|
201
|
+
- **`zsk:styling-system`** *[standard · optional]*
|
|
202
|
+
Frontend styling system discipline — scheme detection, naming conventions, nesting depth (≤3 layers), token usage rules (no hardcoded color/spacing), scope isolation, responsive breakpoints, and !important prohibition across Less / Sass / CSS Modules / Tailwind / CSS-in-JS.
|
|
203
|
+
触发:`CSS scheme detection` · `BEM naming` · `Less nesting` · `design token`
|
|
204
|
+
|
|
197
205
|
- **`zsk:testing-web`** *[standard · optional]*
|
|
198
|
-
|
|
206
|
+
Frontend tests for React codebases — full toolchain (Jest/Vitest + React Testing Library + renderHook + user-event + MSW + Playwright + Chromatic + jest-axe), test structure (AAA/GWT), mock strategy (MSW for HTTP, manual for modules), coverage thresholds (new code / global), and the component test template. Implementation layer; cross-stack principles live in quality/testing-pyramid.
|
|
199
207
|
触发:`Jest Vitest` · `React Testing Library` · `MSW mock service worker` · `Playwright`
|
|
200
208
|
|
|
201
209
|
- **`zsk:typescript`** *[standard · optional]*
|
|
202
|
-
|
|
210
|
+
TypeScript in frontend codebases — red lines (no any / as any / @ts-ignore / empty interface / Object type), must-do (explicit types for public boundaries, union literals, strict + noUncheckedIndexedAccess), API types from backend (not hand-written), type vs interface, generics discipline, unknown over any. Complements quality/code-hygiene for cross-language hygiene.
|
|
203
211
|
触发:`TypeScript red lines` · `no any` · `strict mode` · `noUncheckedIndexedAccess`
|
|
204
212
|
|
|
205
|
-
### `quality/` — Quality ·
|
|
213
|
+
### `quality/` — Quality · 跨栈质量原则 (5)
|
|
206
214
|
|
|
207
215
|
- **`zsk:a11y-principles`** *[standard · optional]*
|
|
208
|
-
|
|
216
|
+
Accessibility principles at the concept level — WCAG 2.1 AA baseline, POUR principles, keyboard operation matrix, focus management, aria semantics, contrast ratios, don't-rely-on-color, reduced motion. For Web/JSX implementation (axe-core, jsx-a11y, focus traps in Modal, etc.) see frontend/a11y-web.md.
|
|
209
217
|
触发:`accessibility principles` · `WCAG AA` · `POUR` · `keyboard matrix`
|
|
210
218
|
|
|
211
219
|
- **`zsk:code-hygiene`** *[standard · optional]*
|
|
212
|
-
|
|
220
|
+
Code hygiene for any language — comment policy (WHY not WHAT), import ordering principle, formatter discipline, generic forbidden patterns (TODO comments, commented-out code, signature-like comments). Stack-specific rules (TypeScript red lines, React naming) are in frontend/*.
|
|
213
221
|
触发:`code hygiene` · `comment policy` · `import order` · `WHY not WHAT`
|
|
214
222
|
|
|
215
223
|
- **`zsk:release`** *[standard · optional]*
|
|
216
|
-
|
|
224
|
+
Version release discipline — SemVer numbering, Keep a Changelog, Conventional Changelog auto-generation, environment promotion (dev→test→pre→prod), feature flag lifecycle, rollback strategy, hotfix process, canary monitoring. Works across language stacks; tool names are stack-specific examples.
|
|
217
225
|
触发:`SemVer` · `changelog` · `conventional changelog` · `hotfix`
|
|
218
226
|
|
|
219
227
|
- **`zsk:security-owasp`** *[standard · optional]*
|
|
220
|
-
|
|
228
|
+
Cross-stack security discipline — OWASP Top 10 overview, CVE response SLAs, dependency license whitelist, supply chain hygiene, common lint red lines (eval/dynamic execution), and the "frontend UI is not the final defense" principle. Web-specific XSS/CSRF/Storage red lines are in frontend/security-web.md.
|
|
221
229
|
触发:`OWASP Top 10` · `CVE response` · `license whitelist` · `supply chain security`
|
|
222
230
|
|
|
223
231
|
- **`zsk:testing-pyramid`** *[standard · optional]*
|
|
224
|
-
|
|
232
|
+
Cross-language test strategy & discipline — test pyramid ratio (unit 70 / integration 20 / e2e 10), AAA/GWT structure, coverage targets, and the three hard principles (evidence before assertion, Red-Green-Refactor, bug confidence questioning). Stack-specific tooling (Jest/RTL/MSW/Playwright) is in frontend/testing-web.md.
|
|
225
233
|
触发:`test pyramid` · `TDD discipline` · `test coverage target` · `AAA GWT structure`
|
|
226
234
|
|
|
227
|
-
### `design-handoff/` — Design Handoff ·
|
|
235
|
+
### `design-handoff/` — Design Handoff · 设计交付方法论 (2)
|
|
228
236
|
|
|
229
237
|
- **`zsk:figma-to-code`** *[optional]*
|
|
230
|
-
|
|
238
|
+
Figma design node → production code via MCP — 7-step workflow (locate → extract structure → extract annotations → naming conversion → layout decoding → states → tokens), plus the 4-dimension "100% fidelity" verification (visual / interaction / semantic / responsive). Styling specifics live in zsk:styling-system.
|
|
231
239
|
触发:`figma to code` · `100 percent fidelity` · `node naming conversion` · `design annotations`
|
|
232
240
|
|
|
233
241
|
- **`zsk:ue-mcp`** *[optional]*
|
|
234
|
-
|
|
242
|
+
Design Source capture & MCP readout for modules with Figma/design input — Design Source (URL/node-id), MCP readout status, module-specific UE deviations from system baselines, and implementation mapping. Produces docs/{module}/ue-mcp.md + structured description.md snapshot in design-assets. Only records deviations, not duplicated baseline rules.
|
|
235
243
|
触发:`UE MCP context` · `figma snapshot` · `design source reference` · `module UE deviation`
|
|
236
244
|
|
|
237
|
-
### `system/` — System ·
|
|
245
|
+
### `system/` — System · 工程宪法级资源 (5)
|
|
238
246
|
|
|
239
247
|
- **`zsk:adr`** *[optional]*
|
|
240
|
-
|
|
248
|
+
Cross-module long-lived architectural decision record — context, decision, rationale, alternatives considered, and consequences. Produces docs/system/adrs/ADR-NNNN-{slug}.md. Not for single-module implementation choices.
|
|
241
249
|
触发:`architecture decision record` · `ADR template` · `MADR` · `cross-module decision`
|
|
242
250
|
|
|
243
251
|
- **`zsk:architecture`** *[optional]*
|
|
244
|
-
|
|
252
|
+
Project system architecture documentation — C4 context diagram, tech stack baseline, module boundaries, routing, auth flow, data flow (request/state/contract), deployment topology, related ADRs. Frontend micro-frontend topology is an optional add-on section.
|
|
245
253
|
触发:`system architecture` · `C4 model` · `tech stack baseline` · `module boundaries`
|
|
246
254
|
|
|
247
255
|
- **`zsk:glossary`** *[optional]*
|
|
248
|
-
|
|
256
|
+
Project Ubiquitous Language maintenance — single source for business terms, domain entities, state names, technical terms, and acronyms. Eliminates same-concept-different-names confusion across modules and backend contracts.
|
|
249
257
|
触发:`glossary` · `ubiquitous language` · `DDD terms` · `business term`
|
|
250
258
|
|
|
251
259
|
- **`zsk:nfr-baseline`** *[optional]*
|
|
252
|
-
|
|
260
|
+
Project NFR baseline (inherited or established) — 7-category framework (performance / a11y / security / i18n / compatibility / observability / reliability) and the deviation-declaration discipline. Web-specific values (CWV thresholds, WCAG AA, browser matrix, 三语) live in frontend/nfr-web.md.
|
|
253
261
|
触发:`NFR baseline` · `non functional requirements` · `quality attributes` · `ISO 25010`
|
|
254
262
|
|
|
255
263
|
- **`zsk:project-constraints-template`** *[optional]*
|
|
256
|
-
|
|
264
|
+
Project constraints template for new-project bootstrap — captures import origins, forbidden libraries/patterns, required wrappers, naming conventions, quality gates, branch/release conventions in one SYSTEM-SPEC chapter. The project-side constitutional constraint table, complementary to project-config.yaml (mechanical values).
|
|
257
265
|
触发:`project constraints` · `SYSTEM-SPEC` · `import origins` · `forbidden packages`
|
|
258
266
|
|
|
259
|
-
### `meta/` — Meta ·
|
|
267
|
+
### `meta/` — Meta · 元信息 (1)
|
|
260
268
|
|
|
261
269
|
- **`zsk:philosophy`** *[meta · optional]*
|
|
262
|
-
|
|
270
|
+
Design rationale of the zsk skill set — LLM Wiki × Superpowers × GSD × project-adaptation synthesis. For contributors needing to understand why zsk is organized the way it is.
|
|
263
271
|
触发:`zsk philosophy` · `why is zsk organized this way` · `design rationale` · `LLM wiki vs superpowers`
|
|
272
|
+
|
package/bundles.yaml
CHANGED
|
@@ -45,7 +45,7 @@ bundles:
|
|
|
45
45
|
- zsk:react-components
|
|
46
46
|
- zsk:react-naming
|
|
47
47
|
- zsk:typescript
|
|
48
|
-
- zsk:
|
|
48
|
+
- zsk:styling-system
|
|
49
49
|
- zsk:i18n
|
|
50
50
|
- zsk:a11y-web
|
|
51
51
|
- zsk:performance-web
|
|
@@ -82,7 +82,7 @@ bundles:
|
|
|
82
82
|
- zsk:react-components
|
|
83
83
|
- zsk:react-naming
|
|
84
84
|
- zsk:typescript
|
|
85
|
-
- zsk:
|
|
85
|
+
- zsk:styling-system
|
|
86
86
|
- zsk:i18n
|
|
87
87
|
- zsk:a11y-web
|
|
88
88
|
- zsk:performance-web
|
|
@@ -3,14 +3,14 @@ name: zsk:figma-to-code
|
|
|
3
3
|
description: Figma design node → production code via MCP — 7-step workflow
|
|
4
4
|
(locate → extract structure → extract annotations → naming conversion → layout
|
|
5
5
|
decoding → states → tokens), plus the 4-dimension "100% fidelity" verification
|
|
6
|
-
(visual / interaction / semantic / responsive).
|
|
7
|
-
zsk:
|
|
6
|
+
(visual / interaction / semantic / responsive). Styling specifics live in
|
|
7
|
+
zsk:styling-system.
|
|
8
8
|
category: resource
|
|
9
9
|
domain: design-handoff
|
|
10
10
|
tier: optional
|
|
11
11
|
related:
|
|
12
12
|
- ../ue-mcp/SKILL.md
|
|
13
|
-
- ../../frontend/
|
|
13
|
+
- ../../frontend/styling-system/SKILL.md
|
|
14
14
|
- ../../frontend/a11y-web/SKILL.md
|
|
15
15
|
- ../../frontend/react-components/SKILL.md
|
|
16
16
|
triggers:
|
|
@@ -26,7 +26,7 @@ triggers:
|
|
|
26
26
|
|
|
27
27
|
> **目标**:以最少的主观猜测、最高的还原度,从 Figma 设计稿产出生产级代码
|
|
28
28
|
> **适用**:有视觉 / 交互设计输入的模块
|
|
29
|
-
>
|
|
29
|
+
> **样式实现细节**:命名、Less 嵌套、token 与断点纪律见 [`frontend/styling-system`](../../frontend/styling-system/SKILL.md)(本文件只讲方法论)
|
|
30
30
|
|
|
31
31
|
## 核心挑战
|
|
32
32
|
|
|
@@ -112,7 +112,7 @@ Figma 原名往往不规范,必须转换为 **语义化 + 可搜索 + 与代
|
|
|
112
112
|
#### 命名转换原则
|
|
113
113
|
|
|
114
114
|
1. **语义化,不视觉化**(✅ `.feature-tree__node` / ❌ `.blue-box`)
|
|
115
|
-
2.
|
|
115
|
+
2. **样式命名约定**(BEM 为默认推荐,详见 [`frontend/styling-system`](../../frontend/styling-system/SKILL.md))
|
|
116
116
|
3. **与组件命名对齐**(组件 `FeatureTree` → Block class `.feature-tree`)
|
|
117
117
|
4. **稳定且可搜索**(Figma 改名不影响代码;跨文件 grep 能定位)
|
|
118
118
|
5. **识别语义的依据**:位置 / 结构、Variants / States、内容、命名暗示
|
|
@@ -233,7 +233,7 @@ Figma Variants → 组件状态:
|
|
|
233
233
|
- [ ] `{{config.paths.design_assets}}/{module}/{snapshot}/description.md`
|
|
234
234
|
- [ ] `screenshot-*.png`(每状态一张)
|
|
235
235
|
- [ ] `docs/{module}/ue-mcp.md`(引用 description.md)
|
|
236
|
-
- [ ] 组件代码 + 样式(遵循 [`frontend/
|
|
236
|
+
- [ ] 组件代码 + 样式(遵循 [`frontend/styling-system`](../../frontend/styling-system/SKILL.md))
|
|
237
237
|
- [ ] i18n 三语文案(若适用,含批注中文案)
|
|
238
238
|
- [ ] 单元测试(覆盖状态矩阵每一项)
|
|
239
239
|
- [ ] **批注落实追踪**
|
|
@@ -259,7 +259,7 @@ Figma Variants → 组件状态:
|
|
|
259
259
|
- [ ] 状态矩阵含 diff + 截图 + a11y 属性
|
|
260
260
|
- [ ] **设计批注表完整**(含类别 / 责任 / 已落实列)
|
|
261
261
|
- [ ] **批注已全部落实或关联 tasks.md**
|
|
262
|
-
- [ ]
|
|
262
|
+
- [ ] 样式命名一致(见 `frontend/styling-system`)
|
|
263
263
|
- [ ] 布局用 flex / grid,绝对定位有理由
|
|
264
264
|
- [ ] 四维度 100% 还原清单全绿
|
|
265
265
|
- [ ] description.md 与代码交叉一致
|
|
@@ -161,7 +161,7 @@ triggers:
|
|
|
161
161
|
|
|
162
162
|
**浏览器矩阵**(默认基线):Chrome / Edge / Safari / Firefox 桌面端最近 2 个大版本;iOS Safari / Android Chrome 最近 2 个大版本;**IE 11 不支持**。在 `package.json` 配 `browserslist` 对齐(`last 2 <browser> versions` + `not dead`)。
|
|
163
163
|
|
|
164
|
-
**响应式断点**(引自 token,详见 [`
|
|
164
|
+
**响应式断点**(引自 token,详见 [`styling-system`](../styling-system/SKILL.md) 第 7 节):
|
|
165
165
|
|
|
166
166
|
| 断点 | ≤ px | 说明 |
|
|
167
167
|
| --- | ---: | --- |
|
|
@@ -112,7 +112,7 @@ triggers:
|
|
|
112
112
|
|
|
113
113
|
### 代码风格(前端)
|
|
114
114
|
- [ ] 命名符合 [`frontend/react-naming`](../react-naming/SKILL.md)
|
|
115
|
-
- [ ]
|
|
115
|
+
- [ ] 样式遵循 [`frontend/styling-system`](../styling-system/SKILL.md)(命名稳定 / 无 `!important` / 无深度嵌套)
|
|
116
116
|
- [ ] 无过度注释 WHAT(见 [`quality/code-hygiene`](../../quality/code-hygiene/SKILL.md))
|
|
117
117
|
- [ ] 没有未被调用的新抽象(YAGNI)
|
|
118
118
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: zsk:
|
|
3
|
-
description: Frontend
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
name: zsk:styling-system
|
|
3
|
+
description: Frontend styling system discipline — scheme detection, naming
|
|
4
|
+
conventions, nesting depth (≤3 layers), token usage rules (no hardcoded
|
|
5
|
+
color/spacing), scope isolation, responsive breakpoints, and !important
|
|
6
|
+
prohibition across Less / Sass / CSS Modules / Tailwind / CSS-in-JS.
|
|
7
7
|
category: standard
|
|
8
8
|
domain: frontend
|
|
9
9
|
tier: optional
|
|
@@ -20,7 +20,7 @@ triggers:
|
|
|
20
20
|
- responsive breakpoints
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
# Styling System · 样式体系纪律
|
|
24
24
|
|
|
25
25
|
> **范围**:CSS / Less / Sass / CSS Modules / Tailwind / CSS-in-JS 场景下的样式纪律
|
|
26
26
|
> **前置**:**写样式前必须先检测项目 CSS 方案**,严格跟随,不混用
|
|
@@ -50,9 +50,9 @@ triggers:
|
|
|
50
50
|
- ❌ CSS Modules 项目里手写全局 class(除非显式 `:global()`)
|
|
51
51
|
- ❌ 同文件混用 CSS-in-JS 与外部样式表
|
|
52
52
|
|
|
53
|
-
## 2. BEM
|
|
53
|
+
## 2. 命名与结构纪律(默认示例:BEM)
|
|
54
54
|
|
|
55
|
-
###
|
|
55
|
+
### 默认结构
|
|
56
56
|
|
|
57
57
|
```
|
|
58
58
|
.block { ... } // 块
|
|
@@ -67,6 +67,12 @@ triggers:
|
|
|
67
67
|
- 不嵌套 Element(`block__el1__el2` 是错误 — 改为 `block__el2` 或重新设计 block)
|
|
68
68
|
- Modifier 表达状态 / 变体(`--primary`、`--is-active`、`--size-large`)
|
|
69
69
|
|
|
70
|
+
### 说明
|
|
71
|
+
|
|
72
|
+
- **BEM 不是唯一合法方案**,但在 Less / Sass / 全局样式表场景下仍然是默认推荐
|
|
73
|
+
- 如果项目已明确采用 CSS Modules、Tailwind、CSS-in-JS 或 Vanilla Extract,就遵循宿主方案的命名与组织方式,不强行套一层 BEM
|
|
74
|
+
- 本 skill 关心的是**命名稳定、作用域清晰、层级可控**,不是要求所有项目都写成同一种 class 语法
|
|
75
|
+
|
|
70
76
|
### 示例
|
|
71
77
|
|
|
72
78
|
```html
|