SkillsReviewed · wdm0006

Python Code Quality

Python Code Quality is an assistant skill for Python developers who want cleaner code, but its sample configurations need adaptation and compatibility checks. It combines Ruff linting and formatting, mypy type checking, typing examples, and review guidance for error handling and reproducibility.

Researched 16 Nov 2026

In short.

Python Code Quality is an assistant skill for developers maintaining Python libraries, but its guidance and sample settings have not been tested here. Its strongest material goes beyond formatting: it addresses hidden lint exemptions, valid values lost through truthiness checks, failures disguised as success, and reproducibility problems. Four Markdown files supply the instructions and references; no executable integration, pinned tool dependencies, or host-specific installation procedure is supplied.

Researched and written by an AI model and checked by a second AI model. How it works

The scope is skills/python/code-quality/SKILL.md, MYPY_CONFIG.md, RUFF_CONFIG.md and TYPE_PATTERNS.md at revision ab8f96c3e0ed4fe0a42ed37bc5c4301afd6a2b5c, with the root LICENSE as the related notice. All four selected files and the notice are covered. Other repository folders and the contents of linked guides and blog posts are excluded. No code, command, assistant integration or configuration was executed; runtime behavior, compatibility, effectiveness and operating costs remain unassessed.

The overview

Identity

Python Code Quality is the skill named improving-python-code-quality in wdm0006/python-skills. Its scope is the skills/python/code-quality folder, containing SKILL.md, RUFF_CONFIG.md, MYPY_CONFIG.md and TYPE_PATTERNS.md. The original folder is [https://github.com/wdm0006/python-skills/tree/main/skills/python/code-quality].

The main file attributes its foundations to Will McGinnis's guide to developing Python libraries. This is a collection of assistant instructions and references, rather than a Python package or a standalone code-checking application.

Assessment

This is a useful fit for developers who want an assistant to review Python libraries against explicit conventions. Its distinctive value is the attention to mistakes that can survive apparently successful checks, including duplicate private helpers, incomplete batch results and fabricated fallback data.

Treat it as a review aid. The supplied files do not establish that an assistant will apply every instruction correctly, that the configurations work with a particular environment, or that following the checklist makes a library correct.

Users

Beginners can use the paired examples to understand mutable defaults, exception handling, type annotations and common Python idioms. Applying the configuration examples still requires familiarity with project files and command-line development tools.

Experienced library maintainers get stricter mypy settings, Ruff rule selection, structural typing examples and guidance for reviewing merge-related shadowing and nondeterministic output. Teams with established conventions will need to reconcile the suggested defaults with their own requirements.

Capabilities

The skill supplies Ruff configuration for linting, import ordering and formatting, plus mypy configuration for gradual or stricter type checking. Its typing reference covers function signatures, generics, protocols, aliases, overloads and TypedDict.

The review guidance addresses swallowed exceptions, lost subprocess output, indistinguishable success and error states, silent truncation, skipped batch failures, meaningful zero or false values, and duplicate module-level definitions. Reproducibility advice covers ordering serialized data, using local random generators and controlling parsing context. These are review instructions, not evidence that every issue is detected automatically.

Using it

Requirements

Applying the illustrated workflow requires access to Python project source, an editable pyproject.toml and separately installed Ruff and mypy tools. An assistant must be able to read the skill files; supported assistants and their loading requirements are not specified.

The configurations target Python 3.10, but the files do not establish a supported Python and tool-version matrix. The uv command installs example type-stub packages; it is not a complete environment setup. NumPy appears in a reproducibility example, rather than as a declared requirement of the skill.

Mechanism

SKILL.md describes when to use the skill, presents review rules and links to the three supporting references. An assistant can use that text to propose changes and configurations. Ruff performs the illustrated linting and formatting, while mypy performs the illustrated type checking when those tools are separately invoked.

The selected folder contains Markdown guidance, with no automation runner or integration implementation. Automatic activation, tool execution permissions and enforcement depend on the assistant environment and are not established by these files.

Setup

Keep SKILL.md beside its three reference files so the relative references remain usable, then make the folder available through the assistant's supported skill-loading mechanism. The resource does not document a host-specific installation procedure.

Adapt the pyproject.toml examples to the project's Python target, source paths and conventions. Replace the my_library placeholder in Ruff's import settings, choose lint rules deliberately, and decide whether to introduce mypy gradually or require stricter annotations immediately. Install the checking tools separately and verify their accepted settings before relying on them.

Example

Consider a scheduler where start_hour=0 means midnight. The skill explains that config.get("start_hour") or 9 replaces that valid zero with 9. Its suggested correction is to read the value and substitute 9 only when the value is None.

A related review could inspect batch processing for silently skipped files and return explicit error records alongside processed results. These examples illustrate the intended review behavior; they are not observed outcomes from running the resource.

Assessment & evidence

Limitations

The examples include fragments, omitted implementations and context-dependent imports. They are not a complete runnable library. No pinned tool dependencies, compatibility results, benchmarks or demonstrated assistant outcomes are supplied, and nothing was executed.

RUFF_CONFIG.md describes the S security-rule category, but its comprehensive select list does not include S. That example should not be understood as enabling the security category merely because it appears in the reference table.

The configuration targets Python 3.10, while TYPE_PATTERNS.md imports Required and NotRequired from typing without discussing compatibility or a backport. Compatibility of every typing example with that target is not established. The proposed dummy-variable-rgx change also has an explicit tradeoff: assignments to names such as _unused can start producing unused-variable findings.

Reasoning

The skill's most useful principle is that a successful check is meaningful only when it covers the intended mistake. Its private-helper example illustrates this: the author reports that Ruff's default dummy-name handling can allow duplicate underscore-prefixed definitions through F811, and recommends deliberately confirming that a protective rule detects a representative violation.

The same principle connects its other advice. Distinct error states preserve failure information, completeness indicators expose partial results, and controlled ordering and randomness make results easier to reproduce and compare. These are concrete reasons to use the guidance, while the claimed Ruff behavior still requires confirmation with the project's installed version.

Alternatives

For a narrower task, the Ruff reference can serve as a linting and formatting starting point, or the mypy reference can support gradual adoption of type checking. Those configurations alone do not include the main skill's broader error-handling and reproducibility review guidance.

For explanatory reading, SKILL.md points to the author's Guide to Developing High-Quality Python Libraries [https://mcginniscommawill.com/guides/python-library-development/]. The linked guide's contents and its completeness relative to this skill are not established by the supplied files.

Evidence

The source snapshot contains the main skill, all three reference files in the selected folder and the repository's root LICENSE at revision ab8f96c3e0ed4fe0a42ed37bc5c4301afd6a2b5c. A revision-specific copy of the main file is [https://raw.githubusercontent.com/wdm0006/python-skills/ab8f96c3e0ed4fe0a42ed37bc5c4301afd6a2b5c/skills/python/code-quality/SKILL.md].

These documents establish the instructions, example settings and license terms. They do not establish actual tool results, successful host installation, assistant adherence or improvements on a real project. The Ruff 0.16 verification statement is an author-reported observation, without an accompanying execution transcript.

Access & freshness

Costs

The files provide no product price or end-to-end cost estimate. The MIT notice grants reuse permission free of charge, but it does not establish the cost of an assistant, model provider or development environment.

Assistant usage charges, setup effort, maintenance time and computing costs are unknown. No token usage, runtime measurements or cost savings are supplied.

Rights

The captured repository LICENSE is the MIT License, with copyright attributed to Will McGinnis, 2025. It permits use, copying, modification, distribution, sublicensing and sale of the software and associated documentation, subject to retaining the copyright and permission notice in copies or substantial portions.

The license disclaims warranties and liability. It supports redistribution of these files with the required notice; it does not establish rights to republish the separate guide or blog posts linked from SKILL.md.

Freshness

The supplied snapshot was captured on 2026-11-16 at 14:58:51.410 UTC. That identifies the source snapshot, not the date of the latest upstream edit or a promise that the main branch still contains identical files.

The skill mentions an observation on Ruff 0.16, but the configurations do not pin Ruff or mypy versions. Compatibility with other releases and current upstream behavior remain unassessed.

Actions

Keep the four Markdown files together and retain LICENSE when copying or redistributing them. Before adoption, confirm that the assistant can load the skill and that the project's Python, Ruff and mypy versions support the examples you intend to use.

Start with a bounded review, such as preserving valid zero values or exposing partial batch failures. Review the proposed edits, run the relevant project checks, and deliberately confirm any lint rule relied upon to prevent a specific mistake. Apply the dummy-name regex change only after considering its effect on existing underscore-prefixed assignments.

Evidence for this report

LICENSEnotice · checked 2026-11-16
skills/python/code-quality/MYPY_CONFIG.mdselected · checked 2026-11-16
skills/python/code-quality/RUFF_CONFIG.mdselected · checked 2026-11-16
skills/python/code-quality/SKILL.mdselected · checked 2026-11-16
skills/python/code-quality/TYPE_PATTERNS.mdselected · checked 2026-11-16