add-design-tool
Add a new interactive design tool under /tools (like the color converter or contrast checker) — component, page, navigation, route lists, SEO, and tests. Use when building a new utility tool.
SKILL.md.claude/skills/add-design-tool/SKILL.md
GitHubAdd a design tool: $ARGUMENTS
- Logic first: put pure logic (color math, parsing, generation) in
app/utils/(e.g. extendcolorConversion.ts/colorPalettes.ts) and unit test it intests/unit/utils/. Components stay thin. - Component:
app/components/tools/<PascalName>.vue→ auto-imported as<Tools<PascalName>>. FollowContrastChecker.vue/ColorConverter.vue: Nuxt UI inputs,useColorCopy()for copy-to-clipboard toasts,usePickerHex()forUColorPickerbindings, semantic tokens for styling, labelled controls. - Page:
app/pages/tools/<slug>.vuefollowscontrast-checker.vue. It reads its label and description fromTOOL_CATEGORIES, registersuseSchemaOrg([defineSoftwareApp(...)]), and rendersUPageHeaderplus the component. Title and meta tags come from the default layout viaseoDescriptions.ts. - Navigation: add an item to
TOOL_CATEGORIESinapp/utils/navigation/tools.ts. - Routes: add the path to
TOOL_ROUTESinshared/constants/routes.ts(prerendered, and ISR in production). - SEO: add
PAGE_DESCRIPTIONS["/tools/<slug>"]inapp/utils/seoDescriptions.ts. - Theme integration (optional): tools that produce a theme can apply it through the parent editor by posting
MSG.APPLY_AI_THEMEwith a validated config (seePaletteGenerator.vue). - Tests: component tests in
tests/unit/components/tools/(mount withmountWithUAppif the tool uses tooltips). - Verify with
/run-app(keyboard-only pass: every control reachable and labelled), then/dev-workflow.