
Rules Eval
Score and fix Claude Code rule files for actionability, size, conflicts, and valid YAML frontmatter before they silently misfire in the agent.
Overview
Rules-eval is an agent skill most often used in Ship (also Build/agent-tooling) that scores Claude Code rules for actionability, length, topic focus, and frontmatter validity.
Install
npx skills add https://github.com/athola/claude-night-market --skill rules-evalWhat is this skill?
- 25-point deductive scoring with penalties for empty, too-short, or overly verbose rule bodies
- Enforces actionable guidance—not bare project descriptions
- Validates Claude Code frontmatter fields paths (glob list) and optional description
- Documents YAML glob pitfalls (quote patterns like **/*.ts)
- Expects focused single-topic rules typically under ~500 tokens
- 25-point deductive scoring rubric
- Typical rule files expected under 500 estimated tokens
- Empty rule body deducts full 25 points
Adoption & trust: 1 installs on skills.sh; 304 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
Your Claude Code rules are vague, huge, or YAML-broken so agents load wrong guidance or ignore constraints entirely.
Who is it for?
Maintainers of claude-night-market-style rule packs or custom .claude rules who want a consistent quality bar before sharing templates.
Skip if: Teams that do not use Claude Code conditional rules or only rely on a single global AGENTS.md with no per-path rules.
When should I use this skill?
When adding, editing, or reviewing Claude Code rule files and you need actionable content plus valid paths/description frontmatter.
What do I get? / Deliverables
Each rule file meets actionable, concise, single-topic standards with valid paths frontmatter and a clear score against the 25-point rubric.
- Per-rule quality score with rubric deductions
- Concrete edits for actionability, length, and frontmatter fixes
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Ship/review is the canonical shelf because rules-eval judges rule quality with a deductive score—same mindset as pre-merge review of agent instructions. Review covers static quality gates on authored guidance (rules) rather than application runtime tests.
Where it fits
Run the 25-point rubric on a PR that adds TypeScript path rules before merging to main.
Draft a new unconditional strictness rule and verify it stays under 500 tokens with quoted globs for future path-specific files.
Audit stale rule packs after a framework migration so descriptions still prescribe concrete edits, not slogans.
How it compares
A rule-quality rubric skill—not application test coverage and not MCP policy enforcement.
Common Questions / FAQ
Who is rules-eval for?
Solo builders and template authors who ship Claude Code rule directories and need repeatable content and frontmatter checks.
When should I use rules-eval?
Use it in Ship/review before merging rule changes, and in Build/agent-tooling while drafting new path-scoped rules or fixing glob YAML errors.
Is rules-eval safe to install?
It evaluates text rules locally in agent workflows; confirm repo trust via the Security Audits panel on this Prism page before installing.
SKILL.md
READMESKILL.md - Rules Eval
# Content Quality Metrics ## Quality Criteria ### Actionability Rules should provide clear, actionable guidance. Descriptions alone are insufficient. ```markdown <!-- BAD: Just a description --> This project uses TypeScript. <!-- GOOD: Actionable guidance --> Use strict TypeScript. Enable `noImplicitAny` and `strictNullChecks`. Prefer interfaces over type aliases for object shapes. ``` ### Conciseness Each rule file should be focused and concise (< 500 tokens typical). ### Non-Conflicting Rules across files should not contradict each other. ### Single Topic Each rule file should address one focused topic. ## Scoring (25 points, deductive) Starts at 25, deducts for issues found: | Issue | Deduction | Criteria | |-------|-----------|----------| | Empty content | -25 | Rule file has no body text | | Too short | -5 | Fewer than 10 words | | Too verbose | -5 | Exceeds 500 estimated tokens | # Frontmatter Validation ## Valid Frontmatter Fields Claude Code rules support these frontmatter fields: | Field | Type | Required | Purpose | |-------|------|----------|---------| | `paths` | `list[string]` | No | Glob patterns for conditional loading | | `description` | `string` | No | Brief description of rule purpose | Rules without `paths` are unconditional (apply to all files). ## Common Errors ### YAML Syntax Errors ```yaml # INVALID - unquoted glob starting with * --- paths: - **/*.ts # YAML parse error --- # VALID - quoted glob --- paths: - "**/*.ts" --- ``` ### Wrong Field Names ```yaml # INVALID - Cursor-specific fields --- globs: # Wrong! Use 'paths' - "*.ts" alwaysApply: true # Wrong! Cursor-only, not Claude Code --- ``` ### Invalid Structure ```yaml # INVALID - paths must be a list --- paths: "**/*.ts" # Should be a list --- # VALID --- paths: - "**/*.ts" --- ``` ## Scoring (25 points, deductive) Starts at 25, deducts for issues found: | Issue | Deduction | Criteria | |-------|-----------|----------| | YAML parse error | -25 | Frontmatter fails to parse | | Cursor-specific field | -5 each | `globs`, `alwaysApply`, etc. | | Invalid `paths` type | -5 | `paths` is not a list | | Unknown field | -2 each | Field not in valid set | | Empty `paths` list | -1 | `paths: []` (likely unintended) | # Glob Pattern Analysis ## Pattern Quality Assessment ### Good Patterns ``` "src/api/**/*.ts" # Specific scope "tests/**/*.test.ts" # Clear intent "{src,lib}/**/*.ts" # Multiple dirs, quoted "*.config.{js,ts}" # Config files only ``` ### Problem Patterns ``` "**/*" # Too broad - matches everything "*" # Root only, usually too narrow **/*.ts # Unquoted - YAML parse error "." # Invalid glob ``` ## Validation Rules 1. **Syntax validity**: Pattern must be valid glob syntax 2. **Quoting**: Patterns with `*`, `{`, `}`, `[`, `]` must be quoted 3. **Specificity**: Patterns should not match everything (`**/*`) 4. **Intent clarity**: Pattern should clearly indicate target files ## Scoring (20 points, deductive) Starts at 20, deducts for issues found. Files without `paths` receive full score. | Issue | Deduction | Criteria | |-------|-----------|----------| | Overly broad pattern | -5 each | Matches `**/*`, `*`, etc. | | Empty pattern | -4 each | Blank or whitespace-only pattern | # Organization Patterns ## Directory Structure ### Recommended Layout ``` .claude/rules/ api-validation.md # Descriptive names testing-standards.md # Topic-based naming frontend/ # Subdirectories for grouping react-patterns.md css-conventions.md ``` ### Anti-Patterns ``` .claude/rules/ rules1.md # Non-descriptive names misc.md # Catch-all files RULES.md # Shouting case my rules file.md # Spaces in filenames ``` ## Naming Conventions - Use kebab-case: `api-validation.md` - Be descriptive: name should indicate rule content - Use subdi