meta 技能排查
- 作者仓库星标 330
- 许可证 MIT
- 作者仓库 claude-skill-registry
Writing effective Claude Code skills
Required structure
skill-name/
├── SKILL.md (required)
├── reference.md (optional)
├── scripts/ (optional)
└── templates/ (optional)
SKILL.md frontmatter
---
name: lowercase-with-hyphens
description: Explain WHAT it does AND WHEN to use it. Include trigger terms users would say.
allowed-tools: [Read, Write, Bash] # optional: restrict permissions
---
Critical best practices
- Keep skills focused - one capability per skill
- Write specific descriptions - include actual terms users would mention
- Test activation - verify Claude invokes it when expected
- Use allowed-tools - restrict permissions for security
Description examples
❌ Bad: "Helps with data" ✅ Good: "Analyze Excel spreadsheets, generate pivot tables, create charts. Use when working with .xlsx files."
❌ Bad: "Manages configuration" ✅ Good: "Read and update YAML/JSON config files. Use when modifying settings, environment variables, or application configuration."
Debugging checklist
If Claude doesn't use your skill:
- Description lacks trigger terms users would say
- YAML syntax errors (check
---markers, indentation) - Description not specific enough about WHEN to use it
- Wrong file path or permissions
Finding and fixing frontmatter issues
Check if frontmatter exists:
# View first 10 lines of SKILL.md
head -10 ~/.claude/skills/*/SKILL.md
Common frontmatter problems:
- Missing frontmatter block - File starts with
#instead of---- Fix: Add YAML block at top of file
- Missing closing
---- Only one---marker- Fix: Ensure both opening and closing markers exist
- Missing required fields - No
name:ordescription:- Fix: Add both required fields
- Wrong indentation - YAML is indentation-sensitive
- Fix: Use 2 spaces, no tabs
- Missing description trigger terms - Generic description
- Fix: Add specific keywords users would say
Validation script:
# Check all skills for frontmatter
for skill in ~/.claude/skills/*/SKILL.md; do
echo "=== $skill ==="
if head -1 "$skill" | grep -q "^---$"; then
echo "✓ Has frontmatter"
else
echo "✗ Missing frontmatter"
fi
done
Systematic skill debugging workflow
When debugging skills that aren't working:
List all skills - Verify skill exists
ls -la ~/.claude/skills/Check frontmatter - Validate YAML structure
head -10 ~/.claude/skills/skill-name/SKILL.mdVerify required fields - Ensure name and description exist
name:must match directory namedescription:must include trigger terms
Test description specificity - Does it explain WHEN to use?
- Include file types, actions, or domain terms
- Avoid generic phrases like "helps with" or "manages"
Check allowed-tools - If restricted, verify needed tools included
allowed-tools: [Read, Write, Edit, Bash, Glob, Grep]Review content - Ensure instructions are clear and actionable
Skills vs slash commands
Use skills for:
- Complex workflows with multiple files
- Automatic contextual invocation
- Comprehensive capabilities
Use slash commands for:
- Simple single prompts
- Manual explicit control
- Quick frequently-used operations
- 流狐分类
- 数据
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @majiayu000 · MIT
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
# Description examples
❌ Bad: "Helps with data" ✅ Good: "Analyze Excel spreadsheets, generate pivot tables, create charts. Use when working with .xlsx files." ❌ Bad: "Manages configuration" ✅ Good: "Read and update YAML/JSON config files. Use when modifying settings, environment variables, or application configuration." Required structure
SKILL.md frontmatter
Keep skills focused - one capability per skill Write specific descriptions - include actual terms users would mention Test activation - verify Claude invokes it when expected
❌ Bad: "Helps with data" ✅ Good: "Analyze Excel spreadsheets, generate pivot tables, create charts. Use when working with .xlsx files." ❌ Bad: "Manages configuration"
If Claude doesn't use your skill: Description lacks trigger terms users would say YAML syntax errors (check --- markers, indentation)
Check if frontmatter exists: Common frontmatter problems: Missing frontmatter block - File starts with instead of ---
# Writing effective Claude Code skills
## Required structure
```
skill-name/
├── SKILL.md (required)
├── reference.md (optional)
├── scripts/ (optional)
└── templates/ (optional)
```
## SKILL.md frontmatter
```yaml
---
name: lowercase-with-hyphens
description: Explain WHAT it does AND WHEN to use it. Include trigger terms users would say.
allowed-tools: [Read, Write, Bash] # optional: restrict permissions
---
```
## Critical best practices
1. **Keep skills focused** - one capability per skill
2. **Write specific descriptions** - include actual terms users would mention
3. **Test activation** - verify Claude invokes it when expected
4. **Use allowed-tools** - restrict permissions for security
## Description examples
❌ Bad: "Helps with data"
✅ Good: "Analyze Excel spreadsheets, generate pivot tables, create charts. Use when working with .xlsx files."
❌ Bad: "Manages configuration"
✅ Good: "Read and update YAML/JSON config files. Use when modifying settings, environment variables, or application configuration."
## Debugging checklist
If Claude doesn't use your skill:
- Description lacks trigger terms users would say
- YAML syntax errors (check `---` markers, indentation)
- Description not specific enough about WHEN to use it
- Wrong file path or permissions
### Finding and fixing frontmatter issues
**Check if frontmatter exists:**
```bash
# View first 10 lines of SKILL.md
head -10 ~/.claude/skills/*/SKILL.md
```
**Common frontmatter problems:**
1. **Missing frontmatter block** - File starts with `#` instead of `---`
- Fix: Add YAML block at top of file
2. **Missing closing `---`** - Only one `---` marker
- Fix: Ensure both opening and closing markers exist
3. **Missing required fields** - No `name:` or `description:`
- Fix: Add both required fields
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Required structure → SKILL.md frontmatter → Critical best practices → Description examples → Debugging checklist → Finding and fixing frontmatter issues
要点 -> Keep skills focused · Write specific descriptions · Test activation · Use allowed-tools · Check if frontmatter exists · Common frontmatter problems · Missing frontmatter block · Missing closing ---
文件/命令 -> --- · instead of · name: · description:
内容 SHA-256 -> 5f4f99846580
方法与流程
适用与边界
原文中的明确线索
---、instead of、name:、description: