skill-name-directory-mismatch
Skill name must match parent directory name
Rule Details
The skill name declared in SKILL.md frontmatter must match the directory the skill lives in. A mismatch between the two causes confusion when browsing skills on disk versus invoking them by name. This rule compares the name field against the parent directory name and reports an error if they differ. The rule provides an auto-fix that updates the frontmatter name to match the directory.
Incorrect
Name does not match directory (directory is "deploy-app")
---
name: deploy-application
description: Deploys the application
---Name uses different casing than directory "my-tool"
---
name: my-Tool
description: Runs the tool
---Correct
Name matches directory "deploy-app"
---
name: deploy-app
description: Deploys the application
---How To Fix
Update the name field in SKILL.md frontmatter to exactly match the parent directory name, or rename the directory to match the desired skill name. The auto-fixer updates the frontmatter name.
Options
This rule does not have any configuration options.
Related Rules
Resources
Version
Available since: v0.2.0