plugins/python/skills/ruff-patterns/SKILL.md
# Ruff Patterns Knowledge about the ruff linter and patterns for solving errors. **ZERO noqa policy** — always look for the proper solution. ## Triggers Use this skill when the user: - Asks "how to configure ruff" - Gets a ruff error and wants to understand how to fix it - Wants to migrate from black/isort/flake8/pylint - Asks about a specific rule (E501, F401, etc.) ## Main Principle: NEVER USE NOQA **Every ruff error has a proper solution.** Using `# noqa` is: - Hiding the problem, not so
npx skillsauth add ruslan-korneev/claude-plugins plugins/python/skills/ruff-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Knowledge about the ruff linter and patterns for solving errors. ZERO noqa policy — always look for the proper solution.
Use this skill when the user:
Every ruff error has a proper solution. Using # noqa is:
Instead of noqa:
More details: ${CLAUDE_PLUGIN_ROOT}/skills/ruff-patterns/references/why-no-noqa.md
uv add ruff --dev
# Check
ruff check .
# Format
ruff format .
# Auto-fix safe errors
ruff check --fix .
# Auto-fix all errors (including potentially unsafe)
ruff check --fix --unsafe-fixes .
[tool.ruff]
target-version = "py312"
line-length = 120
src = ["src"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D", # docstrings
"ANN101", # self annotation
"ANN102", # cls annotation
"FBT003", # boolean positional arg
"PLR0913", # too many arguments
"S101", # assert (allowed in tests via per-file-ignores)
"COM812", # trailing comma conflict
"ISC001", # implicit string concat conflict
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101", "PLR2004"]
"alembic/versions/*.py" = ["ALL"]
"__init__.py" = ["F401"]
[tool.ruff.format]
quote-style = "double"
Full example: ${CLAUDE_PLUGIN_ROOT}/skills/ruff-patterns/examples/fastapi-pyproject.toml
Detailed solution database: ${CLAUDE_PLUGIN_ROOT}/skills/ruff-patterns/references/rule-solutions.md
| Code | Problem | Solution |
|------|---------|----------|
| E501 | Line too long | Use parentheses for line breaks |
| F401 | Unused import | Remove or add to __all__ |
| F841 | Unused variable | Use _ or remove |
| B008 | Function call in default | None + check |
| PLR0913 | Too many arguments | Dataclass/Pydantic model |
| S101 | Assert in code | Explicit check + raise |
| UP007 | Outdated Union | Use X \| Y |
Ruff completely replaces these tools:
ruff format = blackruff check --select I = isortruff check = flake8 + plugins# Remove old dependencies
uv remove black isort flake8 flake8-bugbear flake8-comprehensions
# Add ruff
uv add ruff --dev
# Remove old configs
rm .flake8 .isort.cfg
# Remove [tool.black], [tool.isort] sections from pyproject.toml
Ruff covers most pylint rules through PL* groups:
- name: Lint with ruff
run: |
ruff check --output-format=github .
ruff format --check .
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
/lint:check [path] — check code/lint:explain <error> — error explanation + solution/lint:config [preset] — configure ruff for the projecttools
# Code Review Skill This skill should be used when the user asks for "code review", "review my changes", "review this PR", "check my code", "pre-merge review", "review diff", or mentions reviewing code quality, implementation correctness, or preparing changes for merge. ## Overview Code review following the **Review Pyramid** methodology — a prioritized approach that focuses on what matters most. ## The Review Pyramid ``` ▲ /|\ 5. Code Style (Nit) ← Least important,
tools
# Architecture Patterns System-level architecture patterns for Python backend projects (FastAPI + SQLAlchemy 2.0). ## Triggers Use this skill when the user: - Designs a new system or major feature - Asks about project structure or module boundaries - Makes data modeling decisions - Designs API contracts - Evaluates architectural trade-offs - Creates or reviews Architecture Decision Records (ADR) - Needs to modernize legacy code ## Abstraction Levels | Plugin | Level | Focus | |--------|----
tools
# Python Typing Patterns Python type annotation patterns without `type: ignore`. Always the correct solution. ## Triggers Use this skill when the user: - Gets mypy/pyright errors - Asks about Python type annotations - Wants to add type hints - Works with generics, protocols, TypeVar ## Main Principle: NEVER type: ignore Every type error has a correct solution. `type: ignore` is: - Masking potential bugs - Disabling type checking - Technical debt More details: `${CLAUDE_PLUGIN_ROOT}/skills/
tools
# Pytest Patterns Quality testing patterns with pytest for FastAPI projects. **TDD-first approach**. ## Triggers Use this skill when the user: - Wants to write tests - Asks about pytest, fixtures, mocks - Wants to set up testing for FastAPI - Uses TDD approach ## Main Principle: TDD 1. **Red** — write a failing test 2. **Green** — write minimal code 3. **Refactor** — improve while keeping tests green ## What Makes a Good Test ### 1. Clear Name ```python # ✅ Good — describes what, when, a