home / skills / chen19007 / my_skills / skill-metadata-check
This skill helps you validate and report YAML frontmatter integrity in SKILL.md files across a project, ensuring name and description are correct.
npx playbooks add skill chen19007/my_skills --skill skill-metadata-checkReview the files below or copy the command above to add this skill to your agents.
---
name: skill-metadata-check
description: 检查 SKILL.md 的 YAML 元数据是否可解析、是否包含 name/description,避免元数据问题影响加载。
---
# Skill 元数据检查
## 作用
批量检查目录内所有 `SKILL.md` 的 YAML 头部:
- 是否存在 frontmatter 分隔符
- YAML 是否可解析
- 是否包含 `name` / `description`
- `name` / `description` 类型是否为字符串
## 使用方式
1. 进入技能根目录后运行脚本。
2. 查看每个 `SKILL.md` 的检查结果。
## 脚本
- `scripts/check_skill_metadata_yaml.py`
## 执行示例
```bash
python {SKILL目录}/scripts/check_skill_metadata_yaml.py
```
## 输出说明
- `yaml_parse: ok` 表示 YAML 可解析
- `required_fields: ok` 表示包含 `name`/`description`
- 发现 `fail` 或 `missing` 时需要修复对应文件的 YAML 头部This skill scans skill content files for YAML frontmatter issues to prevent metadata problems from breaking skill loading. It validates the presence and parseability of frontmatter and ensures required fields exist with correct types. Results point to files needing fixes so maintainers can repair metadata quickly.
The tool walks a skill directory and inspects each file that contains YAML frontmatter. It checks for frontmatter delimiters, attempts to parse the YAML, and verifies presence and string type for the required name and description fields. The script prints a concise status per file indicating parse success and field completeness.
What exactly does a fail status mean?
A fail indicates the YAML frontmatter could not be parsed or is malformed and needs correction.
Which fields are required by the checker?
The checker requires a name and a description field, and both must be strings.