К основному содержанию
скилл CX Codex

add-a-linter — скилл для Claude Code: что делает и как установить

Скилл add-a-linter помогает добавить линтер в vigiles: от записи в реестре до проверки документации, сайта и тестов. Нужен при изменении самого проекта vigiles.

MIT 120 установок ★ 16 обновлён 2026-10-14

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add zernie/vigiles --skill add-a-linter -a claude-code
Открыть на GitHub

Что делает add-a-linter

Скилл ведёт через добавление линтера в исходный код vigiles. Агент выбирает способ проверки существования правил, пишет адаптер и обнаружитель правил, затем регистрирует линтер в LINTERS. Реестр закрытый: расширить его можно только изменением самого vigiles.

Дальше скилл предлагает добавить строку и раздел в docs/linter-support.md, тесты разбора конфигурации и, для CLI-линтера, настройку CI с проверкой наличия бинарного файла. Тест согласованности сверяет реестр с документацией и списком линтеров сайта. Для структурированных конфигов нужен настоящий парсер, например js-yaml или @iarna/toml; регулярного выражения недостаточно.

Работа затрагивает TypeScript-код, тесты и CI. Если для CLI-линтера не установить бинарный файл в CI и не добавить проверку command -v, тесты с ним могут пропускаться молча.

Какие задачи решает

  • добавить линтер в закрытый реестр vigiles
  • выбрать адаптер для проверки правил линтера
  • читать включённые правила из конфигурации проекта
  • сверить документацию и список линтеров сайта
  • настроить CI, чтобы тесты CLI-линтера не пропускались

Примеры запросов агенту

  • Добавь линтер biome в vigiles и пройди все шаги скилла.
  • Подключи checkov как CLI-линтер, включая адаптер, тесты и CI.
  • Добавь новый линтер в vigiles и проверь согласованность реестра, документации и сайта.

Как установить add-a-linter

1Через Skills CLI (Vercel)

npx skills add zernie/vigiles --skill add-a-linter -a claude-code

2Вручную: положить файлы

~/.claude/skills/add-a-linter/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/add-a-linter/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об add-a-linter

Как установить add-a-linter в Claude Code?

Выполните npx skills add zernie/vigiles --skill add-a-linter -a claude-code. Файл скилла появится по пути ~/.claude/skills/add-a-linter/SKILL.md.

Что делает скилл add-a-linter?

Он ведёт через добавление линтера в vigiles: адаптер и запись в реестре, разбор конфигурации, документацию и тесты. Для CLI-линтера также описаны настройка бинарного файла в CI и проверки, предотвращающие молчаливый пропуск тестов.

Нужно ли менять список линтеров на сайте вручную?

Нет. Список на сайте строится из BUILTIN_LINTERS; для особого отображаемого имени можно добавить запись в LINTER_LABELS.

Исходный текст

SKILL.md · MIT
---
name: add-a-linter
description: 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
disable-model-invocation: true
argument-hint: <linter name, e.g. "biome" or "checkov">
---

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.

1. **Name it (the single source).** Add the lowercase name to `BUILTIN_LINTERS`
   in `src/core/spec.ts`. `BuiltinLinter` derives from this array, so the moment
   you save, `tsc` fails on `LINTERS` in `linters.ts` with "property `<name>` is
   missing" — that error **is** your to-do list.

2. **Pick the existence-check kind** (`LinterCapabilities.existenceCheck` in
   `src/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). Use
     `nodeApiAdapter(name, resolver, configEnabled, discover)`.
   - `cli` — a real command asks the tool whether a rule exists (ruff, clippy,
     pylint, rubocop, detekt, ktlint, checkstyle, golangci-lint). Use
     `cliAdapter(name, cliTool, checkExists, configEnabled, discover, enumerate?)`.
   - `filesystem` — presence in a project file counts, no tool (cedar). Write a
     literal adapter (see cedar in `linters.ts`).
   - `format-only` — only the reference **shape** is validated, no tool exists
     to list rules (ktlint's catalog is unlistable). Still a `cli` adapter, just
     omit the `enumerate` arg; the existence check is the qualified-shape rule.

3. **Implement the discoverer** `discover<Name>Rules(basePath): DiscoveredRules
| null` in `linters.ts` — reads the project's real linter config and returns
   its enabled rules for `generate-types` (fail **open**: return `null`, never
   flag every rule, when you can't enumerate). If it's a `cli` linter, also write
   its `<name>CheckExists` existence probe (throws when the rule is unknown) and,
   for a real config-enabled read, its `<name>ConfigEnabled` checker — plain
   named functions the adapter references directly in the `LINTERS` registry
   (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 the `parse-structured-input-with-a-real-parser` rule;
   detekt's `parseDetektConfig` (js-yaml) is the model.

4. **Register it** in `LINTERS` (`linters.ts`) via the matching helper. `tsc`
   goes green here — the registry is now complete.

5. **Document it** — `docs/linter-support.md`: add a **row** to the
   `## Supported Linters` table 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.

6. **The site updates itself** — the vigiles.sh chip strip (`Wedge.tsx`) DERIVES
   from `BUILTIN_LINTERS`, so a new linter appears automatically; there's no array
   to edit. Optionally add a display label to `LINTER_LABELS` in `Wedge.tsx` if 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).

