add-learn-article
Write and register a new Learning Hub article (Nuxt Content markdown under content/learn) with valid frontmatter, navigation entry, route list entry, and accurate product details. Use when adding or s
SKILL.md.claude/skills/add-learn-article/SKILL.md
GitHubAdd a learn article: $ARGUMENTS
- File:
content/learn/<category>/<slug>.md, where category is one oftheming,components,tailwind,best-practices(enforced bycontent.config.ts). - Frontmatter (validated by the
learncollection schema):--- title: "…" description: "…" # also used for SEO and cards category: theming format: guide # guide | reference | tip date: "YYYY-MM-DD" order: 10 # sort order within the category tags: [colors, dark-mode] featured: false --- - Writing: follow the
document-writerskill (active voice, present tense, task-focused headings). Use MDC components the other articles already use. Code samples must match the current Nuxt UI v4 / Tailwind v4 APIs and this app's export format (useThemeExport). - Accuracy: derive palette, font, shade, and radius lists from
shared/constants/theme.tsrather than memory. Describe editor controls as they exist inapp/components/editor/. - Register:
- Add an item to
LEARN_CATEGORIESinapp/utils/navigation/learn.ts. - Add the route to
LEARN_ROUTESinshared/constants/routes.ts(sitemap + prerender;tests/unit/shared/routes.test.tschecks nav ↔ routes).
- Add an item to
- Verify:
pnpm vitest run tests/unit/shared/routes.test.ts, then/run-app→/learn/<category>/<slug>renders, the TOC works, and links resolve.