haxtheweb/haxcms-php/hax-design-system
Claude Code and agent skill by haxtheweb/haxcms-php
- community
Checking that the SKILL.md file is still in the repository.
Apply the DDD (Design, Develop, Destroy) design system and manage SimpleColors legacy usage. Use when styling components, auditing CSS for DDD compliance, migrating from SimpleColors, or creating new themes in the HAX ecosystem.
Install
npx vskill@latest install haxtheweb/haxcms-php/hax-design-systemSKILL.md
HAX Design System
Apply the DDD (Design, Develop, Destroy) design system and manage SimpleColors legacy usage.
When to Use
- Styling a new or existing web component
- Auditing CSS for DDD compliance
- Migrating SimpleColors usage to DDD tokens
- Creating or updating HAXcms themes
- Ensuring dark mode compliance across components
- Building or restyling an admin surface: site admin sections, outline-designer, revisions, reports, system admin, editor chrome (use HAX UI, below)
How It Works
- Import DDD: Always import
import '@haxtheweb/d-d-d/d-d-d.js'and extendDDDdirectly (neverDDD(LitElement)). - Use DDD Tokens: Apply DDD CSS custom properties for all styling:
--ddd-font-primary,--ddd-font-secondary,--ddd-font-navigationfor typography--ddd-font-size-*(6xs, 5xs, 4xs, 3xs, xxs, xs, s, ms, m, ml, l, xl, xxl, 3xl, 4xl; type1-s/m/l) for font sizes--ddd-font-weight-*(light, regular, medium, bold, black) for weights--ddd-spacing-*(0-30, 4px steps) for margins, padding, gaps--ddd-radius-*(0, xs, sm, md, lg, xl, rounded, circle) for border radius--ddd-theme-default-*,--ddd-primary-*(0-25) and--ddd-accent-*(0-14) for colors; components read--ddd-theme-primary/--ddd-theme-accent--ddd-border-*(xs-lg) for borders,--ddd-boxShadow-*for elevation,--ddd-icon-*for icon sizes--ddd-breakpoint-*for responsive breakpoints (write the px literally in@media)
- SimpleColors Fallback: Use SimpleColors only when DDD does not provide the needed color variation. 19 hues with 12 shades each (1-12);
default-themevariables flip in dark mode,fixed-themevariables do not. - Audit: Verify token usage, consistency across breakpoints, accessibility contrast, and performance (minimal custom CSS beyond tokens).
- Dark Mode: Check dark mode compliance when auditing elements. Ensure color combinations maintain proper contrast ratios.
Implementation Patterns
Admin Surfaces (HAX UI)
HAX UI is the admin layer of DDD. Decide first which layer a surface needs:
- A site visitor can see it (authored content, HAX blocks, themes, menus, footers): DDD content, as above.
- Only a signed-in editor sees it and it changes settings or data (site admin and its sections, outline-designer, revisions, reports, system admin, editor chrome as it is updated): HAX UI.
Applying HAX UI:
- Spread
HaxUiAdminTokensandHaxUiAdminPrimitivesfrom@haxtheweb/hax-body/lib/hax-ui-styles.jsand style with--hax-ui-*only: 14px text (--hax-ui-admin-font-size), 32px rows and controls (--hax-ui-row-height),--hax-ui-surface/--hax-ui-text/--hax-ui-line/--hax-ui-hover/--hax-ui-selected/--hax-ui-accent-strong/--hax-ui-focus. No raw hex, no--ddd-font-size-*, no SimpleColors. - In site or system admin, build a section for the one admin dialog: no titlebar, no Save button. Report unsaved changes, and let the shell's action bar stage the save (Save lights up with a count; leaving with changes asks first).
- Reuse the patterns before inventing: 32px buttons with words beside icons, one primary per bar, segmented controls, filter chips, switches,
.hax-ui-pill, outline-designer's row states, field rows (label and help left, 40px control right), one-line callouts, empty states. - A value the layer lacks is added to
HaxUiAdminTokens, mapped to DDD, before use. Proposed tokens (titlebar, sunken, primary, warning, info) are written as their DDD value with a comment naming the token. - Check light, dark and forced colours, keyboard use, and widths down to 360px, then run
hax-pattern-library-audit, which grades thecontract-admin-*contracts.
Full guide, token tables and patterns: `hax-ui-admin.md`, also the HAX UI section and the HAX UI admin cards of the DDD Design System artifact. outline-designer is the reference implementation.
SimpleColors Migration
When encountering legacy SimpleColors usage:
- Identify the SimpleColors variable being used
- Check if DDD provides an equivalent token
- Replace with DDD token if available
- Document remaining SimpleColors dependencies
- Plan gradual migration to DDD tokens
References
- For complete DDD token reference:
references/ddd-tokens.md - For SimpleColors to DDD mapping:
references/simplecolors-migration.md - Both are generated from the webcomponents source by
scripts/generate-ddd-references.js; re-run it after DDD or SimpleColors change rather than editing them by hand.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.well-known/agent-skills/hax-design-system/SKILL.md
Popularity
- Repository stars
- 130
- Repository forks
- 58
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/haxtheweb/haxcms-php/hax-design-system)