7. **If it's a `cli` linter, make CI actually run it — no silent skips.** The
   real-binary tests are `describe.skipIf(!hasBinary("<tool>"))` in
   `src/core/linters.test.ts`; a binary absent from CI means those tests skip
   silently (a hidden gap — the `no-silent-skips` rule). Install the tool in the
   `test` job of `.github/workflows/ci.yml` (pin a version via a job `env`, cache
   it) AND add it to the `command -v` sanity 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.

8. **Add the parity test data.** The conformance loop in
   `src/core/linter-contract.test.ts` is generic (it iterates the registry), so
   it covers the new linter automatically — but add a targeted
   config-parse/discover unit test in `linters.test.ts` for 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:

- **`tsc`** is clean — the registry entry exists (completeness).
- **`linter-contract.test.ts`** is green — key === `name`, every capability flag
  matches its method's presence, `existenceCheck === "cli"` ⟺ `cliTool` present,
  and the registry keys set-match `BUILTIN_LINTERS` **and** `docs/linter-support.md`
  **and** 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.

© zernie · MIT · zernie/vigiles

Похожие скиллы

Все скиллы по теме «Код-ревью и рефакторинг» →
sapui5-linter secondsky Скилл sapui5-linter помогает запускать UI5 Linter, настраивать правила и разбирать найденные проблемы в приложениях SAPUI5 и OpenUI5. Пригодится и при подготовке к переходу на UI5 2.x. CX Codex +1 873установок vastlint - IAB XML VAST validator and linter aleksander MCP-сервер vastlint - IAB XML VAST validator and linter для Claude Code проверяет VAST-теги по спецификациям IAB и показывает нарушенные правила. Помогает разбирать пропавшие показы и расхождения цифр между площадками. CX Codex +1 404установок suede-release-linter JasonColapietro Скилл suede-release-linter для Claude Code проверяет папку музыкального или медиарелиза и оценивает готовность к выпуску: файлы, метаданные, обложки, стемы, сплиты и права. CX Codex +1 ★ 121звёзд репо principle-subtract-before-you-add backnotprop Скилл principle-subtract-before-you-add задаёт правило рефакторинга: сначала удалить мёртвый код, заглушки и лишние валидаторы, а затем добавлять новое. Пригодится перед доработкой архитектуры. CX Codex +1 10 200установок add-educational-comments официальный github Скилл add-educational-comments для GitHub Copilot добавляет в код учебные комментарии, которые объясняют синтаксис и архитектурные решения. Запускается на любом файле из репозитория и превращает его в учебный материал без изменения логики. CX Codex +1 9 243установок add-feature-flag dominikmartn Скилл add-feature-flag для Claude Code добавляет фичефлаги в кодовую базу терминала Warp. Помогает изолировать изменения и безопасно выкатывать код между каналами сборки. CX Codex +1 ★ 720звёзд репо

Из того же набора19

Весь набор →
enforce-rules-format Скилл enforce-rules-format для Claude Code проверяет, отмечены ли правила как enforce, check или guidance, и предлагает исправления. Работает с проектами на Vigiles и файлами инструкций. CX Codex +1 433установок generate-logo Скилл generate-logo генерирует варианты логотипа vigiles через сервис ImageRouter API. Пригодится при поиске визуального стиля или обновлении иконки проекта. CX Codex +1 410установок code-quality Скилл code-quality для рефакторинга TypeScript и JavaScript: приводит типы в порядок, убирает невозможные состояния и разделяет логику с вводом-выводом. CX Codex +1 392установок audience-check Скилл audience-check анализирует README и вводную документацию глазами шести разных читателей. Помогает найти непонятные термины, слабые аргументы и места, где проект бросают читать. CX Codex +1 387установок verify-docs-findable Скилл verify-docs-findable проверяет, отвечает ли документация на реальные вопросы читателя. Запускает дешёвых агентов Haiku, которые читают только доки и показывают, где ответы теряются. CX Codex +1 340установок screenshot Скилл screenshot для Claude Code рендерит локальные сайты и HTML в Chromium и сохраняет полноэкранные снимки для desktop и mobile. Проверяет интерфейс. CX Codex +1 337установок landing-site Скилл landing-site с правилами UX и дизайна для лендинга vigiles.sh. Агент читает его перед правкой компонентов, героя или копирайта сайта и проверяет каждое изменение на соответствие стандарту. CX Codex +1 295установок dogfood-cli Скилл dogfood-cli запускает параллельный аудит CLI vigiles на самом себе, трассирует баги до строки и сразу применяет исправления. CX Codex +1 120установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой