跳到主要内容
知仓学习社ZHICANG

rules-eval

Evaluate Claude Code rules in .claude/rules/. Use for frontmatter, globs, and quality audits.

不碰外部(只输出文字)无严重或高危命中athola/claude-night-market

它会碰到什么

扫了多少5 个文本文件,8 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Rules Evaluation Framework

When NOT To Use

  • Evaluating skills (use abstract:skills-eval)
  • Evaluating hooks (use abstract:hooks-eval)
  • Writing a new rule (use hookify:writing-rules)

Table of Contents

  1. [Overview](#overview)
  2. [Quick Start](#quick-start)
  3. [Evaluation Workflow](#evaluation-workflow)
  4. [Scoring](#scoring)
  5. [Resources](#resources)

Overview

This skill evaluates Claude Code rules in .claude/rules/ directories against quality standards. It validates YAML frontmatter, glob pattern syntax, content quality, and directory organization. Rules files support path-scoped conditional loading via paths frontmatter and unconditional rules (no paths field).

Key validations: YAML syntax errors, unquoted glob patterns, Cursor-specific fields (alwaysApply, globs), overly broad patterns, content verbosity, and naming conventions.

Quick Start

# Evaluate rules in current project
/rules-eval

# Evaluate specific directory
/rules-eval .claude/rules/

# Detailed analysis with recommendations
/rules-eval --detailed

Evaluation Workflow

  1. Scan .claude/rules/ for all .md files (including subdirectories)
  2. Validate YAML frontmatter syntax and fields
  3. Analyze glob patterns for correctness and specificity
  4. Assess content quality (actionable, concise, non-conflicting)
  5. Check organization (naming, structure, symlinks)
  6. Measure token efficiency and redundancy

Scoring

| Category | Points | Focus |

|----------|--------|-------|

| Frontmatter Validity | 25 | YAML syntax, required fields, correct field names |

| Glob Pattern Quality | 20 | Syntax, specificity, quoting |

| Content Quality | 25 | Actionable, concise, non-conflicting |

| Organization | 15 | Naming, structure, symlink usage |

| Token Efficiency | 15 | Rule size, redundancy detection |

| Score | Level |

|-------|-------|

| 91-100 | Excellent - Production-ready |

| 76-90 | Good - Minor improvements possible |

| 51-75 | Basic - Needs optimization |

| 26-50 | Below Standards - Significant issues |

| 0-25 | Critical - Invalid or broken rules |

Resources

Skill-Specific Modules

  • Frontmatter Validation: See modules/frontmatter-validation.md
  • Glob Pattern Analysis: See modules/glob-pattern-analysis.md
  • Content Quality Metrics: See modules/content-quality-metrics.md
  • Organization Patterns: See modules/organization-patterns.md

Tools

  • Rules Validator: scripts/rules_validator.py

Related Skills

  • abstract:skills-eval - Skill evaluation framework
  • abstract:hooks-eval - Hook evaluation framework

Exit Criteria

  • [ ] Every .md file under .claude/rules/ (including subdirectories) receives a quality score

(0-100) with per-category breakdown across the five dimensions.

  • [ ] YAML frontmatter syntax errors and unquoted glob patterns are listed as blocking findings

before any score is reported.

  • [ ] Rules using Cursor-specific fields (alwaysApply, globs) are flagged as

non-compliant with the expected Claude Code schema.

  • [ ] Any rule scoring below 26 (Critical tier) is reported with at least one concrete

corrective action, not just a score.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。