
add-a-linter
Add a new linter to vigiles's cross-referencing engine as one cohesive, type-enforced unit — a LinterAdapter in the LINTERS registry, with the conformance test enforcing docs + site parity so no site is forgotten
- Installs
- 120
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/zernie/vigiles --skill add-a-linter- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads add-a-linter automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Add a linter to vigiles's cross-referencing engine (the enforce("eslint/...")
moat). This is a contributor task, not a third-party extension point: the
LINTERS registry is a Record<BuiltinLinter, LinterAdapter> — a closed
set baked into core — so a linter is added by editing vigiles itself, and the
type system + the conformance test make the parity un-forgettable.
The whole reason this skill exists: a linter used to be smeared across ~7
scattered sites (existence check, config checker, CLI-tool map, suggestion
enumerator, generate-types discoverer, docs, site) with nothing enforcing
that you touched all of them — miss one and it failed silently. Now tsc fails
if the registry entry is missing, and src/core/linter-contract.test.ts fails
if the docs table or the marketing site drifts. Follow the steps; let the
gates catch what you forget. See research/linter-adapter-architecture.md.
The one invariant
A linter is one LinterAdapter in one registry. Everything else —
existence, config-enabled, suggestions, type-gen, docs, site — is a field or a
method on that adapter, cross-checked by the conformance test. You never again
hunt for "the other place this linter is registered."
Steps
Work in this order — each step's gate tells you the next is needed.
-
Name it (the single source). Add the lowercase name to
BUILTIN_LINTERSinsrc/core/spec.ts.BuiltinLinterderives from this array, so the moment you save,tscfails onLINTERSinlinters.tswith "property<name>is missing" — that error is your to-do list. -
Pick the existence-check kind (
LinterCapabilities.existenceCheckinsrc/core/linter-adapter.ts) — this decides which helper builds the adapter:node-api— the rule set is resolved from an installed npm package (eslint, stylelint). UsenodeApiAdapter(name, resolver, configEnabled, discover).cli— a real command asks the tool whether a rule exists (ruff, clippy, pylint, rubocop, detekt, ktlint, checkstyle, golangci-lint). UsecliAdapter(name, cliTool, checkExists, configEnabled, discover, enumerate?).filesystem— presence in a project file counts, no tool (cedar). Write a literal adapter (see cedar inlinters.ts).format-only— only the reference shape is validated, no tool exists to list rules (ktlint's catalog is unlistable). Still acliadapter, just omit theenumeratearg; the existence check is the qualified-shape rule.
-
Implement the discoverer
discover<Name>Rules(basePath): DiscoveredRules | nullinlinters.ts— reads the project's real linter config and returns its enabled rules forgenerate-types(fail open: returnnull, never flag every rule, when you can't enumerate). If it's aclilinter, also write its<name>CheckExistsexistence probe (throws when the rule is unknown) and, for a real config-enabled read, its<name>ConfigEnabledchecker — plain named functions the adapter references directly in theLINTERSregistry (there is no separate map to touch). Parse structured config with a real parser (js-yaml / @iarna/toml / the shared markdown-it helper), never a hand-rolled regex — see theparse-structured-input-with-a-real-parserrule; detekt'sparseDetektConfig(js-yaml) is the model. -
Register it in
LINTERS(linters.ts) via the matching helper.tscgoes green here — the registry is now complete. -
Document it —
docs/linter-support.md: add a row to the## Supported Linterstable AND a## <Linter>section (config conventions, rule-prefix, any capability caveat like "format-only" or "whitelist-only"). The conformance test set-matches the table against the registry, so a missing row fails CI. -
The site updates itself — the vigiles.sh chip strip (
Wedge.tsx) DERIVES fromBUILTIN_LINTERS, so a new linter appears automatically; there's no array to edit. Optionally add a display label toLINTER_LABELSinWedge.tsxif it needs special casing (e.g.ESLint,RuboCop); with no entry it renders under its lowercase name. The conformance test guards that the derivation stays in place (a revert to a hand-typed list fails CI). -
If it's a
clilinter, make CI actually run it — no silent skips. The real-binary tests aredescribe.skipIf(!hasBinary("<tool>"))insrc/core/linters.test.ts; a binary absent from CI means those tests skip silently (a hidden gap — theno-silent-skipsrule). Install the tool in thetestjob of.github/workflows/ci.yml(pin a version via a jobenv, cache it) AND add it to thecommand -vsanity loop so a missing binary fails the build instead of skipping. Then write the two complementary tests: a real-binary test (describe.skipIf(!hasBinary)) and a missing-binary honest-error test (it.skipIf(hasBinary)) — one always runs, the pair is loud either way. -
Add the parity test data. The conformance loop in
src/core/linter-contract.test.tsis generic (it iterates the registry), so it covers the new linter automatically — but add a targeted config-parse/discover unit test inlinters.test.tsfor the new linter's own parser, and a per-linter capability assertion if it has an unusual variance (e.g.format-only,alwaysEnabled).
The gates that make this safe
Run npm test (or at least npx vitest run src/core/linter-contract.test.ts src/core/linters.test.ts + tsc --noEmit). You are done only when:
tscis clean — the registry entry exists (completeness).linter-contract.test.tsis green — key ===name, every capability flag matches its method's presence,existenceCheck === "cli"⟺cliToolpresent, and the registry keys set-matchBUILTIN_LINTERSanddocs/linter-support.mdand the site chip list (docs + site parity).- The new linter's config-parse unit test passes with no binary, and its real-binary test runs in CI (installed + sanity-gated), not skipped.
FAQ
What does the add-a-linter skill do?
Add a new linter to vigiles's cross-referencing engine as one cohesive, type-enforced unit — a LinterAdapter in the LINTERS registry, with the conformance test enforcing docs + site parity so no site is forgotten
How do I install add-a-linter?
Run npx skills add https://github.com/zernie/vigiles --skill add-a-linter in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/add-a-linter/ (personal) or .claude/skills/add-a-linter/ (project).
Which AI agents can use add-a-linter?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is add-a-linter safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains add-a-linter?
It is published by zernie in zernie/vigiles. It has 120 recorded installs.
More from zernie/vigiles
edit-spec
zernie/vigiles
Edit a vigiles .spec.ts to change a compiled instruction file (CLAUDE.md / AGENTS.md) — add, modify, or remove a rule, section, command, or file pointer (including a request to add a "key file" — the keyFiles field is deprecated). Use whenever you need to change a CLAUDE.md/AGENTS.md that carries a vigiles hash (edit the spec, never the artifact), including adding a new enforce()/check()/guidance() rule.
strengthen
zernie/vigiles
Upgrade a vigiles spec's guidance() rules to enforce() — scan the guidance rules in a CLAUDE.md/AGENTS.md spec and find existing linter rules (ESLint, Ruff, Clippy, Pylint, RuboCop, Stylelint) that back them. Use when asked to strengthen, harden, or make vigiles rules enforceable; NOT for general linting or fixing lint errors.
test-harness
zernie/vigiles
Install vigiles and test a Claude Code harness — hooks, skills, agents, settings, CLAUDE.md — by picking the right tier (unit / deterministic / eval) and writing a test that passes. Use to check that a hook fires or blocks, that a skill triggers, that injected context lands; or to observe a run — which tools it called, whether it stayed inside its declared allowed-tools, what files and side effects it produced, how to intercept a call without executing it.
linter-docs
zernie/vigiles
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.)
adopt-spec
zernie/vigiles
Adopt a typed .spec.ts for an existing hand-written CLAUDE.md — start from the file you already have, non-destructively
debug-my-harness
zernie/vigiles
Diagnose why an agent harness misbehaved by reading the local flight-recorder ledger (.vigiles/runs.jsonl) — which skills fired or got hijacked, which hooks blocked or wrongly allowed, which subagent tool-contract violations happened, and how a skill's trigger rate moved. Use when asked why a skill stopped firing, why a hook didn't block, why the wrong skill ran, or to debug/investigate what the harness actually did. NOT for writing new rules (use strengthen) or editing the spec (use edit-spec).
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work