Skip to content

feat(skills): add design-system skill#18120

Merged
pettinarip merged 7 commits into
devfrom
feat/design-system-skill
May 14, 2026
Merged

feat(skills): add design-system skill#18120
pettinarip merged 7 commits into
devfrom
feat/design-system-skill

Conversation

@myelinated-wackerow
Copy link
Copy Markdown
Collaborator

Summary

Establishes .claude/skills/design-system/ as the canonical knowledge base for UI work in this repo. The skill follows the agentskills.io specification: a SKILL.md entry point with references/ for progressive disclosure.

The goal is to make UI work consistent: when an agent (or human) builds a feature, they get a single source of truth for which components to use, where tokens live, how RTL/i18n works, where the server/client boundary should fall, and the "use a variant, not a new component" pattern.

This is the foundation. Cleanup work to align existing components with these conventions will follow as separate tracked issues.

What's in this PR

  • .claude/skills/design-system/SKILL.md -- entry point: top rules, highest-value gotchas, "where do I import from?" cheatsheet, "load this reference when..." map, pre-merge checklist.
  • references/components.md -- component catalog
  • references/canonical-imports.md -- "which import wins?" decision tree (covers the Card / Tooltip / Modal / Hero look-alike landmines)
  • references/tokens.md -- Tailwind v4 token architecture, custom utilities, dark mode, arbitrary-value priority
  • references/spacing-typography.md -- heading sizes, spacing scale, breakpoints
  • references/gotchas.md -- confusion patterns and stale shadcn token names
  • references/variant-vs-new.md -- three-tier reuse hierarchy + backward-compatible refactor pattern
  • references/cleanup-playbook.md -- anti-pattern -> canonical pattern map
  • references/i18n-rtl.md -- RTL, locale-aware formatters, BiDi handling
  • references/server-vs-client.md -- SSR boundary patterns
  • references/a11y.md -- project-specific accessibility notes
  • references/card-walkthrough.md / page-hero-walkthrough.md -- end-to-end worked examples
  • references/new-component-checklist.md -- pre-merge checklist for new UI primitives
  • AGENTS.md -- updated styling-conventions section (tv preferred for new/refactored work) and added a pointer to the skill
  • docs/ds-implementation.md -- stubbed; redirects to the skill + Storybook (preserves the URL for stale links)

