ruff-patterns

ruff-patterns is a skill for Claude Code from ruslan-korneev/claude-plugins. It costs 0 tokens per session (1,005 once invoked), scanned A, original, MIT.

A set of guidelines for using Ruff, a Python tool that checks code for style and common mistakes and can format files. It recommends fixing reported problems properly instead of hiding them with noqa comments.

In plain words
What is it for?
Use it to configure Ruff for a Python project, understand specific lint errors, format code, and apply safe fixes without adding noqa exclusions.
Why use it?
It provides consistent ways to configure Ruff and resolve its warnings while avoiding suppressed errors that can hide real problems.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the python plugin — 4 skills, 10 commands, 1 agent, 1 hook shipped together

Good fit Use it to configure Ruff for a Python project, understand specific lint errors, format code, and apply safe fixes without adding noqa exclusions.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ruslan-korneev/claude-plugins
Claude Code
/plugin install python

Made for: Claude Code.

Or install python, the plugin that ships this one along with the rest of its 4 skills, 10 commands, 1 agent, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ruff-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/ruslan-korneev/claude-plugins/ruff-patterns/github.svg)](https://agentmods.dev/skills/ruslan-korneev/claude-plugins/ruff-patterns)
Your own site
<a href="https://agentmods.dev/skills/ruslan-korneev/claude-plugins/ruff-patterns"><img src="https://agentmods.dev/badge/skills/ruslan-korneev/claude-plugins/ruff-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ruff-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/ruslan-korneev/claude-plugins/ruff-patterns"><img src="https://agentmods.dev/badge/skills/ruslan-korneev/claude-plugins/ruff-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,005 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01005
Opus 5.5 $0.00000 $0.00402
Sonnet 5.5 $0.00000 $0.00201
Haiku 4.5 $0.00000 $0.00101

Measured 3mo ago against content hash 2297be763f35, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ruff-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/python/skills/ruff-patterns/SKILL.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 solving it
  • Technical debt
  • A potential source of bugs

Instead of noqa:

  1. Fix the code properly
  2. Configure per-file-ignores for specific cases (tests, migrations)
  3. Disable the rule globally if it doesn't fit the project

More details: ${CLAUDE_PLUGIN_ROOT}/skills/ruff-patterns/references/why-no-noqa.md

Quick Start

Installation

uv add ruff --dev

Basic Usage

# 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 .

For FastAPI Projects

[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

Quick Reference

Read the full file on GitHub · 153 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 153 lines · 0 tokens per session scan A 2297be763f35

Subscribe to this mod's changes

ruff-patterns is a skill published in the GitHub repository ruslan-korneev/claude-plugins (5 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,005 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

ruff-patterns compared with skills from other repositories

ruff-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ruff-patternsruslan-korneev/claude-pluginsSkill59mo agoMITA0Claude Code
writing-pythonAleksandarBisevac/claude-pluginsSkill5todayMITA161Claude Code
no-silent-passAleksandarBisevac/claude-pluginsSkill5todayMITA143Claude Code
night-market-build-and-envathola/claude-night-marketSkill358todayMITA42Claude Code
makefile-generationathola/claude-night-marketSkill358todayMITA31Claude Code
shiny-py-optimizeposit-dev/skillsSkill57618d agoMITA105Claude Code
cloudflare-workers-multi-langsecondsky/claude-skillsSkill257yesterdayMITA45Claude Code