code-quality

code-quality is a skill for Claude Code from sam-dumont/claude-skills. It costs 165 tokens per session (2,953 once invoked), scanned A, original, MIT.

A Python code-quality setup and checking workflow. It combines tools for linting, formatting, static type checking, complexity, unused-code detection, and Git hooks.

In plain words
What is it for?
Use it when setting up or auditing Python projects, configuring ruff or mypy, adding pre-commit hooks, and enforcing quality checks through a Makefile.
Why use it?
It turns scattered code checks into repeatable commands that can also fail a build or continuous-integration check when standards are not met.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the code-quality plugin — 1 skill shipped together

Good fit Use it when setting up or auditing Python projects, configuring ruff or mypy, adding pre-commit hooks, and enforcing quality checks through a Makefile.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sam-dumont/claude-skills/code-quality
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.

Any agent
npx skills add sam-dumont/claude-skills --skill code-quality
Clone the repo
git clone --depth 1 https://github.com/sam-dumont/claude-skills

Made for: Claude Code.

Or install code-quality, the plugin that ships this one along with the rest of its 1 skill.

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 code-quality

README.md
[![agentmods](https://agentmods.dev/badge/skills/sam-dumont/claude-skills/code-quality/github.svg)](https://agentmods.dev/skills/sam-dumont/claude-skills/code-quality)
Your own site
<a href="https://agentmods.dev/skills/sam-dumont/claude-skills/code-quality"><img src="https://agentmods.dev/badge/skills/sam-dumont/claude-skills/code-quality/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 code-quality

Your own site · 80×15
<a href="https://agentmods.dev/skills/sam-dumont/claude-skills/code-quality"><img src="https://agentmods.dev/badge/skills/sam-dumont/claude-skills/code-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,953 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.00165 $0.02953
Opus 5.5 $0.00066 $0.01181
Sonnet 5.5 $0.00033 $0.00591
Haiku 4.5 $0.00016 $0.00295

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

Security

Grade A, and why

code-quality 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 2mo 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/code-quality/skills/code-quality/SKILL.md · 387 lines

How it starts

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

Python Code Quality Skill

This skill sets up and enforces comprehensive Python code quality using a battle-tested toolchain. Based on real production Makefiles using uv for fast dependency management.

Philosophy

  • Fast feedback: Use uv run and uvx for instant tool execution — no global installs
  • Layered checks: Lint → Format → Typecheck → Complexity → Dead Code → File Length
  • CI-ready: Every check is a Makefile target that returns non-zero on failure
  • Opinionated defaults: Start strict, relax only with justification

Tool Stack

Tool Purpose Config Location
ruff Linting + formatting (replaces flake8, isort, black) pyproject.toml
mypy Static type checking pyproject.toml
xenon Cyclomatic complexity gating CLI flags
vulture Dead code detection CLI flags
pre-commit Git hook automation .pre-commit-config.yaml

Setup: pyproject.toml Configuration

When setting up code quality for a Python project, add these sections to pyproject.toml:

# =============================================================================
# Ruff — Linting & Formatting
# =============================================================================
[tool.ruff]
target-version = "py312"           # Adjust to project's minimum Python version
line-length = 120
src = ["src", "tests"]

[tool.ruff.lint]
select = [
    "E",      # pycodestyle errors
    "W",      # pycodestyle warnings
    "F",      # pyflakes
    "I",      # isort (import sorting)
    "N",      # pep8-naming
    "UP",     # pyupgrade
    "B",      # flake8-bugbear
    "SIM",    # flake8-simplify
    "S",      # flake8-bandit (security)
    "A",      # flake8-builtins
    "C4",     # flake8-comprehensions
    "DTZ",    # flake8-datetimez
    "T20",    # flake8-print
    "PT",     # flake8-pytest-style
    "RET",    # flake8-return
    "PTH",    # flake8-use-pathlib
    "ERA",    # eradicate (commented-out code)
    "PL",     # pylint subset
    "RUF",    # ruff-specific rules
]
ignore = [
    "S101",   # assert usage (fine in tests)
    "PLR0913", # too many arguments (relax for data-heavy functions)
]

[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101", "PLR2004", "T20"]  # Allow asserts, magic values, prints in tests

[tool.ruff.lint.isort]
known-first-party = ["PROJECT_NAME"]   # Replace with actual package name

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"

# =============================================================================
# Mypy — Type Checking
# =============================================================================
[tool.mypy]
python_version = "3.12"               # Adjust to project's minimum Python version
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
strict_equality = true
warn_redundant_casts = true
warn_unused_ignores = true
no_implicit_reexport = true

[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false          # Relax for test functions

# =============================================================================
# Pytest
# =============================================================================
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --strict-markers"
markers = [
    "slow: marks tests as slow (deselect with '-m \"not slow\"')",
]

Read the full file on GitHub · 387 lines

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. 2mo ago First seen · 387 lines · 165 tokens per session scan A ad79dfd2377b

Subscribe to this mod's changes

code-quality is a skill published in the GitHub repository sam-dumont/claude-skills (38 stars, last pushed 5d ago), licensed MIT. It adds 165 tokens to every session and 2,953 once invoked, about $0.0007 per session on Opus 5.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

code-quality compared with skills from other repositories

code-quality next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-qualitysam-dumont/claude-skillsSkill385d agoMITA165Claude Code
mcore-linting-and-formattingNVIDIA/skillsSkill3.9kyesterdayApache-2.0A44Claude Code
python-review-checklistawslabs/cli-agent-orchestratorSkill1.5ktodayApache-2.0A20Claude Code, Codex
best-practicesFradSer/dotclaudeSkill5962d agoMITA52Claude Code
coding.factor_common_codegpsaggese/helpersSkill158yesterdayApache-2.0A12Claude Code
plankton-code-qualityloulanyue/awesome-claude-notesSkill2711mo agoMITA34Claude Code
python-servicesiliaal/whetstoneSkill36yesterdayMITA48Claude Code, Codex