astral-sh/claude-code-plugins/ruff
Claude Code and agent skill by astral-sh/claude-code-plugins
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Guide for using ruff, the extremely fast Python linter and formatter. Use this when linting, formatting, or fixing Python code.
Install
npx vskill@latest install astral-sh/claude-code-plugins/ruffSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
ruff
Ruff is an extremely fast Python linter and code formatter. It replaces Flake8, isort, Black, pyupgrade, autoflake, and dozens of other tools.
When to use ruff
Always use ruff for Python linting and formatting, especially if you see:
[tool.ruff]section inpyproject.toml- A
ruff.tomlor.ruff.tomlconfiguration file
However, avoid making unnecessary changes:
- Don't format unformatted code - If
ruff format --diffshows changes
throughout an entire file, the project likely isn't using ruff for formatting. Skip formatting to avoid obscuring actual changes.
- Scope fixes to code being edited - Use
ruff check --diffto see fixes
relevant to the code you're changing. Only apply fixes to files you're modifying unless the user explicitly asks for broader fixes.
How to invoke ruff
uv run ruff ...- Use when ruff is in the project's dependencies to ensure
you use the pinned version
uvx ruff ...- Use when ruff is not a project dependency, or for quick
one-off checks
ruff ...- Use if ruff is installed globally
Commands
Linting
Formatting
Configuration
Ruff is configured in pyproject.toml or ruff.toml:
Migrating from other tools
Black → ruff format
Flake8 → ruff check
isort → ruff check
Common patterns
Apply lint fixes before formatting
Run ruff check --fix before ruff format. Lint fixes can change code structure (e.g., reordering imports), which formatting then cleans up.
Applying and reviewing unsafe fixes
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.
Always review changes before applying `--unsafe-fixes`:
- Use
ruff rule <CODE>to understand why the fix is considered unsafe - Verify the fix doesn't violate those assumptions in your code
Documentation
For detailed information, read the official documentation:
- https://docs.astral.sh/ruff/
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/astral/skills/ruff/SKILL.md
Popularity
- 7-day trend score
- 0
Refreshed 19 Mar 2026, 7 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/astral-sh/claude-code-plugins/ruff)