# claude-rules-valid .claude/rules/ files must be markdown with valid optional paths frontmatter *Formerly known as `rules-valid`. The legacy name still works in configs, `--rule`/`--skip-rule`, suppression comments, and baselines.* | | | |---|---| | **Severity** | error (auto) | | **Autofix** | - | | **Since** | v0.1.0 | | **Repo Types** | dot-claude | | **Category** | [Claude Code](claude.md) | ## 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):** ```markdown --- paths: "src/**" --- Run tests before committing. ``` **Good:** ```markdown --- 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 ```yaml rules: claude-rules-valid: enabled: auto # true | false | auto severity: error ``` *Run `skillsaw explain claude-rules-valid` to see this documentation and the rule's effective configuration in your terminal.*