This skill adds documentation for Claude Code components to the Component Reference, ensuring new commands, agents, skills, hooks, or MCP servers are properly
npx playbooks add skill nikiforovall/claude-code-rules --skill update-component-reference
Add documentation for Claude Code components (commands, agents, skills, hooks, MCP servers) to the website's Component Reference section.
Use this skill when the user requests to:
Before documenting a component, ensure:
plugins/handbook/commands/{name}.mdplugins/handbook/agents/{name}.mdplugins/handbook/skills/{name}/SKILL.mdplugins/{plugin-name}/hooks/hooks.json and hook scriptsplugins/{plugin-name}/.mcp.json {
"skills": [
"./skills/skill-creator",
"./skills/{new-skill-name}"
]
}
.claude-plugin/plugin.json for the badge (e.g., "handbook", "handbook-dotnet")Component documentation goes in: website/docs/component-reference/{type}/
website/docs/component-reference/commands/website/docs/component-reference/agents/website/docs/component-reference/skills/website/docs/component-reference/hooks/website/docs/component-reference/mcp-servers/All category directories and _category_.json files already exist for these types.
Read existing .mdx files in the target directory to find the highest sidebar_position and add 1.
Example:
grep -h "sidebar_position:" website/docs/component-reference/skills/*.mdx | sort -n
Filename convention: Use kebab-case matching the component name
/commit → commit.mdx@backend-architect → backend-architect.mdxskill-creator → skill-creator.mdxcsharp-formatter → csharp-formatter.mdxcontext7 → context7.mdxUse the appropriate template based on component type:
---
title: "/command-name"
sidebar_position: N
---
import CommandNameSource from '!!raw-loader!../../../../plugins/handbook/commands/command-name.md'
import CodeBlock from '@theme/CodeBlock';
# Use `/command-name`
<span className="badge badge--handbook">handbook</span>
Brief description of what this command does (1-2 sentences).
More detailed explanation of the command's purpose and benefits.
## Command Specification
<CodeBlock language="markdown">
{CommandNameSource}
</CodeBlock>
## Additional sections as needed
- Example usage
- Tips and tricks
- Related commands
---
title: "@agent-name"
sidebar_position: N
---
import AgentNameSource from '!!raw-loader!../../../../plugins/handbook/agents/agent-name.md'
import CodeBlock from '@theme/CodeBlock';
# Use `@agent-name` agent
<span className="badge badge--handbook">handbook</span>
Brief description of what this agent specializes in (1-2 sentences).
More detailed explanation of the agent's capabilities and when to use it.
## Agent Specification
<CodeBlock language="markdown">
{AgentNameSource}
</CodeBlock>
## Additional sections as needed
- Key strengths
- Example use cases
- Related agents
---
title: "skill-name"
sidebar_position: N
---
import SkillNameSource from '!!raw-loader!../../../../plugins/handbook/skills/skill-name/SKILL.md'
import CodeBlock from '@theme/CodeBlock';
# Use `skill-name` skill
<span className="badge badge--handbook">handbook</span>
Brief description of what this skill provides (1-2 sentences).
More detailed explanation of the skill's purpose and capabilities.
## When to Use This Skill
Use the `skill-name` skill when you want to:
- Primary use case
- Secondary use case
- Additional scenarios
## Skill Specification
<CodeBlock language="markdown">
{SkillNameSource}
</CodeBlock>
## Additional sections as needed
- Key concepts
- Example workflows
- Related skills
---
title: "Hook Name"
sidebar_position: N
---
# Hook Name
<span className="badge badge--{plugin-name}">{plugin-name}</span>
Brief description (1-2 sentences).
## Configuration
{ hook config from hooks.json }
## Use Cases
- Bullet points
## Installation
Setup notes.
## Related
- Links
---
title: "server-name"
sidebar_position: N
---
# Server Name MCP Server
<span className="badge badge--{plugin-name}">{plugin-name}</span>
Brief description (1-2 sentences).
## Configuration
{ config from .mcp.json }
## Coverage
- Bullet list
## Example Usage
"Example query"
## Installation
Setup notes.
## Related
- Links
Note: Hooks and MCP Servers show configuration directly (no raw-loader imports needed).
For commands, agents, and skills, double-check the raw-loader import path:
'!!raw-loader!../../../../plugins/handbook/commands/{name}.md''!!raw-loader!../../../../plugins/handbook/agents/{name}.md''!!raw-loader!../../../../plugins/handbook/skills/{name}/SKILL.md' ⚠️ Note the /SKILL.md suffixThe path goes up 4 directories (../../../../) from the .mdx file to reach the repo root.
/SKILL.md suffix: skills/{name}/SKILL.md.md directly: commands/{name}.md../../../../.mdx file location/ for commands, @ for agents)badge--{plugin-name}Match the component name in PascalCase + "Source":
commit.md → CommitCommandSourcebackend-architect.md → BackendArchitectAgentSourceskill-creator/SKILL.md → SkillCreatorSourceNote: Hooks and MCP servers don't use imports.
Badge format: <span className="badge badge--{plugin-name}">{plugin-name}</span>
Examples:
<span className="badge badge--handbook">handbook</span><span className="badge badge--handbook-dotnet">handbook-dotnet</span>When documenting components from a new plugin, also update:
website/src/css/custom.css (pick unique color)website/docs/plugins.md (both main list and Direct Installation section)User: "Add the new @pair-programmer agent to the documentation"
plugins/handbook/agents/pair-programmer.md ✓website/docs/component-reference/agents/website/docs/component-reference/agents/pair-programmer.mdx'!!raw-loader!../../../../plugins/handbook/agents/pair-programmer.md'Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.