/python-fastapi:rufffrom python-fastapi
Guide for using ruff, the extremely fast Python linter and formatter. Use this when linting, formatting, or fixing Python code.
Ships in python-fastapi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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:
[tool.ruff] section in pyproject.tomlruff.toml or .ruff.toml configuration fileHowever, avoid making unnecessary changes:
ruff format --diff shows changes
throughout an entire file, the project likely isn't using ruff for formatting.
Skip formatting to avoid obscuring actual changes.ruff check --diff to 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.uv run ruff ... - Use when ruff is in the project's dependencies to ensure
you use the pinned versionuvx ruff ... - Use when ruff is not a project dependency, or for quick
one-off checksruff ... - Use if ruff is installed globallyruff 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
uv format runs the Ruff formatter. Use uv format --check -- path/to/file.py
to check one file. By default, uv format selects a Ruff version independently
of the project's lockfile. When the project pins Ruff, use uv run ruff format
to match its formatter version.
Ruff is configured in pyproject.toml or ruff.toml:
# pyproject.toml
[tool.ruff.lint]
extend-select = ["I", "UP"] # Add import sorting and pyupgrade to the defaults
[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's full diagnostic output can show a suggested change even when --fix
would leave the code alone. Safe fixes can be applied with --fix. Unsafe fixes
may change behavior and also require --unsafe-fixes. A suggestion marked for
manual review, such as removing commented-out code for ERA001, requires a
manual edit.
ruff check --fix --unsafe-fixes --diff . # Preview changes first
ruff check --fix --unsafe-fixes . # Apply changes
Always review changes before applying --unsafe-fixes:
ruff rule <CODE> to understand why the fix is considered unsafeFor detailed information, read the official documentation:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub fcakiroglu16/marketplace --plugin python-fastapi5 skills in this plugin
/fastapiFastAPI best practices and conventions. Use when working with FastAPI APIs, Pydantic models, dependencies, streaming responses including Server-Sent Events (SSE), and serving frontend apps. Keeps FastAPI code clean and up to date with the latest features and patterns./pydanticPydantic is a Python data validation and serialization library, based on type hints. Use this skill whenever you need to do relatively complex data modeling using Pydantic, e.g. when adding constraints, defining a model hierarchy with subclasses, etc./tyGuide for using ty, the extremely fast Python type checker and language server. Use this when type checking Python code or setting up type checking in Python projects.Other plugins' skills for the same job