require-skill-frontmatter
Require valid YAML frontmatter with non-empty name and description fields in Codex skills.
Rule catalog ID: R019
Targeted pattern scope
**/.agents/skills/**/*.md- Codex plugin skill directories
What this rule reports
- Skill frontmatter is not valid YAML: {{error}}
- Skill frontmatter must declare a non-empty string description that explains what the skill does and when to use it.
- SKILL.md must start with YAML frontmatter declaring name and description.
- Skill frontmatter must declare a non-empty string name.
Why this rule exists
Require valid YAML frontmatter with non-empty name and description fields in Codex skills.
❌ Incorrect
A file in the targeted scope that produces any diagnostic listed above is incorrect for this rule.
✅ Correct
A file is correct when it uses the documented Codex structure and produces no diagnostic from this rule.
Behavior and migration notes
Included in:
codex.configs.minimalcodex.configs.recommendedcodex.configs.strictcodex.configs.all
ESLint flat config example
The preset layers supply the correct Markdown, TOML, or JSON language configuration. Override the rule only in a later matching flat-config entry:
import codex from "@typpi/eslint-plugin-codex";
export default [
...codex.configs.recommended,
{
rules: { "codex/require-skill-frontmatter": "error" },
},
];