/hatch3r:hatch3r-design-system-detectfrom hatch3r
Detects existing design tokens, component libraries, and theming conventions before authoring UI primitives. Produces a concise inventory to prevent duplication.
Ships in hatch3r. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When an agent is about to author or modify UI, run this skill first to produce a Design System Inventory. Skip = the implementer may duplicate primitives or invent tokens that already exist. Embed the inventory in the implementation plan, PR description, or .audit-workspace/design-system-inventory.md for the current task before any UI code is written.
Task Progress:
- [ ] Step 0: Detect ambiguity (P8 B1)
- [ ] Step 1: Scan package.json for design-system signals
- [ ] Step 2: Locate token source
- [ ] Step 3: Map component library
- [ ] Step 4: Identify breakpoint and responsive strategy
- [ ] Step 5: Record findings (Design System Inventory)
Before any work, scan the invocation for unresolved questions in scope, intent, acceptance criteria, target environment, or irreversibility. If any are found, ask the user via the platform-native question tool per agents/shared/user-question-protocol.md. Do not proceed under silent assumption. Default path, not an exception. Triggers for THIS skill: project root path (monorepo subpackage vs root), canonical token source when multiple exist, primitive directory convention, responsive strategy expected (container-first vs media-first), and verdict authority (reuse vs extend vs create).
Fan-out scales with task size; token cost never justifies serializing independent work (rules/hatch3r-fan-out-discipline.md P8 B2; agents/shared/efficiency-patterns.md). Emit sub_agents_spawned: { count, rationale, task_structure } in your output.
Look for the following packages and record both presence and version:
@radix-ui/* or radix-ui (headless primitives, WAI-ARIA compliant)shadcn reference in components.json (source-in-repo registry)tailwindcss — note major version (v3 has tailwind.config.js; v4 uses @theme in CSS)@chakra-ui/*, @mui/material, @mui/joybootstrap, @headlessui/react, @base-ui-components/reactDetection command:
cat package.json | jq '.dependencies, .devDependencies | keys[]' | grep -iE 'radix|tailwind|chakra|mui|shadcn|headless|base-ui'
Output: a list of design-system packages with semver. If zero matches, record "no UI library detected — confirm with maintainer before scaffolding a new one."
Detection order (first match wins):
tokens.json at repo root or in src/, design/, tokens/ — check for $value/$type keys; DTCG 2025.10 conformance.@theme block in any *.css file (Tailwind v4) — rg -l '@theme\s*\{' --type css.src/styles/tokens.css or similar — CSS custom properties at :root.tailwind.config.{js,ts} theme.extend (Tailwind v3 fallback).figma.tokens.json, tokens-studio.json).For each source found, record:
@theme / CSS custom properties / Tailwind v3 config)If multiple sources exist, flag the duplication — DTCG mandates a single source of truth. The Design System Inventory must call out which source the implementer should treat as canonical.
Check components.json (shadcn registry config). Record: style, tailwind.config, aliases.components, aliases.ui.
Find component directories:
src/components/ui/* (shadcn convention)src/components/primitives/*app/components/* (Nuxt / Next.js app router)packages/ui/* (monorepo)Detection command:
fd -t d -E node_modules 'ui|primitives|components' src app packages 2>/dev/null | head -10
List the existing primitives by filename (Button, Input, Dialog, Card, Tooltip, ...). The implementer uses this list in Step 5 to decide reuse vs extend vs create.
Container queries (preferred for component-scoped responsiveness in 2026):
rg -l '@container' --type css
Media queries (viewport-scoped):
rg -o '@media\s*\([^)]+\)' --type css | sort -u | head -10
Breakpoint tokens: check --breakpoint-* custom properties or Tailwind screens config.
Record one of: container-query-first / media-query-first / mixed. A component-library project that ships @container-based primitives must not be extended with @media-only additions.
Produce a Design System Inventory block. Embed it in the implementation plan, PR description, or .audit-workspace/design-system-inventory.md:
Design System Inventory
-----------------------
Component library: <shadcn|Radix|MUI|Chakra|custom|none> (version X)
Token source: <file path> (<DTCG|@theme|CSS vars|Tailwind config>)
Color space: <OKLCH|Display-P3|hex>
Responsive strategy: <container-first|media-first|mixed>
Existing primitives: Button, Input, Dialog, ...
Verdict: <reuse|extend|create-with-justification>
| Situation | Action |
|---|---|
| Primitive exists, matches use case | Import + use directly |
| Primitive exists, doesn't quite fit | Extend via composition; do not fork |
| No primitive | Author new, add to ui/ directory, document in PR |
components.json present but src/components/ui/ empty: Project is shadcn-initialized but no primitives copied yet. Run npx shadcn@latest add <component> --dry-run to preview before authoring..audit-workspace/add, init, --dry-run, --diff, --view@theme block configuration:has(), anchor positioning, View Transitions baseline statusConsumer: commands/hatch3r-design-system-create.md — creation-side orchestrator; invokes this skill as its mandatory Step 1 and routes on the inventory verdict (reuse → halt, extend → gap-scoped, create → full generation).
Rules consumed by this skill:
rules/hatch3r-design-system-detection.md — rule version of this guidance (mandate + scope)rules/hatch3r-component-conventions.md — primitive composition + state patternsrules/hatch3r-theming.md — token layering (primitive → semantic → component)What SKILL.md sets; muted values are Claude Code's defaults
55 skills in this plugin
/hatch3r-a11y-auditRuns a WCAG AA accessibility audit with findings and fixes across 7 scan categories (keyboard, contrast, ARIA, reduced motion, screen reader, high contrast, automated axe). Use when auditing and remediating accessibility./hatch3r-adhoc-orchestrateScaffolds the ad-hoc Tier >= 2 orchestration protocol -- Per-Turn Pipeline-State Header, implementer delegation plan, End-of-Turn Delegation Attestation. Use for a multi-phase task with no registered command to avoid inline-implementation bypass mode./hatch3r-ai-featureEval-driven development workflow for shipping AI features — write eval before prompt, measure, iterate, ship with caching + cost telemetry + model fallback + hallucination SLI/hatch3r-api-specGenerates and validates OpenAPI specifications from codebase. Covers endpoint design, schema validation, and documentation generation./hatch3r-architecture-reviewEvaluates architectural decisions and produce ADRs following the project template. Use when making architectural decisions, evaluating trade-offs, or creating ADRs./hatch3r-board-groomOngoing backlog refinement for existing board items. Re-prioritize, reclassify, re-scope, archive stale items, decompose oversized issues, merge duplicates, refresh dependencies, and remediate board health findings.Claude Code refuses to install this plugin
.claude-plugin/plugin.json: commands: Invalid input, agents: Invalid string: must start with "./", agents: Invalid string: must end with ".md", skills: Invalid string: must start with "./", mcpServers: Invalid string: must start with "./"
.claude-plugin/plugin.json: commands: Invalid input, agents: Invalid string: must start with "./", agents: Invalid string: must end with ".md", skills: Invalid string: must start with "./", mcpServers: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Other plugins' skills for the same job