[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EKCW5K2DM8J3K7SF6SKYGT":3,"skill-same:01M7EKCW5K2DM8J3K7SF6SKYGT":88},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7EKCW5K2DM8J3K7SF6SKYGT","design-system",null,"Systematic UI engineering covering token architecture (DTCG), polymorphic accessible headless components, variant prop contracts, multi-brand theming, and regression testing gates.","raillen\u002Fdaisy-code-editor","raillen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F50306048?v=4","01M7EKBDVVBSPF21PBPVJYMNYR","Raillen Santos","01M7EKBDWD12A1K9N9Y638FGX9",0,"MIT","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: design-system\ndescription: Systematic UI engineering covering token architecture (DTCG), polymorphic accessible headless components, variant prop contracts, multi-brand theming, and regression testing gates.\n---\n\n# Design System Engineering\n\n## 1. Purpose\nDefine, engineer, and govern a multi-platform, token-driven Design System that provides reusable, accessible, cohesive, and themeable UI components across the entire product ecosystem, ensuring zero visual drift and strict contract compliance.\n\n---\n\n## 2. Use When\n- Creating or refactoring shared component libraries and UI design tokens.\n- Establishing multi-brand, dark mode, or responsive theme architectures.\n- Defining component API contracts (props, slots, variants, events, accessibility states).\n- Implementing headless accessible primitives (Radix UI, React Aria, AccessKit) with custom styling.\n- Establishing visual regression testing suites and interactive living documentation (Storybook, Styleguidist).\n\n---\n\n## 3. Do Not Use When\n- Building one-off, highly specialized, domain-specific landing pages with zero reuse potential.\n- Prototyping disposable mockups where formal token pipelines and semver contracts introduce unnecessary overhead.\n- Auditing low-level memory layout or binary runtime internals (use `memory-management` or `clean-code`).\n\n---\n\n## 4. Required Context\nBefore implementing or modifying design system primitives, obtain:\n1. **Design Tokens Specification**: DTCG-compliant JSON tokens covering colors, spacing, typography, radii, elevation, motion.\n2. **Component Anatomy & States**: Visual specs and interaction matrices for all 19 states (default, hover, focus-visible, active, disabled, loading, error, etc.).\n3. **Accessibility Baseline**: Required ARIA APG pattern, keyboard navigation schema, and contrast target (WCAG 2.2 AA \u002F AAA).\n4. **Target Platform & Framework**: Target runtimes (React, Vue, Svelte, Web Components, Flutter, Native).\n\n---\n\n## 5. Procedure\n\n### Step 1: Token Integration & Theming Layer\n1. Map raw design decisions into the 3-tier DTCG hierarchy:\n   - **Global (Tier 1)**: Immutable raw values (`color.blue.500: #2563eb`).\n   - **Semantic (Tier 2)**: Intent-driven abstraction (`color.action.primary.bg: {color.blue.500}`).\n   - **Component-Scoped (Tier 3)**: Isolated component styling (`button.primary.bg: {color.action.primary.bg}`).\n2. Expose tokens via CSS Custom Properties or platform-native variables under theme scopes (`:root`, `[data-theme=\"dark\"]`, `[data-theme=\"high-contrast\"]`).\n3. Ensure runtime switching carries zero layout shift or JavaScript recalculation overhead.\n\n### Step 2: Component Contract & Polymorphic Architecture\n1. Define strict TypeScript interfaces for all component props using discriminated unions or variant maps (e.g., CVA \u002F Tailwind Variants \u002F StyleX).\n2. Implement polymorphic rendering via the `asChild` \u002F Slot pattern to prevent tag soup and support arbitrary wrappers without breaking semantic markup:\n   ```tsx\n   \u003CButton asChild variant=\"primary\">\n     \u003Ca href=\"\u002Flogin\">Log In\u003C\u002Fa>\n   \u003C\u002FButton>\n   ```\n3. Separate component state\u002Fbehavior from styling using headless primitives or well-defined hook contracts.\n\n### Step 3: Accessibility & Keyboard Interaction Contract\n1. Enforce native semantic elements wherever possible (`\u003Cbutton>`, `\u003Cdialog>`, `\u003Cnav>`).\n2. If custom composite widgets are required (e.g., Combobox, Tabs, Menu), wire full ARIA APG state management, focus traps, and roving tabindexes.\n3. Guarantee visible focus rings (`:focus-visible`) styled via semantic tokens (`outline: 2px solid var(--focus-ring); outline-offset: 2px`).\n\n### Step 4: Component Documentation & Living Catalog\n1. Create interactive Storybook stories (`*.stories.tsx`) covering every variant, size, and interactive state.\n2. Expose interactive Controls (args) allowing consumers to test edge cases (long strings, right-to-left languages, zoom).\n3. Document accessibility guarantees, keyboard shortcuts, and dos\u002Fdon'ts.\n\n### Step 5: Visual Regression & Contract Automated Gates\n1. Run automated snapshot tests verifying rendered DOM structure.\n2. Execute pixel-level visual regression tests (Playwright, Chromatic, Storybook Test Runner) across both light and dark themes.\n3. Run automated accessibility scans (`axe-core`, `eslint-plugin-jsx-a11y`) in CI.\n\n---\n\n## 6. Decision Rules\n1. **Composition Over Configuration**: Prefer compound components (`\u003CCard.Header>`, `\u003CCard.Body>`, `\u003CCard.Footer>`) over monolithic prop-heavy components (`\u003CCard title=\"\" header=\"\" subtitle=\"\" footer=\"\" ... \u002F>`).\n2. **Zero Hardcoded Values**: Never write raw hex codes (`#1e293b`), pixel dimensions (`16px`), or font families directly in component stylesheets. Every value must resolve through design tokens.\n3. **No Breaking Changes Without Codemods**: Renaming or removing a prop is a breaking change. Deprecate with runtime warnings and supply automated codemods before removal.\n4. **Encapsulated Layout Boundaries**: Components must never specify external margins (`margin-top`, `margin-left`). Layout spacing is the responsibility of parent layout components (`Stack`, `Grid`, `Cluster`).\n\n---\n\n## 7. Evidence Required\n- **Contract Tests**: TypeScript compilation with zero type errors under `strict: true`.\n- **Accessibility Audit**: Automated Axe \u002F Jest-Axe scan with 0 violations.\n- **Visual Regression Proof**: Screenshot diffs confirming 0 unexpected pixel mutations across themes and breakpoints.\n- **Storybook Coverage**: Stories present for 100% of defined component variants.\n\n---\n\n## 8. Output Contract\nA production design system artifact must contain:\n1. Component implementation file (e.g. `Button.tsx`, `Button.vue`).\n2. Component style definition consuming semantic design tokens.\n3. Component unit and accessibility tests (`*.test.tsx`).\n4. Storybook documentation story (`*.stories.tsx`).\n5. Export entry in package index with clean tree-shaking metadata (`package.json` with `\"sideEffects\": false`).\n\n---\n\n## 9. Stop Conditions\n- All component variants pass type checking, unit tests, and accessibility validations.\n- Visual regression suite matches baseline with zero unwanted diffs.\n- Component API documentation is generated and verified in Storybook.\n\n---\n\n## 10. Escalation Rules\n- Escalate to Design Lead if a proposed component variant cannot satisfy WCAG 2.2 AA contrast with the current color palette.\n- Escalate to Architecture Board if a new component introduces a conflicting dependency or breaking token tier change.\n","# Design System Engineering\n\n## 1. Purpose\nDefine, engineer, and govern a multi-platform, token-driven Design System that provides reusable, accessible, cohesive, and themeable UI components across the entire product ecosystem, ensuring zero visual drift and strict contract compliance.\n\n---\n\n## 2. Use When\n- Creating or refactoring shared component libraries and UI design tokens.\n- Establishing multi-brand, dark mode, or responsive theme architectures.\n- Defining component API contracts (props, slots, variants, events, accessibility states).\n- Implementing headless accessible primitives (Radix UI, React Aria, AccessKit) with custom styling.\n- Establishing visual regression testing suites and interactive living documentation (Storybook, Styleguidist).\n\n---\n\n## 3. Do Not Use When\n- Building one-off, highly specialized, domain-specific landing pages with zero reuse potential.\n- Prototyping disposable mockups where formal token pipelines and semver contracts introduce unnecessary overhead.\n- Auditing low-level memory layout or binary runtime internals (use `memory-management` or `clean-code`).\n\n---\n\n## 4. Required Context\nBefore implementing or modifying design system primitives, obtain:\n1. **Design Tokens Specification**: DTCG-compliant JSON tokens covering colors, spacing, typography, radii, elevation, motion.\n2. **Component Anatomy & States**: Visual specs and interaction matrices for all 19 states (default, hover, focus-visible, active, disabled, loading, error, etc.).\n3. **Accessibility Baseline**: Required ARIA APG pattern, keyboard navigation schema, and contrast target (WCAG 2.2 AA \u002F AAA).\n4. **Target Platform & Framework**: Target runtimes (React, Vue, Svelte, Web Components, Flutter, Native).\n\n---\n\n## 5. Procedure\n\n### Step 1: Token Integration & Theming Layer\n1. Map raw design decisions into the 3-tier DTCG hierarchy:\n   - **Global (Tier 1)**: Immutable raw values (`color.blue.500: #2563eb`).\n   - **Semantic (Tier 2)**: Intent-driven abstraction (`color.action.primary.bg: {color.blue.500}`).\n   - **Component-Scoped (Tier 3)**: Isolated component styling (`button.primary.bg: {color.action.primary.bg}`).\n2. Expose tokens via CSS Custom Properties or platform-native variables under theme scopes (`:root`, `[data-theme=\"dark\"]`, `[data-theme=\"high-contrast\"]`).\n3. Ensure runtime switching carries zero layout shift or JavaScript recalculation overhead.\n\n### Step 2: Component Contract & Polymorphic Architecture\n1. Define strict TypeScript interfaces for all component props using discriminated unions or variant maps (e.g., CVA \u002F Tailwind Variants \u002F StyleX).\n2. Implement polymorphic rendering via the `asChild` \u002F Slot pattern to prevent tag soup and support arbitrary wrappers without breaking semantic markup:\n   ```tsx\n   \u003CButton asChild variant=\"primary\">\n     \u003Ca href=\"\u002Flogin\">Log In\u003C\u002Fa>\n   \u003C\u002FButton>\n   ```\n3. Separate component state\u002Fbehavior from styling using headless primitives or well-defined hook contracts.\n\n### Step 3: Accessibility & Keyboard Interaction Contract\n1. Enforce native semantic elements wherever possible (`\u003Cbutton>`, `\u003Cdialog>`, `\u003Cnav>`).\n2. If custom composite widgets are required (e.g., Combobox, Tabs, Menu), wire full ARIA APG state management, focus traps, and roving tabindexes.\n3. Guarantee visible focus rings (`:focus-visible`) styled via semantic tokens (`outline: 2px solid var(--focus-ring); outline-offset: 2px`).\n\n### Step 4: Component Documentation & Living Catalog\n1. Create interactive Storybook stories (`*.stories.tsx`) covering every variant, size, and interactive state.\n2. Expose interactive Controls (args) allowing consumers to test edge cases (long strings, right-to-left languages, zoom).\n3. Document accessibility guarantees, keyboard shortcuts, and dos\u002Fdon'ts.\n\n### Step 5: Visual Regression & Contract Automated Gates\n1. Run automated snapshot tests verifying rendered DOM structure.\n2. Execute pixel-level visual regression tests (Playwright, Chromatic, Storybook Test Runner) across both light and dark themes.\n3. Run automated accessibility scans (`axe-core`, `eslint-plugin-jsx-a11y`) in CI.\n\n---\n\n## 6. Decision Rules\n1. **Composition Over Configuration**: Prefer compound components (`\u003CCard.Header>`, `\u003CCard.Body>`, `\u003CCard.Footer>`) over monolithic prop-heavy components (`\u003CCard title=\"\" header=\"\" subtitle=\"\" footer=\"\" ... \u002F>`).\n2. **Zero Hardcoded Values**: Never write raw hex codes (`#1e293b`), pixel dimensions (`16px`), or font families directly in component stylesheets. Every value must resolve through design tokens.\n3. **No Breaking Changes Without Codemods**: Renaming or removing a prop is a breaking change. Deprecate with runtime warnings and supply automated codemods before removal.\n4. **Encapsulated Layout Boundaries**: Components must never specify external margins (`margin-top`, `margin-left`). Layout spacing is the responsibility of parent layout components (`Stack`, `Grid`, `Cluster`).\n\n---\n\n## 7. Evidence Required\n- **Contract Tests**: TypeScript compilation with zero type errors under `strict: true`.\n- **Accessibility Audit**: Automated Axe \u002F Jest-Axe scan with 0 violations.\n- **Visual Regression Proof**: Screenshot diffs confirming 0 unexpected pixel mutations across themes and breakpoints.\n- **Storybook Coverage**: Stories present for 100% of defined component variants.\n\n---\n\n## 8. Output Contract\nA production design system artifact must contain:\n1. Component implementation file (e.g. `Button.tsx`, `Button.vue`).\n2. Component style definition consuming semantic design tokens.\n3. Component unit and accessibility tests (`*.test.tsx`).\n4. Storybook documentation story (`*.stories.tsx`).\n5. Export entry in package index with clean tree-shaking metadata (`package.json` with `\"sideEffects\": false`).\n\n---\n\n## 9. Stop Conditions\n- All component variants pass type checking, unit tests, and accessibility validations.\n- Visual regression suite matches baseline with zero unwanted diffs.\n- Component API documentation is generated and verified in Storybook.\n\n---\n\n## 10. Escalation Rules\n- Escalate to Design Lead if a proposed component variant cannot satisfy WCAG 2.2 AA contrast with the current color palette.\n- Escalate to Architecture Board if a new component introduces a conflicting dependency or breaking token tier change.\n",{"name":5,"description":7},"main","2e465213b972294984c8c9515a47f811e4b358da",".agents\u002Fskills\u002Fdesign-system","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor","https:\u002F\u002Fgithub.com\u002Fraillen","https:\u002F\u002Fraillen.com","\u003C\u003CMarketing & IT>>\r\n\r\n@poppy-team\r\n@wasd-lat ","2026-10-16 09:17:52",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add raillen\u002Fdaisy-code-editor --skill design-system",{"tool":38,"command":39},"bunx","bunx skills add raillen\u002Fdaisy-code-editor --skill design-system",{"tool":41,"command":42},"pnpm","pnpm dlx skills add raillen\u002Fdaisy-code-editor --skill design-system","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002FSKILL.md",true,[46,52,58,62,66,70,74,80,84],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"checks\u002Fdesign-system-checklist.md","REFERENCE","参考文档",2393,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002Fchecks\u002Fdesign-system-checklist.md",{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"examples\u002FButton.tsx","OTHER","其他",3847,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002Fexamples\u002FButton.tsx",{"path":59,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":60,"sourceHtmlUrl":61},"examples\u002Fdesign_token_spec.json",1114,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002Fexamples\u002Fdesign_token_spec.json",{"path":63,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":64,"sourceHtmlUrl":65},"manifest.json",1711,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002Fmanifest.json",{"path":67,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fcolor-theory.md",1486,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002Freferences\u002Fcolor-theory.md",{"path":71,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fdesign-system-guide.md",4503,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002Freferences\u002Fdesign-system-guide.md",{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Fextract_design_tokens.js","SCRIPT","脚本",1501,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002Fscripts\u002Fextract_design_tokens.js",{"path":81,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Fverify.sh",1708,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002Fscripts\u002Fverify.sh",{"path":85,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":86,"sourceHtmlUrl":87},"templates\u002Fdesign-system-spec.md",2920,"https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdesign-system\u002Ftemplates\u002Fdesign-system-spec.md",[89,95,101,108,115,122],{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7EKQYSDAX3SGSCRF873Z8E2","zoom-reflow","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fzoom-reflow\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7EKQX0MWJNQD482GGZPGES4","wireframe-styleguide","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fwireframe-styleguide\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7EKQS57FS6JYE6KWW6X5ADJ","visual-regression","Pixel-by-pixel snapshot testing, Playwright integration, dynamic content masking, deterministic font rendering, and cross-browser CI gates","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fvisual-regression\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7EKQMFR7651NVH100P5781Z","ui-implementation","Component-driven UI implementation, multi-state matrix (default, hover, focus-visible, active, disabled, loading, empty, error), DTCG design tokens, responsive layout contracts, and accessibility tree mapping.","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Fui-implementation\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M7EKQG3NVX6DPCYS6Q4PA71V","tui-editor-engine","Text buffer and editing semantics for a terminal code editor — index conversion, transaction-first editing, multi-cursor invariants, undo grouping, and large-file behaviour.","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftui-editor-engine\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":19},"01M7EKQEJ993JGC72FE2KFY3ZZ","tree-sitter-context-indexing","https:\u002F\u002Fgithub.com\u002Fraillen\u002Fdaisy-code-editor\u002Fblob\u002Fmain\u002F.ai\u002Fskills\u002Ftree-sitter-context-indexing\u002FSKILL.md",[],[]]