This skill should be used when the user asks to "create a rule", "define a constraint", "write a governance rule", "enforce a code standard", or mentions binary Pass/Fail rules, enforceability testing, code constraints, linting rules, or rule validation. Creates and validates binary governance rules with enforceability testing, scoped examples, and self-evaluation. Use this skill whenever the user needs to codify a repeatable constraint into a formal rule, even if they don't explicitly ask for "rule-forge". [EXPLICIT]
From jm-adknpx claudepluginhub javimontano/jm-adk-alfaThis skill is limited to using the following tools:
agents/guardian.mdagents/lead.mdagents/specialist.mdagents/support.mdevals/evals.jsonknowledge/body-of-knowledge.mdknowledge/knowledge-graph.mdprompts/meta.mdprompts/primary.mdprompts/variations/deep.mdprompts/variations/quick.mdreferences/domain-knowledge.mdtemplates/output.docx.mdtemplates/output.htmlRules are binary: Pass or Fail. No "try to avoid", no subjective judgment. If you can't express it as Pass/Fail, it's a guideline, not a rule. [EXPLICIT]
Every rule has five mandatory parts: [EXPLICIT]
| Part | Purpose | Example |
|---|---|---|
| Frontmatter | Machine-readable metadata | description: + globs: |
| Constraint | The binary statement | "No console.log in TypeScript production files" |
| Why | The failure it prevents | "Pollutes production logs, leaks internal state" |
| Bad example | Concrete violation | Code snippet showing the problem |
| Good example | Corrected version | Same code with only the violation fixed |
Rules are named R-kebab-case.md. For the full template, read references/output-template.md. [EXPLICIT]
Start with the bad pattern. The litmus test: can a script detect this violation? [EXPLICIT]
Good rule candidates: Not rules (guidelines): [EXPLICIT]
────────────────────── ──────────────────────
"No console.log" "Write clean code"
"Max 50 lines per function" "Keep functions small"
"No any type in src/" "Use TypeScript properly"
"All API responses need status" "Design good APIs"
If a regex, AST analysis, or linter could find it, it's a rule. If it requires human judgment, it's a guideline. [EXPLICIT]
Which files does this rule apply to? Scope precision prevents false positives and missed violations. [EXPLICIT]
Dangerous: * (everything — almost never correct) [EXPLICIT]
Broad: **/*.ts (all TypeScript — sometimes appropriate) [EXPLICIT]
Precise: src/api/**/*.ts (API layer only — usually right) [EXPLICIT]
Surgical: src/api/routes/*.ts (specific directory — very targeted) [EXPLICIT]
Trade-off: Start narrow. Widening scope later is friction-free; narrowing after adoption causes resistance.
Every rule needs a "Why" section. Rules without reasoning get ignored or deliberately bypassed. [EXPLICIT]
Weak: "Because it's best practice." [EXPLICIT]
Strong: "Untyped API responses silently propagate wrong data structures, [EXPLICIT]
causing runtime errors that are hard to trace to the API layer."
Explain what failure this prevents, not what "best practice" it follows. [EXPLICIT]
Bad example (violation) and Good example (compliance) should be as close as possible — ideally the same code with only the violation changed. The smaller the diff, the clearer the rule. [EXPLICIT]
Most rules have legitimate exceptions. A test file might need console.log. Document these in an "Exceptions" section. Otherwise, the entire rule gets bypassed because of one edge case. [EXPLICIT]
Check structure, enforceability, and naming: [EXPLICIT]
python tools/rule-validator.py path/to/R-your-rule.md
python tools/rule-validator.py path/to/rules/ # all rules in directory
python tools/rule-validator.py path/to/rules/ --json # machine-readable
The most important quality check: [EXPLICIT]
| Question | If "No"... |
|---|---|
| Can a script detect violations? | Make constraint more specific, or convert to guideline |
| Is there exactly ONE way to comply? | Narrow scope until compliance is unambiguous |
| Would two independent reviewers always agree on Pass/Fail? | Remove subjective language |
Red flag words: "try to", "consider", "prefer", "generally", "appropriate" — these belong in guidelines, not rules.
console.log but not "logging for the wrong reason."R-no-console-log-v2.md — that violates naming conventions and creates confusion.Before delivering a rule, confirm: [EXPLICIT]
R-kebab-case.md conventionreferences/output-template.md — Complete rule template with worked examplereferences/self-evaluation.md — 10-point quality rubric with red flagsreferences/best-practices.md — Scope precision, "Power of No", common mistakesAuthor: Javier Montano | Last updated: March 18, 2026
Example invocations: [EXPLICIT]
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.