Command Palette

Search for a command to run...

Назад к скиллам
скилл № 40203

Run Linters

Run the canonical set of linters used by maintainers: ruff (lint and format) over the repository, and pyright on the branch's changed Python files.

БесплатноБез исполняемых скриптов
CERTCCот CERTCC★ 22 звезды на GitHub

Установить Run Linters в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Skill: Run Linters

The linter step is ruff over the whole repository and pyright on the branch's changed Python files (PAD-18-026). Local checks run on what the change touches, and CI runs everything (ADR-0221).

ruff runs directly: a whole-tree pass takes about a second, so a fingerprint lookup would cost a real share of the work it saves. pyright-changed runs pyright on the Python files the branch changed against origin/main (committed, uncommitted and untracked) that lie inside the include and exclude scope of pyrightconfig.json. With no such file, it passes without running pyright. It goes through the shared run-if-changed.sh guard, which skips it when its inputs (the vultron/+test/ sources, pyrightconfig.json, and uv.lock) are unchanged since its last successful run. A run over a few files takes seconds.

uv run ruff check --fix
uv run ruff format
uv run ruff check
G=.agents/skills/shared/run-if-changed.sh
"$G" pyright-changed-main vultron/ test/ pyrightconfig.json uv.lock -- uv run pyright-changed

uv run pyright-changed --list prints the selected files and runs nothing. Pass --base <branch> when the branch targets a base other than main, and name the memo key pyright-changed-<branch> to match: the key carries the base, so a pass against one base never skips a run against another.

Whole-project pyright is CI's (PAD-18-027). It takes minutes on a shared host and enough memory to starve a parallel test run, while CI's lint-pyright job answers in about two minutes and the required CI gate refuses a merge until it is green. The changed-file slice misses one kind of error: an unchanged file that calls a changed signature wrongly. CI reports it.

Constraints

  • Never pass paths to ruff. Scope is declared in [tool.ruff] in pyproject.toml (IMPLTS-07-021), so a bare ruff check covers exactly what CI and the pre-commit hook cover. pyright-changed takes its paths from the branch diff and its scope from pyrightconfig.json, so it passes no path that the configuration does not already hold.
  • The second ruff check runs after ruff format because the formatter can rewrap a line and move an inline # noqa off the line it suppresses.
  • Run pyright after formatting for the same reason: a wrapped line can strand a # type: ignore[...] or # pyright: ignore[...] on the wrong line (see notes/codebase-structure.md).
  • C901 enforces the complexity gate (max-complexity = 10); a function over CC=10 is a hard failure (IMPLTS-07-008).
  • RUF100 reports an unused # noqa. When your change fixes a baselined finding, delete its # noqa: RULE # ruff-baseline #N marker (IMPLTS-07-020).
  • All tools must exit 0 before staging.
  • A ... inputs unchanged since last success — skipping line is the guard reusing a prior pass, not a failure. On failure the guard records nothing, so the next run re-executes the tool.
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Run Linters?

Run the canonical set of linters used by maintainers: ruff (lint and format) over the repository, and pyright on the branch's changed Python files.

Как установить скилл Run Linters?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Run Linters запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить Run Linters с