ruff

ruff is a skill for Claude Code, Codex from hyperb1iss/hyperskills. It costs 104 tokens per session (2,731 once invoked), scanned A, original, MIT.

A Python code checker and formatter that can also inspect dependency relationships. It is commonly used as a faster replacement for tools such as Flake8, Black, and isort.

In plain words
What is it for?
Use it to lint, format, autofix, or inspect Python projects, including configurations and rule selections.
Why use it?
It catches errors and style problems and can automatically format or fix some issues before code is reviewed or run.

Skill for Claude CodeCodex

Part of the hyperskills plugin — 18 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hyperb1iss/hyperskills/ruff
Any agent
npx skills add hyperb1iss/hyperskills --skill ruff
Clone the repo
git clone --depth 1 https://github.com/hyperb1iss/hyperskills

Made for: Claude Code, Codex.

Or install hyperskills, the plugin that ships this one along with the rest of its 18 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/hyperb1iss/hyperskills/ruff.svg)](https://agentmods.dev/skills/hyperb1iss/hyperskills/ruff)
Your own site
<a href="https://agentmods.dev/skills/hyperb1iss/hyperskills/ruff"><img src="https://agentmods.dev/badge/skills/hyperb1iss/hyperskills/ruff.svg" alt="Measured on agentmods" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,731 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00104 $0.02731
Opus 5 $0.00052 $0.01366
Sonnet 5 $0.00021 $0.00546
Haiku 4.5 $0.00010 $0.00273

Measured 3d ago against content hash 4a705c7e5d5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ruff 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 3d 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.

skills/ruff/SKILL.md · 275 lines

How it starts

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

ruff: Python Linter & Formatter

ruff is three tools in one Rust binary: linter (ruff check), formatter (ruff format), and dependency analyzer (ruff analyze graph). It replaces Flake8, Black, isort, pyupgrade, and dozens more.

Snapshot: v0.15.12, Apr 2026. The installed binary outranks this file. Check ruff --version and ruff check --help when a flag or rule code here doesn't land.

The built-in language server (ruff server) replaces the deprecated ruff-lsp package (archived Dec 2025).

Invocation

uv run ruff ...     # Project dependency (pinned version)
uvx ruff ...        # One-off (latest)
ruff ...            # Global install

Rule Selection: The Critical Decision

Default rules are minimal: only ["E4", "E7", "E9", "F"], catches syntax errors and undefined names but misses most quality rules. You almost certainly need to extend this.

select vs extend-select

Command Behavior
select = ["E", "F", "B"] Replaces entire default set. Only these run.
extend-select = ["B"] Adds to whatever select provides (or defaults)

Config inheritance trap: When a child config specifies select, the parent's ignore list is discarded. This surprises people with monorepo setups.

Specificity wins: More specific prefixes override less specific ones. select = ["E"] + ignore = ["E501"] enables all E rules except E501.

Recommended Selection Strategy

New project, start broad:

[tool.ruff.lint]
select = [
    "E", "W",    # pycodestyle
    "F",         # Pyflakes
    "I",         # isort
    "N",         # pep8-naming
    "UP",        # pyupgrade
    "B",         # flake8-bugbear
    "SIM",       # flake8-simplify
    "TC",        # flake8-type-checking
    "RUF",       # Ruff-specific
]
ignore = ["E501"]  # Let formatter handle line length

Read the full file on GitHub · 275 lines

Files

What ships with it

2 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. 3d ago First seen · 275 lines · 104 tokens per session scan A 4a705c7e5d5e

Subscribe to this mod's changes

ruff is a skill published in the GitHub repository hyperb1iss/hyperskills (31 stars, last pushed 7d ago), licensed MIT. It adds 104 tokens to every session and 2,731 once invoked, about $0.0005 per session on Opus 5. 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-30.

Related

Other skills, from other repositories

developing-kafka-python-client

Use when the user wants to build a Python Kafka producer or consumer, add Schema Registry to existing Python code, migrate from raw JSON to schema-backed serialization, or scaffold a confluent-kafka-python project for Confluent Cloud, local Docker, or WarpStream. Also use when user wants to optimize Python Kafka…

confluentinc/agent-skills · 75 tokens

python-api

Look up the public API of a Python package against the installed version and cache what's worth keeping. Four shapes by question type: (0) cache hit under scratch/api/ / /; (1) inspect.signature + pydoc.renderdoc for a symbol; (2) dir / pkgutil.itermodules for a module surface; (3) WebSearch + WebFetch of versioned…

probabl-ai/skills · 466 tokens

python-code-style

Owns Python code style for this stack: ruff for lint + format, numpydoc for docstrings. Three responsibilities — (1) place the project's ruff.toml from the bundled template once the stack and workspace are in place, (2) run ruff against any Python files Claude has just generated or edited, and (3) contextualize each…

probabl-ai/skills · 425 tokens

python-services

Python patterns for CLI tools, async concurrency, and backend services. Use when working with Python code, building CLI apps, FastAPI services, async with asyncio, background jobs, or configuring uv, ruff, ty, pytest, or pyproject.toml.

iliaal/ai-skills · 55 tokens

data-science-python-stack

Opinionated Python stack for data-science / ML work — one library per job, organized into tiers (mandatory / user choice / optional / transitive). SKILL.md is the index; per-library references/ .md files carry scope, "pick this when" / "pick something else when", and pairings. TRIGGER when (any of these): (1) a…

probabl-ai/skills · 426 tokens

upstash-box-py

Work with the upstash-box Python SDK for sandboxed cloud containers with AI agents, shell, filesystem, git, cron schedules, and a headless browser. Use when building with Upstash Box in Python, creating sandboxed environments, running AI agents in containers, browser automation from a box, or orchestrating parallel…

upstash/skills · 71 tokens