Enforce Rules Format

zernie/vigiles/.claude/skills/enforce-rules-format

作者 zernie1d562c69566f無授權條款15 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Validate that all rules have proper enforcement classification (enforce/check/guidance)

僅含說明AI & Agents
AI 產生的概覽

驗證專案指令檔案中的規則是否具備正確的強制分類,並修正缺少的分類。

功能
此技能會檢查專案的指令檔案,判斷其使用以規格為基礎(v2)或手寫(v1)的規則格式。接著檢查每條規則是否分類為強制執行、檢查或僅指引,以彙總表報告缺少的標註,並提出修正建議,例如將規則對應至 linter 規則或標記為僅指引。它也會建議將 v1 檔案遷移為型別化規格,並執行驗證命令回報結果。
適用情境
適用於稽核或整理 CLAUDE.md、AGENTS.md、.cursorrules 或規格檔案中的規則定義,尤其是規則可能缺少強制標註時。適合希望將規則與 linter 強制執行連結,或明確標記為僅指引的專案。
執行需求
需要可檢查的專案指令檔案;對於 v2 專案,需要可透過 npx 使用的 vigiles CLI,以執行 compile、discover 和 check 命令。此技能不附帶指令碼,並會在做出變更前詢問使用者。

Validate that every rule in the project's instruction files has a proper enforcement classification, and fix any that are missing.

Instructions

Step 1: Detect Format

Check which format the project uses:

v2 (spec-based): Look for CLAUDE.md.spec.ts or any *.spec.ts files. If found, this is a v2 project — rules must use enforce(), check(), or guidance().

v1 (hand-written): Look for CLAUDE.md, AGENTS.md, .cursorrules. If found without a spec file, this is a v1 project — rules need **Enforced by:** or **Guidance only** annotations.

Step 2: Validate

For v2 specs:

The TypeScript type system already prevents unannotated rules — you can't create a rule without calling enforce(), check(), or guidance(). So focus on:

  1. Do enforce() rules reference real linter rules? Run npx vigiles compile to check.
  2. Are there guidance rules that COULD be enforce()? Check linter configs for matching rules.
  3. Are there check() assertions that could be delegated to a linter? Suggest enforce() instead.
bash
npx vigiles compilenpx vigiles discover

For v1 hand-written files:

Scan for ### headings. Each must have one of:

  • **Enforced by:** \linter/rule-name``
  • **Guidance only** — reason
  • <!-- vigiles-disable -->

Report missing annotations with a summary table.

Step 3: Fix Issues

For each issue found:

  1. Check the project's linter configuration for matching rules
  2. Suggest enforce("linter/rule") (v2) or **Enforced by:** \linter/rule`` (v1)
  3. If no linter rule exists, suggest guidance() (v2) or **Guidance only** (v1)
  4. Ask the user before making changes

Step 4: Suggest Migration

If the project uses v1 format, suggest migrating to v2 specs for type safety:

Your rules could benefit from type-safe specs. Run the adopt-spec skill to convert your CLAUDE.md to a typed .spec.ts file.

Step 5: Verify

Run the appropriate command:

bash
# v2npx vigiles compile && npx vigiles check
# validatenpx vigiles check

Report the validation result.

來源與署名

來源:zernie/vigiles位於.claude/skills/enforce-rules-format提交1d562c6

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 zernie/vigiles 的技能

Linter Docs

zernie

Deep linter reference for authoring or debugging a vigiles enforce() rule — plugin tables, AST selectors, type-aware rules, auto-fix, and edge cases for ESLint, Ruff, Pylint, RuboCop, Stylelint, and Clippy. Use when you need the exact rule name or config for a specific linter, not for running a linter. (JVM/Go linters — detekt, ktlint, Checkstyle, golangci-lint — and Cedar have no deep-dive file yet; their reference lives in docs/linter-support.md.)

待分類15今天更新

Debug My Harness

zernie

透過讀取本機 .vigiles/runs.jsonl 飛行記錄帳本來診斷代理框架的異常行為。

AI & Agents15今天更新

Review Docs

zernie

Review the README or a documentation page from several real reader points of view at once. Fans out one parallel reviewer per audience — Claude Code newcomer, power user, plugin/skill author, skeptical senior engineer, non-running decision-maker — each scoring it x/5 and naming concrete, line-level fixes. Use when asked to review, critique, grade, or "get to N/5" the README or any front-door doc, or to check how a doc reads for real users. Not for code review (use /code-review for that).

待分類15今天更新

Adopt Spec

zernie

將現有的手寫 CLAUDE.md 轉換為使用 vigiles 規範函式庫的型別化 CLAUDE.md.spec.ts。

AI & Agents15今天更新

Pr To Lint Rule

zernie

把反覆出現的散文式程式碼審查規則合成為自訂 lint 規則,並由獨立健全性測試把關,未通過就棄用。

Software Development15今天更新

Deep Research

zernie

Use when the user asks to research a topic in depth, map a competitive/market landscape, run a multi-source investigation, or "fan out" parallel research agents — anything where many findings must be gathered and then NOT lost. Enforces durable, detail-preserving research (write full findings to disk; keep a full appendix beside the synthesis).

待分類15今天更新