Skip to content

rules-valid

.claude/rules/ files must be markdown with valid optional paths frontmatter

Severity error (auto)
Autofix -
Since v0.1.0
Repo Types dot-claude
Category Rules Directory

Why

Files in .claude/rules/ are loaded as scoped instructions. They must be markdown (.md) files and, if they contain frontmatter, the optional paths field must be a valid list of globs. A non-markdown file or invalid frontmatter will be silently ignored or cause a parse error.

Examples

Bad:

.claude/rules/testing.txt

Bad (invalid frontmatter):

---
paths: "src/**"
---

Run tests before committing.

Good:

---
paths:
  - "src/**"
  - "tests/**"
---

Run tests before committing.

How to fix

Ensure rule files use the .md extension. If the file has frontmatter, the paths field must be a YAML list of glob patterns (not a bare string). Remove any unrecognized frontmatter keys.

Configuration

rules:
  rules-valid:
    enabled: auto  # true | false | auto
    severity: error

Run skillsaw explain rules-valid to see this documentation and the rule's effective configuration in your terminal.