.agents/skills/writing-component-docs/SKILL.md
Write and review component documentation (MDX) and registry descriptions. Covers doc structure, description writing, and Features sections. Use when creating new component docs, updating descriptions, adding Features sections, or reviewing component documentation quality.
npx skillsauth add DevNagi31/dev-portfolio 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, and Features sections.
src/features/blog/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://devnagi.com/images/blog/{component-name}.webp
category: components
icon: {component-name}
createdAt: YYYY-MM-DD
updatedAt: YYYY-MM-DD
---
<ComponentPreview name="{component-name}-demo" />
## Features (optional -- skip if component is self-explanatory)
## Installation
## Usage
## 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.
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: "devnagi <[email protected]>",
// ...
}
When creating or updating a component doc:
## Features is needed (non-obvious capabilities).development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
development
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture.
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".