component-doc-page

Creates documentation pages for design system components on a Next.js website.

1|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/robritacca-dotcom/design-system --skill component-doc-page-robritacca-dotcom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-doc-page
Source: https://github.com/robritacca-dotcom/design-system/tree/main/.claude/skills/component-doc-page
Command: npx skills add https://github.com/robritacca-dotcom/design-system --skill component-doc-page-robritacca-dotcom

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing a documentation page for a design system component by hand means replicating layout conventions, wiring navigation, and keeping metadata in sync across the sidebar, sitemap, and breadcrumbs. This Skill automates that entire workflow so every component page matches the established quality benchmark. ## Core Features & Use Cases - Variant showcase generation: Reads the component's TypeScript props and variant enumerations to build a full variant-by-state showcase grid, using the Button page as the structural benchmark. - Complete page scaffolding: Writes all three required files (page.tsx, page.module.css, layout.tsx) with registry-derived metadata, correct package imports, and content that follows the content-design.md style rules. - Registry-driven navigation: Sidebar, sitemap, breadcrumbs, and page titles all derive from the component registry, so no navigation wiring is needed; only the ComponentPreviews entry is added by hand. - Use Case: Ask to document the Combobox component on the website, and the Skill reads its props, mirrors the Button page structure, generates the showcase grid, and produces a build-passing docs page. ## Quick Start Document the Combobox component on the website with a full variant showcase page.

Frequently Asked Questions about component-doc-page

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a documentation page for a design system component?

Invoke the skill with a phrase like "document [X] on the website". It reads the component's TypeScript props, mirrors the Button page structure, and writes page.tsx, page.module.css, and layout.tsx under website/src/app/components/<slug>/.

How do I add a component to the docs site sidebar and sitemap?

You do not edit navigation files by hand. The sidebar, sitemap, mega-nav, and breadcrumbs all derive from the component's entry in src/components/registry.json, so registering the component there is the only step required.

Does the component docs page support interactive or streaming demos?

Yes. For components whose value is interaction or streaming state, such as the ai category, the skill follows the chat-message page exemplar: a "use client" page with small stateful demos instead of a static variant grid.

Why does the website build fail after creating a component page?

Builds fail if layout.tsx does not call componentPageMetadata with the slug, if the slug has no registry entry, or if the ComponentPreviews entry is missing. The validate-page-titles and validate-website-surfaces scripts enforce these rules.

Can I import components from relative src paths in docs pages?

No. Pages must import through the published package, for example @robr0/design-system/components/X/X, because the website is an npm-workspace consumer of the package's exports. Relative imports into src/ are not allowed.