论文审查
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 安全
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: rule-quality-evaluator
description: Evaluate the quality of existing agent instruction rule sets — CLAUDE.md, AGENTS.md, .cursorrule…
category: 安全
runtime: 无特殊运行时
---
# rule-quality-evaluator 输出预览
## PART A: 任务判断
- 适用问题:安全审计、密钥扫描、权限检查或风险分析。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Two-Phase Overview / Phase 1 — Static Critic / Step 1: Ingest”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于安全审计、密钥扫描、权限检查或风险分析,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Two-Phase Overview / Phase 1 — Static Critic / Step 1: Ingest”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Two-Phase Overview / Phase 1 — Static Critic / Step 1: Ingest”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: rule-quality-evaluator
description: Evaluate the quality of existing agent instruction rule sets — CLAUDE.md, AGENTS.md, .cursorrule…
category: 安全
source: tomevault-io/skills-registry
---
# rule-quality-evaluator
## 什么时候使用
- 用于审阅代码、文档或方案并给出可执行反馈 适合处理安全审计、密钥扫描、权限检查和风险分析,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需要额外 A…
- 面向安全审计、密钥扫描、权限检查或风险分析,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Two-Phase Overview / Phase 1 — Static Critic / Step 1: Ingest」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "rule-quality-evaluator" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Two-Phase Overview / Phase 1 — Static Critic / Step 1: Ingest
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Rule Quality Evaluator
A rule that cannot be violated cannot be followed. Most instruction files fail because of unfalsifiable guidance, redundant noise, and implicit knowledge that never made it to paper. Score rules against seven properties, identify structural weaknesses, optionally verify with live tasks.
Two-Phase Overview
- Phase 1 — Static Critic (always): Read rules, score against Seven Properties, detect structural issues, produce scorecard. No agent execution.
- Phase 2 — Behavioral Test (opt-in): Generate coding tasks, derive assertions, hand off to context-eval, synthesize report.
Interview-only fallback: If no instruction file accessible, ask user to paste rules. Flag at end: "I can't verify codebase alignment — code pattern checks need manual verification."
Phase 1 — Static Critic
Step 1: Ingest
Read instruction file(s). Detect format (Markdown prose, structured rules list, YAML front matter, fenced sections). Parse into individual rules — one rule = one discrete behavioral instruction. Split on bullets, numbered items, or paragraph breaks starting an imperative.
Optionally scan codebase for linter configs (.eslintrc, pyproject.toml, ruff.toml), type configs (tsconfig.json), CI configs (.github/workflows/). Enables redundancy detection.
Step 2: Score Each Rule — The Seven Properties
Score 0–7 by counting properties satisfied (each binary).
| Property | ID | Score 0 | Score 1 |
|---|---|---|---|
| Specific and falsifiable | P1 | "Write clean code" | "Every API handler must return Result<T, AppError>, never throw" |
| Encodes WHY | P2 | "Don't use console.log" | "Don't use console.log — use src/lib/logger.ts. Bypasses correlation IDs, breaks Datadog traces" |
| Born from real failure | P3 | "Handle errors carefully" | "Never add indexes to reservations without DBA approval — compound index locked table 47 min in Q2 2024" |
| Scoped to right level | P4 | Rule about billing API in root file | Same rule in src/billing/CLAUDE.md |
| Points to canonical example | P5 | "Follow our API patterns" | "New endpoints follow src/api/reservations/create.ts — handler → validation → service → response" |
| Includes anti-pattern | P6 | "Use the service layer" | "We do NOT use the repository pattern. Each service calls Prisma directly" |
| Token-efficient | P7 | "When writing tests, please make sure to always use Vitest and not Jest" | "Tests: Vitest, never Jest. Config: vitest.config.ts" |
Score ≤ 2 = weak — rewrite/remove candidate. P1 = 0 = noise — agent can't verify, can't steer.
Step 3: Structural Analysis
Redundancy: Flag rules duplicating linter (ESLint, Ruff, Pylint), type system (TypeScript strict, mypy), or CI (test gates, build gates). Redundant rules waste budget and dilute signal.
Scope: "Does this rule apply to ALL code agent will see in this directory?" Flag:
- Over-scoped: package-specific rule in root file
- Under-scoped: identical rules duplicated across subdirs that should move up
Coverage — map to nine categories:
- C1 Architecture & Boundaries
- C2 Domain Model & Business Rules
- C3 Conventions & Patterns
- C4 Integrations & External Dependencies
- C5 Operations & Deployment
- C6 Testing Philosophy & Strategy
- C7 Security Model
- C8 Performance Constraints
- C9 Historical Decisions & Tech Debt
Mark ● (covered), ◐ (partial), ○ (missing).
Token budget:
- Claude Code: root <4,000 tokens, subdir <1,000
- Copilot: root <1,000 lines, first 4,000 chars read per code review
- Cursor / Windsurf / AGENTS.md: similar to Claude Code
Step 4: Produce Scorecard
Output, then ask whether to run Phase 2.
Rule Scorecard — [file path]
| Rule (truncated) | Score | Weakest Property | Flags |
|---|---|---|---|
| "…" | N/7 | P? | weak / noise / redundant / over-scoped |
Summary Stats
- Total rules: N
- Mean score: X.X / 7
- Strong (5–7): N | Adequate (3–4): N | Weak (0–2): N
- Noise rules (P1 = 0): N
- Redundant with linter/CI/types: N
- Over-scoped: N | Under-scoped: N
Coverage Map
C1[●] C2[○] C3[●] C4[○] C5[◐] C6[●] C7[○] C8[○] C9[○]
● covered ◐ partial ○ missing
Token Budget
- Current: ~N tokens / N chars
- Limit: [system-appropriate]
- Headroom: [remaining / over by N]
Top 3 Improvements
- [Most impactful — which rule, which property, what to add]
- [Second]
- [Third]
Phase 1 Verdict
| Threshold | Verdict |
|---|---|
| Mean ≥ 5 | STRONG — specific, grounded, efficient |
| Mean 3–4 | ADEQUATE — usable but with gaps |
| Mean < 3 | WEAK — won't reliably steer behavior |
Run Phase 2 — Behavioral Testing? Generates real coding tasks, measures whether rules change agent behavior. Requires context-eval.
Phase 2 — Behavioral Test
Step 5: Generate Coding Tasks
Generate 3 coding tasks. Each:
- ~50 lines of code to produce
- Touches 2+ rules (discriminating grading)
- Prioritize: rules scoring 3-5 (uncertain), C7 Security or C2 Domain (high-stakes), incident-born rules (P3 = 1)
Per task: which rules exercised, what correct behavior looks like.
Step 6: Generate Assertions
One testable assertion per rule:
- Observable in agent output (no execution required)
- Pass/fail check
Write to evals/evals.json:
{
"harness_name": "[instruction file name]",
"harness_type": "coding agent instruction rules",
"harness_path": "[path to instruction file]",
"evals": [
{
"id": 1,
"prompt": "[the coding task prompt]",
"expected_output": "[description of correct output under the rules]",
"files": [],
"assertions": [
"[rule → assertion, e.g., 'Uses src/lib/logger.ts, not console.log']",
"[second rule → assertion]"
]
}
]
}
Step 7: Hand Off to context-eval
Harness under test = instruction file. Baseline = same tasks without the file.
→ context-eval: evaluate harness at [instruction file path] using evals/evals.json
context-eval runs with/without harness, grades, computes benefit delta.
Step 8: Synthesize Report
Combined Report
Phase 1 Static: [mean] / 7 → [STRONG / ADEQUATE / WEAK]
Phase 2 Behavioral Delta: +[delta] pass rate over baseline
Per-Rule Behavioral Confirmation
| Rule | P1 Verdict | P2 Delta | Confirmed? |
|---|---|---|---|
| "…" | score/7 | +X% | yes / partial / no |
Final Verdict
| Condition | Verdict |
|---|---|
| Static ≥ 5 AND delta ≥ 0.25 | STRONG — well-formed, measurable improvement |
| Static ≥ 3 AND delta ≥ 0.10 | ADEQUATE — works, room to improve |
| Static < 3 OR delta < 0.10 | WEAK — not reliably changing behavior |
| Delta < 0 | HARMFUL — degrading performance |
Delta = pass-rate diff between with-rules and without-rules (0.0–1.0; 0.25 = 25 pp).
Discrepancies
Rules high in Phase 1 with no behavioral delta (or vice versa) — most actionable findings. High-score + no delta = either not reachable in eval tasks or not being read. Low-score + high delta = encodes something valuable scoring missed.
Calibration Rules
- Phase 1 always first. Scorecard catches most failures without tooling.
- P1 is the gatekeeper. Unfalsifiable rules can't be improved by other properties. Fix specificity first.
- Redundancy is the easiest win. Lint/type/CI duplicates can be deleted immediately.
- Behavioral testing is gold standard, not default. Phase 2 needs infrastructure and time. Most rule sets benefit more from targeted Phase 1 rewrites.
- Score what you see. Literal text, not charitable interpretation. Rules requiring generous reading fail in practice.
Composes With
context-gap-analyzer → agent-instruction-forge → rule-quality-evaluator → context-eval
Source: AndurilCode/craftwork — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核