Lint guardrails
AI-guardrail linting — size/complexity caps that force extraction over sprawl, no comments, named constants, everything an error, and the config protected from agent edits by a deny hook. Ecosystem-agnostic philosophy with per-ecosystem implementations (ESLint for JS/TS today). Standalone-safe on existing repos. Use when the user says "setup linting", "add lint guardrails", or via setup-tooling.From its SKILL.md
npx -y skills add JCaraballo113/claude-skills --skill lint-guardrailsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.4 KB, as published. Nobody here has run it
Lint Guardrails
Guardrails make agent-written code readable by construction (based on "ESLint as AI Guardrails"): size/complexity caps that force extraction over sprawl, no comments (explanations go to docs), named constants. The philosophy is ecosystem-agnostic; implementations live in per-ecosystem support files.
The philosophy
- Everything is an error, never a warning.
- Never raise a cap or add a suppression to make code fit — hitting a limit means extract, split, or rename.
- Comments are banned; knowledge lives in docs, names, and test titles.
- The config is protected: a PreToolUse deny hook blocks agent edits to the lint config. Timing and caveats live with the implementation.
- Enforced at a commit gate, not per edit — the guardrails only bite if lint runs before code lands: wire it into a git-hook gate backed by CI (the un-bypassable backstop), never a per-edit agent hook that fires mid-refactor. The wiring is ecosystem-specific.
- Vendored/generated code, tests, scripts, and root config files get scoped exemptions — correctness rules stay on everywhere.
Implementations
- JS/TS (ESLint) — ESLINT.md: the rules, deviations learned in practice, scoped exemptions, the protect hook, and remediation specifics.
- Other ecosystems — apply the philosophy with the native tools (e.g. clippy caps for Rust); add a support file here once an implementation stabilizes in real use.
Remediating an existing codebase
On a fresh scaffold there is nothing to fix. On an existing repo:
- Fix pre-existing lint errors before adding rules — never mix the two.
- Measure, group by rule and by file, and report the blast radius to the user before starting — it can be hours.
- Comments: first handle functional ones manually (suppressions,
license headers). Harvest every comment with file:line to a scratch
file before stripping the rest. Relocate load-bearing knowledge from
the harvest: domain vocabulary → glossary; decisions/invariants →
ADRs; subsystem warnings → a README next to the code; env-var
semantics →
.env.example; test intent → describe/it names. Everything else: better names. - Fix cheapest-first — the per-ecosystem file has the exact order and patterns.
- Run the test suite after each batch; runtime-verify UI at the end if components were restructured.
- Write
docs/agents/linting.md(rules table, deviations, exemptions, where explanations go, the protect hook) and point AGENTS.md / CLAUDE.md at it with the one-liner: "When a cap fires, extract — never raise the cap." Then install the protect hook as the final lint action.
Don't remediate on a dirty tree; the diff must stay reviewable.
If jq (needed by the protect hook) is missing, prompt the user with
its install command from skill.deps.json.