Skip to main content

require-valid-skill-name

Require Agent Skills names to follow the standard lowercase-hyphen identifier contract.

Rule catalog ID: R032

Targeted pattern scope

  • **/.agents/skills/**/*.md
  • Codex plugin skill directories

What this rule reports

  • Skill names must be 1-64 characters, use lowercase letters, digits, and single hyphens, and may not start or end with a hyphen (current value: {{name}}).

Why this rule exists

Require Agent Skills names to follow the standard lowercase-hyphen identifier contract.

❌ 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.recommended
  • codex.configs.strict
  • codex.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-valid-skill-name": "error" },
},
];

Further reading