npx skills add ...
npx skills add ruvnet/ruflo --skill skill-builder
Create new Claude Code Skills with proper YAML frontmatter, progressive disclosure structure, and complete directory organization. Use when you need to build custom skills for specific workflows, generate skill templates, or understand the Claude Skills specification.
npx skills add ruvnet/ruflo --skill skill-builder
Creates production-ready Claude Code Skills with proper YAML frontmatter, progressive disclosure architecture, and complete file/folder structure. This skill guides you through building skills that Claude can autonomously discover and use across all surfaces (Claude.ai, Claude Code, SDK, API).
Every SKILL.md must start with YAML frontmatter containing exactly two required fields:
name (REQUIRED):
description (REQUIRED):
Critical: Only name and description are used by Claude. Additional fields are ignored.
IMPORTANT: Skills MUST be directly under ~/.claude/skills/[skill-name]/.
Claude Code does NOT support nested subdirectories or namespaces!
Personal Skills (available across all projects):
~/.claude/skills/ or $HOME/.claude/skills/Project Skills (team-shared, version controlled):
.claude/skills/ in project rootClaude Code uses a 3-level progressive disclosure system to scale to 100+ skills without context penalty:
Loaded: At Claude Code startup, always Size: ~200 chars per skill Purpose: Enable autonomous skill matching Context: Loaded into system prompt for ALL skills
Loaded: When skill is triggered/matched Size: ~1-10KB typically Purpose: Main instructions and procedures Context: Only loaded for ACTIVE skills
Loaded: On-demand as Claude navigates Size: Variable (KB to MB) Purpose: Deep reference, examples, schemas Context: Loaded only when Claude accesses specific files
Benefit: Install 100+ skills with ~6KB context. Only active skill content (1-10KB) enters context.
Expected output:
Symptoms: What you see Cause: Why it happens Solution: How to fix
Solution: Steps to resolve
See API_REFERENCE.md
See examples/
Include Trigger Conditions:
Be Specific:
Keep Level 1 Brief (Overview):
Level 2 for Common Paths (Quick Start):
Level 4 for Edge Cases (Reference):
Purpose: Executable scripts that Claude can run
Location: scripts/ in skill directory
Usage: Referenced from SKILL.md
Example:
Reference from SKILL.md:
Validate your configuration:
Reference from SKILL.md:
See working examples in resources/examples/:
basic-example/ - Simple componentadvanced-example/ - With hooks and context[Instructions]
[Instructions]
[Instructions]
Edit config.json:
[Steps for 80% use case]
[Steps for complex scenarios]
scripts/setup.sh - Initial setupscripts/generate.sh - Code generationscripts/validate.sh - Validationresources/templates/resources/examples/[Common issues and solutions]
Expected output:
Edit config.json:
[Detailed steps]
[Main procedures]
[Integration steps]
See CI/CD Guide
| Script | Purpose | Usage |
|---|---|---|
install.sh | Install dependencies | ./scripts/install.sh |
generate.sh | Generate code | ./scripts/generate.sh [name] |
validate.sh | Validate output | ./scripts/validate.sh |
deploy.sh | Deploy to environment | ./scripts/deploy.sh [env] |
resources/templates/basic.template - Basic templateresources/templates/advanced.template - Advanced templateresources/examples/basic/ - Simple exampleresources/examples/advanced/ - Complex exampleresources/examples/integration/ - Integration exampleresources/schemas/config.schema.json - Configuration schemaresources/schemas/output.schema.json - Output validationSymptoms: Error during install.sh
Cause: Missing dependencies
Solution:
Symptoms: Validation script fails Solution: See Troubleshooting Guide
Complete API documentation: API_REFERENCE.md
Created: 2025-10-19 Category: Advanced Difficulty: Intermediate Estimated Time: 15-30 minutes
Edit sections in resources/templates/sections/ before generating.
Edit generated files in src/components/ComponentName/
See resources/templates/ for available component templates.
---
name: "Skill Name" # REQUIRED: Max 64 chars
description: "What this skill does # REQUIRED: Max 1024 chars
and when Claude should use it." # Include BOTH what & when
------
# ✅ CORRECT: Simple string
name: "API Builder"
description: "Creates REST APIs with Express and TypeScript."
# ✅ CORRECT: Multi-line description
name: "Full-Stack Generator"
description: "Generates full-stack applications with React frontend and Node.js backend. Use when starting new projects or scaffolding applications."
# ✅ CORRECT: Special characters quoted
name: "JSON:API Builder"
description: "Creates JSON:API compliant endpoints: pagination, filtering, relationships."
# ❌ WRONG: Missing quotes with special chars
name: API:Builder # YAML parse error!
# ❌ WRONG: Extra fields (ignored but discouraged)
name: "My Skill"
description: "My description"
version: "1.0.0" # NOT part of spec
author: "Me" # NOT part of spec
tags: ["dev", "api"] # NOT part of spec
---~/.claude/skills/ # Personal skills location
└── my-skill/ # Skill directory (MUST be at top level!)
└── SKILL.md # REQUIRED: Main skill file~/.claude/skills/
└── my-skill/ # Top-level skill directory
├── SKILL.md # REQUIRED: Main skill file
├── README.md # Optional: Human-readable docs
├── scripts/ # Optional: Executable scripts
│ ├── setup.sh
│ ├── validate.js
│ └── deploy.py
├── resources/ # Optional: Supporting files
│ ├── templates/
│ │ ├── api-template.js
│ │ └── component.tsx
│ ├── examples/
│ │ └── sample-output.json
│ └── schemas/
│ └── config-schema.json
└── docs/ # Optional: Additional documentation
├── ADVANCED.md
├── TROUBLESHOOTING.md
└── API_REFERENCE.md~/.claude/skills/
└── [your-skills]/<project-root>/.claude/skills/
└── [team-skills]/---
name: "API Builder" # 11 chars
description: "Creates REST APIs..." # ~50 chars
---
# Total: ~61 chars per skill
# 100 skills = ~6KB context (minimal!)# API Builder
## What This Skill Does
[Main instructions - loaded only when skill is active]
## Quick Start
[Basic procedures]
## Step-by-Step Guide
[Detailed instructions]# In SKILL.md
See [Advanced Configuration](docs/ADVANCED.md) for complex scenarios.
See [API Reference](docs/API_REFERENCE.md) for complete documentation.
Use template: `resources/templates/api-template.js`
# Claude will load these files ONLY if needed# ✅ GOOD: Clear "when" clause
description: "Debug React performance issues using Chrome DevTools. Use when components re-render unnecessarily, investigating slow updates, or optimizing bundle size."
# ❌ BAD: No trigger conditions
description: "Helps with React performance debugging."# ✅ GOOD: Specific technologies
description: "Create Express.js REST endpoints with Joi validation, Swagger docs, and Jest tests. Use when building new APIs or adding endpoints."
# ❌ BAD: Too generic
description: "Build API endpoints with proper validation and testing."## What This Skill Does
Creates production-ready React components with TypeScript, hooks, and tests in 3 steps.node scripts/validate.js config.json{
"option1": "value1",
"option2": "value2"
}./scripts/quickstart.sh✓ Setup complete
✓ Configuration validated
→ Ready to use{
"mode": "production",
"features": ["feature1", "feature2"]
}./scripts/generate.sh --template custom./scripts/batch.sh --input data.json# Install prerequisites
npm install -g required-package
./scripts/install.sh --force./scripts/generate-component.sh ComponentName