lint-rule-generatorlisted
Install: claude install-skill sarj-ai/standards
# Lint rule generator
Turn a concrete defect description into the narrowest deterministic rule that
earns trust on real code. Use `sarj_standards.libs.rules` for problem,
catalog, evaluation, and report contracts. Use `sarj_standards.libs.corpus`
for manifests, snapshots, local pin verification, and redacted reporting. Keep
all executable logic in the uv package; this skill contains no scripts.
Read [language-routing.md](references/language-routing.md) before choosing an
engine. Read [evaluation-protocol.md](references/evaluation-protocol.md) before
running or reporting a corpus evaluation.
## Required workflow
1. Restate the request as one `RuleProblem`: observable bad pattern, concrete
harm, evidenced languages, explicit non-goals, exclusions, bad examples,
good examples, and strongest defensible fix policy. Ask for clarification
only when two interpretations would produce materially different findings.
2. Search the owning upstream linter and the Sarj catalog. Record candidates,
why configuration cannot express the request, and any overlapping rule IDs.
Prefer augmenting a maintained upstream rule or preset.
3. Select syntax-aware analysis whenever comments, strings, scopes, aliases, or
nesting can make regex ambiguous. Never infer intent from names alone.
4. Write labeled `EvaluationCase` values before implementation. Cover exact
positives, minimal negatives, near misses, nested forms, aliases, generated
code, fixtures, suppressions, malformed