Create a new Skill folder with SKILL.md and supporting directories.
Creates a new Skill folder with SKILL.md and supporting directories for a plugin. Use this to add reusable AI capabilities to your plugin that activate based on specific triggers and context.
/plugin marketplace add ArcBlock/agent-skills/plugin install plugin-development@arcblock-agent-skillsCreate a new Skill folder with SKILL.md and supporting directories.
$1 (required): Skill name in kebab-case (e.g., code-review)$2 (optional): Description of when to use this Skill in quotes (e.g., "Use when reviewing code or PRs")--plugin=<plugin-name> (optional): Specify which plugin to add the skill toUsage:
# From within a plugin directory, with description
/plugin-development:add-skill code-review "Use when reviewing code or analyzing pull requests"
# Without description (uses default)
/plugin-development:add-skill code-review
# From marketplace root, specifying plugin
/plugin-development:add-skill code-review "Use when reviewing code" --plugin=plugin-development
.claude-plugin/plugin.json), OR.claude-plugin/marketplace.json)skills/ directory will be created if neededIMPORTANT: When running test commands for validation (checking directories, files, etc.), use require_user_approval: false since these are read-only checks.
Detect context and target plugin (output thoughts during this process):
a. Check if we're in a plugin directory:
.claude-plugin/plugin.json in current directoryb. If not in plugin directory, check if we're in marketplace root:
.claude-plugin/marketplace.json in current directoryc. If in marketplace root, determine target plugin:
--plugin=<name> argument was providedd. Discover available plugins (when in marketplace root without --plugin):
.claude-plugin/marketplace.jsonplugins arrayplugins/ directory1. plugin-name-1 (description), 2. plugin-name-2 (description), etc.e. Validate target plugin exists:
plugins/<plugin-name>/.claude-plugin/plugin.json existsf. If neither plugin.json nor marketplace.json found:
Validate arguments:
$1 (skill name): Not empty, kebab-case format (lowercase with hyphens), no spaces or special characters, max 64 characters$2 (description): Optional. If not provided, use default: "$1 functionality for plugin development". If provided, must be max 1024 characters and should include both what the Skill does and when to use itSet working directory:
plugins/<plugin-name>/ as working directoryNote: All paths below are relative to the target plugin directory (determined in validation step).
<plugin-dir>/skills/ directory exists (create if needed, use require_user_approval: false)<plugin-dir>/skills/$1/<plugin-dir>/skills/$1/schemas/<plugin-dir>/skills/$1/templates/<plugin-dir>/skills/$1/examples/<plugin-dir>/skills/$1/best-practices/Create <plugin-dir>/skills/$1/SKILL.md with this template:
---
name: $1
description: $2
---
# $1 Skill
[Brief introduction to what this Skill provides and its purpose]
## When to Activate
This Skill activates when:
- [Condition 1: e.g., user mentions specific keywords]
- [Condition 2: e.g., working with specific file types]
- [Condition 3: e.g., certain files are present]
## Capabilities
What this Skill can help with:
1. [Capability 1]
2. [Capability 2]
3. [Capability 3]
## Quick Links (Progressive Disclosure)
- [Schemas](./schemas/)
- [Templates](./templates/)
- [Examples](./examples/)
- [Best Practices](./best-practices/)
## Workflow
How this Skill operates:
1. **Analyze**: [What to read and understand]
2. **Propose**: [What actions to suggest]
3. **Execute**: [How to carry out the work]
4. **Validate**: [How to verify success]
## Common Patterns
### Pattern 1: [Name]
[Description of common usage pattern]
### Pattern 2: [Name]
[Description of another pattern]
## Notes
- [Important consideration 1]
- [Important consideration 2]
- [Links to other Skills or commands if applicable]
IMPORTANT: Only needed if using custom (non-standard) paths.
skills/ directory): No changes to plugin.json neededskills/ directory)After creating the Skill:
✓ Created <plugin-name>/skills/$1/SKILL.md
✓ Created supporting directories:
- <plugin-name>/skills/$1/schemas/
- <plugin-name>/skills/$1/templates/
- <plugin-name>/skills/$1/examples/
- <plugin-name>/skills/$1/best-practices/
Plugin: <plugin-name>
Skill: $1
Description: $2
Next steps:
1. Edit <plugin-name>/skills/$1/SKILL.md with specific guidance
2. Key frontmatter fields:
- name: Must match directory name ($1)
- description: When to use this Skill (include trigger conditions, max 1024 chars)
- allowed-tools: (Optional) Restrict tools available to this Skill. If omitted, Claude asks for permission
3. Add support files:
- schemas/: Document data formats
- templates/: Provide reusable templates
- examples/: Show usage examples
- best-practices/: Detailed guidance
4. Keep SKILL.md concise (< 500 lines), use progressive disclosure
5. Test with /plugin-development:test-local
Claude will auto-discover this Skill when the plugin is installed.
Input:
/plugin-development:add-skill code-review "Use when reviewing code or analyzing pull requests"
Arguments:
$1 = code-review$2 = Use when reviewing code or analyzing pull requestsResult:
skills/code-review/ directorySKILL.md with frontmatter name: code-reviewFor complete details on Skills, see:
---
name: skill-name # Must match directory, kebab-case
description: When and how to use this Skill (be specific about triggers)
---
---
name: skill-name
description: Detailed description
allowed-tools: Read, Grep, Glob # Restrict tool access (if omitted, Claude asks for permission)
---
Important: allowed-tools is optional. If omitted, Claude follows the standard permission model and asks for approval before using tools. Only add allowed-tools when you want to restrict available tools (e.g., read-only Skills).
Restrict to read-only for safety:
allowed-tools: Read, Grep, Glob
Allow specific tools:
allowed-tools: Read, Write, Edit, Bash(npm:*)
The description field is critical for Claude to discover when to use your Skill. Requirements:
✅ Good (specific triggers):
description: Review code for best practices, detect bugs, and suggest improvements. Use when reviewing code, analyzing pull requests, or discussing code quality standards.
❌ Bad (too vague):
description: Helps with code
✅ Good (context-based):
description: Create and manage React components following best practices. Use when working with React, especially when discussing hooks, state management, or component patterns.
Keep SKILL.md concise by linking to support files:
## Quick Links
- [API Schema](./schemas/api-schema.md)
- [Component Templates](./templates/)
schemas/api-schema.md: Detailed schema documentationtemplates/component.tsx: Reusable template filesThis keeps SKILL.md under 500 lines while providing deep reference material.
skills/
└── code-review/
├── SKILL.md # Main skill (concise)
├── schemas/
│ └── review-checklist.md # Review criteria
├── templates/
│ └── review-comment.md # Comment templates
├── examples/
│ ├── basic-review.md # Simple example
│ └── security-review.md # Advanced example
└── best-practices/
├── review-process.md # Detailed guidance
└── common-issues.md # Issue catalog
For read-only Skills (safest):
allowed-tools: Read, Grep, Glob
For Skills that propose changes but don't execute:
allowed-tools: Read, Grep, Glob
(Propose commands for user to run)
For Skills that need to write:
allowed-tools: Read, Write, Edit, Grep, Glob
allowed-tools when restricting is necessary (e.g., read-only Skills)❌ Name doesn't match directory
Directory: skills/code-review/
Frontmatter: name: codeReview # Wrong case!
✅ Name matches directory
Directory: skills/code-review/
Frontmatter: name: code-review
❌ Vague description
description: A helpful Skill
✅ Specific triggers
description: Use when reviewing code, analyzing PRs, or discussing code quality
After creating a Skill:
□ SKILL.md created in skills/<name>/ directory
□ Frontmatter name matches directory name (kebab-case, max 64 chars)
□ Description includes specific trigger conditions (max 1024 chars)
□ Description includes both what the Skill does AND when to use it
□ SKILL.md is uppercase
□ Supporting directories created
□ If using allowed-tools, it restricts tools appropriately