This skill should be used when the user asks to "create a skill", "write a skill", "edit a skill", "update a skill", "improve skill description", "add skill to plugin", "organize skill content", "create SKILL.md", "skill frontmatter", "skill structure", "progressive disclosure", or needs guidance on skill development, validation, or best practices for Claude Code plugins and personal skills.
/plugin marketplace add OshanKHZ/oshankhz-claude-code/plugin install oshankhz-claude-code@oshankhz-claude-codeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Skills are modular packages that extend Claude's capabilities by providing specialized knowledge, workflows, and resources. Think of them as "onboarding guides" that transform Claude from a general-purpose agent into a specialized agent equipped with procedural knowledge.
Key capabilities:
Use this skill when:
Every skill consists of a required SKILL.md and optional bundled resources:
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter (name, description)
│ └── Markdown body (core instructions)
└── Bundled Resources (optional)
├── references/ - Detailed docs loaded as needed
├── examples/ - Working code examples
└── scripts/ - Utility scripts
Skills use three-level loading to manage context:
| Level | When Loaded | Size Limit | Content |
|---|---|---|---|
| Metadata | Always (startup) | ~100 words | name and description from frontmatter |
| Instructions | When triggered | <5k words (~1,500-2,000 words ideal) | SKILL.md body |
| Resources | As needed | Unlimited | references/, examples/, scripts/ |
Design principle: Keep SKILL.md lean. Move detailed content to references/.
Determine from context whether user wants to create or edit. If unclear, ask:
{
"questions": [
{
"question": "O que você quer fazer?",
"header": "Ação",
"multiSelect": false,
"options": [
{ "label": "Criar nova skill", "description": "Começar do zero" },
{ "label": "Editar skill existente", "description": "Atualizar uma skill que já existe" }
]
}
]
}
Then follow the appropriate workflow:
references/creating-skills.md for detailed creation processreferences/editing-skills.md for detailed editing processPrinciple: Don't ask what the user already said. Extract from context first, then ask only what's missing.
Always ask these two questions together:
{
"questions": [
{
"question": "Entendi que você quer uma skill para [RESUMO]. Correto?",
"header": "Confirmação",
"multiSelect": false,
"options": [
{ "label": "Sim, é isso!", "description": "Prosseguir com a criação" },
{ "label": "Quase, mas...", "description": "Vou explicar melhor" }
]
},
{
"question": "Qual a complexidade da skill?",
"header": "Estrutura",
"multiSelect": false,
"options": [
{ "label": "Simples", "description": "Só SKILL.md com instruções diretas" },
{ "label": "Média", "description": "SKILL.md + examples ou references" },
{ "label": "Completa", "description": "SKILL.md + references + examples + scripts" }
]
}
]
}
Conditional questions (only when needed):
~/.claude/skills/)Determine what goes where:
SKILL.md (always loaded when triggered):
references/ (loaded as needed):
examples/ (working code):
scripts/ (utilities):
Required fields:
---
name: skill-name
description: This skill should be used when the user asks to "specific trigger 1", "specific trigger 2", or mentions specific terms. Brief explanation of what it does.
---
Naming rules:
analyzing-code, writing-documentationDescription requirements:
Good example:
description: This skill should be used when the user asks to "create a hook", "add a PreToolUse hook", "validate tool use", or mentions hook events (PreToolUse, PostToolUse, Stop). Provides comprehensive hooks API guidance.
Bad examples:
description: Helps with hooks # Vague, not third person
description: Use this skill for hook development # Wrong person
description: I can help you create hooks # First person
Writing style:
Correct:
To create a hook, define the event type.
Configure the MCP server with authentication.
Validate settings before use.
Incorrect:
You should create a hook by defining the event type.
You need to configure the MCP server.
Add interactive patterns when needed:
If the skill helps create/configure something, include AskUserQuestion to gather requirements:
## Instructions
### Step 1: Gather Requirements
Use AskUserQuestion to understand what to create:
\`\`\`json
{
"questions": [
{
"question": "What should this do?",
"header": "Purpose",
"options": [...]
}
]
}
\`\`\`
### Step 2: Create Based on Answers
Based on user's selections, create the appropriate structure...
When to add: Skills for creating commands, hooks, configurations, or anything requiring user decisions
See: examples/interactive-workflow-example.md for complete patterns
Keep SKILL.md lean (1,500-2,000 words ideal, <5k max):
references/examples/scripts/Reference resources in SKILL.md:
## Additional Resources
### Reference Files
- **`references/patterns.md`** - Common patterns
- **`references/advanced.md`** - Advanced techniques
### Examples
- **`examples/basic-example.sh`** - Working example
CRITICAL: Always run automated validation after creating or editing a skill.
Execute the validation script:
bash ~/.claude/skills/skill-development/scripts/validate-skill.sh path/to/skill-name
The script automatically checks:
If validation fails:
Additional manual verification:
For plugin skills:
cc --plugin-dir /path/to/plugin
For personal/project skills:
Debug if needed:
claude --debug # See skill loading and activation logs
skill-name/
└── SKILL.md
skill-name/
├── SKILL.md
├── references/
│ └── detailed-guide.md
└── examples/
└── working-example.sh
skill-name/
├── SKILL.md
├── references/
│ ├── patterns.md
│ └── advanced.md
├── examples/
│ ├── example1.sh
│ └── example2.json
└── scripts/
└── validate.sh
Plugin skills live in plugin-name/skills/:
my-plugin/
├── .claude-plugin/
│ └── plugin.json
├── commands/
├── agents/
└── skills/
└── my-skill/
├── SKILL.md
├── references/
├── examples/
└── scripts/
Claude Code automatically:
skills/ directorySKILL.md# Test with --plugin-dir
cc --plugin-dir /path/to/plugin
# Verify skill loads and triggers correctly
DO:
analyzing-code not code-analyzer)DON'T:
For detailed processes and techniques, consult:
references/creating-skills.md - Complete skill creation process with AskUserQuestion patternsreferences/editing-skills.md - Detailed editing workflows and refactoring patternsreferences/best-practices.md - Validation rules, common mistakes, optimization techniquesStudy these skills as templates:
../hook-development/ - Progressive disclosure, utilities, complete structure../command-development/ - Clear critical concepts, good organization../sync-claude-md/ - Well-structured analysis skillTo create a skill:
mkdir -p skills/skill-name/{references,examples,scripts}To edit a skill:
Focus on strong trigger descriptions, progressive disclosure, and imperative writing style for effective skills that load when needed and provide targeted guidance.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.