~3000 lines across 14 skill files. SKILL.md itself is 126 lines (well under the spec's 500-line guidance).

Out of scope (intentional)

  • No code changes to existing components. Tracked work for follow-up PRs.
  • No bulk cva -> tv migration. tv is preferred for new and refactored work; opportunistic swaps are fine when you're already touching a component.
  • No Heading primitive, no --text-page-title token. These are gaps the audit surfaced; tracked for design discussion.
  • No new Storybook stories. Tracked as a separate issue.

Follow-ups (will be posted as issues after merge)

  • Cleanup tracking issue -- single tracking issue with ~50 checkbox items applying the cleanup-playbook.md to existing code (raw <a>/<button> replacements, hex literal tokenization, RTL fixes in ui/select.tsx and ui/dropdown-menu.tsx, Drawer removal, *SSR rename after consolidation, etc.).
  • Storybook stories issue -- stories for the canonical primitives, grouped by category (overlay / form / display / navigation) for review-able PRs.
  • Skill maintenance process -- a docs/maintaining-skills.md doc, a PR-template line ("did this PR touch UI? check the skill"), and a CI check that flags new ui/ components missing from the catalog. Tracked in the cleanup issue. Reviewers, please weigh in here -- the maintenance approach is open to input.

Test plan

  • AGENTS.md / CLAUDE.md changes render correctly and the skill pointer resolves
  • docs/ds-implementation.md stub resolves and links to the skill
  • Skill files are valid markdown (no broken cross-references)
  • SKILL.md frontmatter validates against the agentskills.io spec
  • Post-merge: run a representative "build a new card-grid section" task with the skill loaded vs. without -- compare outputs, refine the skill based on what it adds vs. what's noise

The skill itself adds no executable code, so no test suite changes are required.

myelinated-wackerow and others added 3 commits May 4, 2026 13:59
Establishes .claude/skills/design-system/ as the canonical knowledge
base for UI work in this repo. Provides component choices, design
tokens, RTL/i18n rules, server/client guidance, accessibility, and
the "use a variant, not a new component" pattern. Designed for agent
context but useful as developer reference.

Skill structure follows the agentskills.io specification: SKILL.md
entry point plus references/ for progressive disclosure. Total ~3000
lines across 14 files.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Update AGENTS.md styling-conventions section to reflect tv-over-cva
preference and add a pointer to the new design-system skill.

Stub docs/ds-implementation.md to redirect at the skill + Storybook;
the previous content (Figma reference, DS V1 epic) is superseded by
the skill but the file is preserved so existing links resolve.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
"Not being migrated" was too declarative -- the actual stance is no
bulk migration, but opportunistic cva-to-tv swaps are fine when you're
already touching the component for another reason. Updated AGENTS.md
and the three skill references that carried the same wording.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 4, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit deca48a
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/6a0365029e94830008ab2944
😎 Deploy Preview https://deploy-preview-18120.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 73 (🟢 up 8 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 98 (🔴 down 1 from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

myelinated-wackerow and others added 3 commits May 4, 2026 18:33
ui/ primitive stories live in src/components/ui/__stories__/, not
co-located alongside the source. Update file-structure example,
import path in the story template, and clarify that only feature
components co-locate stories.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Consistent with Drawer and Divider headings. Carousel kept ambiguous
pending team discussion.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
…dation

Audit surfaced components that are unused or being deleted; remove
their entries across the skill so the registry stays accurate:

- Remove ButtonTwoLines/ButtonLinkTwoLines (unused, being deleted)
- Remove SvgButtonLink (unused, being deleted)
- Remove Drawer (unused, being deleted)
- Remove Layer2ProductCard references (unused, being deleted)
- Remove RadioGroup from Checkbox/Switch group (being deleted)
- Add Faq (built but never used; should be referenced in registry)

Update Callout / CalloutBanner / BannerNotification / DismissableBanner
sections to point at a planned unified server-renderable Callout
component (tracked in a dedicated issue) instead of treating them as
separate canonical paths.

Drop the specific Callout-to-CalloutSSR migration entry from the
cleanup playbook since the migration target is changing -- the
playbook should hold general patterns, not in-flight refactor
specifics.

Sweep stale references across SKILL.md, a11y.md, canonical-imports.md,
card-walkthrough.md, gotchas.md, server-vs-client.md, variant-vs-new.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
@myelinated-wackerow
Copy link
Copy Markdown
Collaborator Author

Manual validation

Quick sanity check before merge:

  1. Triggers correctly -- "I need to add a card grid to the staking page. what card component should we use?" (asked from this PR branch) loaded the skill and produced a direct canonical answer: Card from @/components/ui/card, warned off the legacy @/components/Card import, recommended composing with Stack/Flex for the grid wrapper, surfaced the variant-over-new-component principle.
  2. Provides a real delta vs no skill -- the same prompt from dev (skill not yet merged) got a more cautious response: Claude asked clarifying questions about card contents and which staking page before recommending. The skill saves a round-trip on canonical-choice questions.
  3. Doesn't over-trigger -- "duplicate keys in src/intl/en/page-staking.json, how should I resolve this?" correctly did NOT trigger the skill (that's intl JSON maintenance, not UI work).

We also tried the skill-creator description-optimization loop for quantified scores, but it hit a tooling issue: the claude -p test harness couldn't load the skill, giving a 0% trigger rate across all queries / 4 iterations regardless of description changes. That's a separate skill-discovery problem in subprocess invocations, unrelated to this skill's content. Worth tracking but doesn't block merge.

Ready to land based on qualitative signal. Real-world usage will surface anything missed.

Add eval workspaces to .gitignore

Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Copy link
Copy Markdown
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@pettinarip pettinarip merged commit b96b850 into dev May 14, 2026
14 checks passed
@pettinarip pettinarip deleted the feat/design-system-skill branch May 14, 2026 15:52
@pettinarip pettinarip mentioned this pull request May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📖 Change or add documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants