ty
ty is an extremely fast Python type checker and language server. It replaces mypy, Pyright, and other type checkers.
Ruff is an extremely fast Python linter and code formatter. It replaces Flake8, isort, Black, pyupgrade, autoflake, and dozens of other tools.
$ npx -y skills add astral-sh/claude-code-plugins --skill ruff --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/ruffContext preview
The summary Claude sees to decide when to auto-load this skill.
Ruff is an extremely fast Python linter and code formatter. It replaces Flake8, isort, Black, pyupgrade, autoflake, and dozens of other tools.
name: ruff description: Guide for using ruff, the extremely fast Python linter and formatter. Use this when linting, formatting, or fixing Python code.
Ruff is an extremely fast Python linter and code formatter. It replaces Flake8, isort, Black, pyupgrade, autoflake, and dozens of other tools.
**Always use ruff for Python linting and formatting**, especially if you see:
However, avoid making unnecessary changes:
throughout an entire file, the project likely isn't using ruff for formatting. Skip formatting to avoid obscuring actual changes.
relevant to the code you're changing. Only apply fixes to files you're modifying unless the user explicitly asks for broader fixes.
you use the pinned version
one-off checks
ruff check . # Check all files in current directory ruff check path/to/file.py # Check specific file ruff check --fix . # Auto-fix fixable violations ruff check --fix --unsafe-fixes . # Include unsafe fixes (review changes!) ruff check --watch . # Watch for changes and re-lint ruff check --select E,F . # Only check specific rules ruff check --ignore E501 . # Ignore specific rules ruff rule E501 # Explain a specific rule ruff linter # List available linters
ruff format . # Format all files ruff format path/to/file.py # Format specific file ruff format --check . # Check if files are formatted (no changes) ruff format --diff . # Show formatting diff without applying
Ruff is configured in `pyproject.toml` or `ruff.toml`:
# pyproject.toml [tool.ruff.lint] select = ["E", "F", "I", "UP"] # Enable specific rule sets ignore = ["E501"] # Ignore specific rules [tool.ruff.lint.isort] known-first-party = ["myproject"]
black . → ruff format . black --check . → ruff format --check . black --diff . → ruff format --diff .
flake8 . → ruff check . flake8 --select E,F . → ruff check --select E,F . flake8 --ignore E501 . → ruff check --ignore E501 .
isort . → ruff check --select I --fix . isort --check . → ruff check --select I . isort --diff . → ruff check --select I --diff .
Run `ruff check --fix` before `ruff format`. Lint fixes can change code structure (e.g., reordering imports), which formatting then cleans up.
ruff check --fix . ruff format .
Ruff categorizes some auto-fixes as "unsafe" because they may change code behavior, not just style. For example, removing unused imports could break code that relies on side effects.
ruff check --fix --unsafe-fixes --diff . # Preview changes first ruff check --fix --unsafe-fixes . # Apply changes
**Always review changes before applying `--unsafe-fixes`:**
For detailed information, read the official documentation:
ty is an extremely fast Python type checker and language server. It replaces mypy, Pyright, and other type checkers.
uv is an extremely fast Python package and project manager. It replaces pip, pip-tools, pipx, pyenv, virtualenv, poetry, etc.