Lint Modified Files

SkillDev tools

The lint skill runs linting and formatting checks on modified Ray project code using pre-commit. It automatically fixes simple issues such as formatting, long lines, and unused imports. For errors that remain, it guides you through direct code edits, sparingly applied # noqa comments with reasons, and awareness of per-file exclusions.

Use Lint Modified Files in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Lint Modified Files and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the Lint Modified Files skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Have a Ray project with pre-commit configured.

Lint Modified FilesStart free

What your AI can do with it

  • Runs pre-commit hooks over files modified by an agent
  • Automatically fixes formatting, long lines, and unused imports
  • Guides handling of remaining errors through direct code edits
  • Applies # noqa comments sparingly with reasons
  • Respects per-file exclusions

Getting started

  1. Have a Ray project with pre-commit configured.
  2. Make code changes that you want checked.
  3. Invoke the lint skill on the modified files.
  4. Review the automatic fixes and any remaining errors.
  5. Apply the suggested edits or # noqa comments as needed.

What this skill tells your AI

The instructions your AI receives, as published by ray-project/ray in .claude/skills/lint/SKILL.md and read by ahel’s review.

Run pre-commit on the files you changed:

pre-commit run --files $(git diff --name-only HEAD)

pre-commit run without --files only operates on staged files, so pass the modified file list explicitly.

If pre-commit is not installed:

pip install -c python/requirements_compiled.txt pre-commit && pre-commit install

Handling remaining errors

Pre-commit auto-fixes simple issues (formatting, long lines, unused imports). Review any remaining errors — these typically need code changes such as adding a missing import, resolving a name conflict, or restructuring logic. Fix them by editing the source code directly.

Use # noqa only for false positives that cannot be resolved by changing the code, and include the rule code and reason: # noqa: E501 — URL cannot be split.

Exclusions

pyproject.toml lists files in per-file-ignores and extend-exclude. When the PR modifies a file that is on one of these lists, fix the lint issues in your changes and consider removing the file from the list. Leave exclusion entries for files outside the PR scope untouched.

Reference

  • Hook config: .pre-commit-config.yaml
  • Ruff config: pyproject.toml ([tool.ruff] section)
  • Docs: doc/source/ray-contribute/development.md ("Development tooling")

Signals

GitHub stars
44k
Forks
8k
Last commit
Oct 2026

ahel review

  • K1binfo
    installs-packages

Automated review, not a security audit. Ruleset v1+k2.

Questions

What does the lint skill do?
It runs pre-commit hooks over files an agent has modified, automatically fixing simple issues like formatting, long lines, and unused imports, then guides handling of remaining errors.
Does it automatically fix all lint errors?
No. It automatically fixes simple issues such as formatting, long lines, and unused imports. Remaining errors require direct code edits or sparingly applied # noqa comments with reasons.
How does it handle per-file exclusions?
It is aware of per-file exclusions and respects them when running checks and suggesting fixes.
Can I use it on any project?
It is designed for Ray project code and uses pre-commit, so it expects a Ray project with pre-commit configured.
When should I use # noqa comments?
Use them sparingly, only when a remaining error cannot be resolved by a direct code edit, and always include a reason.
Advanced
Item type
skill
Key
lint-ray-project
Source
github.com/ray-project/ray