.agents/skills/ncdai-writing-component-docs/SKILL.md
Write and review component documentation (MDX) and registry descriptions. Covers doc structure, description writing, Features, and Composition sections. Use when creating new component docs, updating descriptions, adding Features sections, adding Composition sections, or reviewing component documentation quality.
npx skillsauth add ncdai/chanhdai.com ncdai-writing-component-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guide for writing concise, consistent component documentation for this project's registry. Covers MDX doc structure, description writing, Features sections, and Composition sections.
src/features/doc/content/{component-name}.mdxsrc/registry/components/_registry.tsComponent docs follow this section order. Only include sections that are relevant.
---
title: Component Name
description: One concise sentence about what the component does.
image: https://assets.chanhdai.com/images/blog/{component-name}.webp
category: components
createdAt: YYYY-MM-DD
updatedAt: YYYY-MM-DD
---
<ComponentPreview name="{component-name}-demo" />
## Features (optional -- skip if component is self-explanatory)
## Installation
## Usage
## Composition (optional -- only for compound/composable components)
## API Reference (optional)
## Examples (optional)
## References (optional)
The description field appears in MDX frontmatter AND the registry item. Both must match.
Toggle between system, light, and dark themes in Next.js apps.
Animated text that cycles through items with a smooth flip transition.
Interactive slider inspired by the classic iPhone "slide to unlock" gesture.
Scrolling marquee to showcase user testimonials.
Display install commands with package manager switcher and copy button.
Copy text to clipboard with visual feedback and animation.
A React component for managing user consent for cookies and tracking in Next.js applications.
--> Too long, starts with "A React component for..."
Animated text component that cycles through items with a smooth flip transition built with Motion for React.
--> "component" is redundant, "built with Motion for React" is implementation detail
A sleek, interactive slider inspired by the classic iPhone OS "slide to unlock" gesture.
--> Starts with "A sleek", subjective adjective
Add ## Features when the component has non-obvious capabilities that the title, description, and preview alone cannot convey. Examples: multi-mode support, special interactions, keyboard navigation, persistence, composability.
Skip ## Features when the component is self-explanatory through its title + description + preview + usage. Examples: Theme Switcher, Shimmering Text, Apple Hello Effect.
## Features as the heading (not "About", not "Overview").## Features
- Content fades in and out smoothly as you scroll.
- Supports both vertical and horizontal scrolling.
## About
The Scroll Fade Effect component is built on top of CSS animation-timeline.
- 📱 Smooth scrolling fade effect
- 🎨 Customizable with Tailwind CSS
- ⚡️ Easy installation via shadcn CLI
Issues: wrong heading name, intro paragraph is unnecessary, emoji, "Easy installation" repeats Installation section.
Add ## Composition when the component uses a compound/composable pattern -- multiple sub-components that need to be assembled together in a specific tree structure. Examples: SlideToUnlock (track, handle, text), Testimonial (quote, author, avatar), GlowCardGrid (grid + cards).
Skip ## Composition when the component is a single element used with props alone, not composed from sub-components. Examples: CopyButton, ShimmeringText, ThemeSwitcher, TextFlip, MiddleTruncation.
## Composition as the heading.## Usage.Use the following composition to build a \{ComponentName}`.````text fenced code block for the tree.├──, └──, │.## Composition
Use the following composition to build a `SlideToUnlock`
\```text
SlideToUnlock
└── SlideToUnlockTrack
├── SlideToUnlockText
│ └── ShimmeringText
└── SlideToUnlockHandle
\```
## Composition
Use the following composition to build a `Testimonial`
\```text
Testimonial
├── TestimonialQuote
└── TestimonialAuthor
├── TestimonialAvatar
│ ├── TestimonialAvatarImg
│ └── TestimonialAvatarRing
├── TestimonialAuthorName
│ └── TestimonialVerifiedBadge
└── TestimonialAuthorTagline
\```
Each component in src/registry/components/_registry.ts must have a description field matching the MDX frontmatter:
{
name: "component-name",
type: "registry:component",
description: "Same one-sentence description as MDX frontmatter.",
title: "Component Name",
author: "ncdai <[email protected]>",
// ...
}
When creating or updating a component doc:
## Features is needed (non-obvious capabilities).## Composition is needed (compound/composable components).development
Classify blocks into appropriate categories (Marketing, Content, Application) and write concise, descriptive block descriptions. Use when creating new blocks, updating block metadata, or organizing the blocks registry.
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
testing
Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".