Skip to content

Commit 889e080

Browse files
sjnimsclaude
andauthored
docs(skill-development): add allowed-tools optional frontmatter documentation (#42)
## Summary Add documentation for the optional `allowed-tools` frontmatter field that allows skills to restrict which tools Claude can use when the skill is active. ## Problem Fixes #39 The official Claude Code documentation includes an `allowed-tools` frontmatter field for skills, but the skill-development skill didn't document this optional feature. Users creating skills didn't know about this option for restricting tool access. ## Solution Added documentation to SKILL.md explaining the `allowed-tools` feature: - New "Optional Frontmatter Fields" section after "SKILL.md (required)" - YAML example showing proper syntax - Use cases (read-only skills, security-sensitive workflows, limited scope) - Updated validation checklist with optional allowed-tools check ### Alternatives Considered 1. **Add to references file** - Rejected because this is a core frontmatter feature that belongs in the main SKILL.md, not detailed reference material 2. **Just link to official docs** - Rejected because external links may break and doesn't provide enough context ## Changes - `plugins/plugin-dev/skills/skill-development/SKILL.md`: +23 lines - Added "Optional Frontmatter Fields" section with `allowed-tools` documentation - Added optional check in validation checklist ## Testing - [x] Linting passes (markdownlint) - [x] Documentation follows existing patterns - [x] Example uses correct YAML syntax --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent a061ee8 commit 889e080

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

  • plugins/plugin-dev/skills/skill-development

plugins/plugin-dev/skills/skill-development/SKILL.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,28 @@ skill-name/
4242

4343
**Metadata Quality:** The `name` and `description` in YAML frontmatter determine when Claude will use the skill. Be specific about what the skill does and when to use it. Use the third-person (e.g. "This skill should be used when..." instead of "Use this skill when...").
4444

45+
#### Optional Frontmatter Fields
46+
47+
##### allowed-tools
48+
49+
Optionally restrict which tools Claude can use when the skill is active:
50+
51+
```yaml
52+
---
53+
name: code-reviewer
54+
description: Review code for best practices...
55+
allowed-tools: Read, Grep, Glob
56+
---
57+
```
58+
59+
Use `allowed-tools` for:
60+
61+
- Read-only skills that shouldn't modify files
62+
- Security-sensitive workflows
63+
- Skills with limited scope
64+
65+
When specified, Claude can only use the listed tools without needing permission. If omitted, Claude follows the standard permission model.
66+
4567
#### Bundled Resources (optional)
4668

4769
##### Scripts (`scripts/`)
@@ -176,6 +198,7 @@ Before finalizing a skill:
176198

177199
- [ ] SKILL.md file exists with valid YAML frontmatter
178200
- [ ] Frontmatter has `name` and `description` fields
201+
- [ ] (Optional) `allowed-tools` field if restricting tool access
179202
- [ ] Markdown body is present and substantial
180203
- [ ] Referenced files actually exist
181204

0 commit comments

Comments
 (0)