mcpField
P
python-code-style

python-code-style

github.com/jurgendnDevelopment1139 installsUpdated 6w ago
Repository

About python-code-style

python-code-style is a skill for reviewing Python code for readability and maintainability. It combines tooling defaults such as ruff with human checks for naming, API boundaries, typing, documentation, and a minimal patch plan.

Key features

  1. 01Recommend linting and formatting defaults
  2. 02Review names and function responsibilities
  3. 03Check type hints and docstrings
  4. 04Identify readability risks and dead code
  5. 05Provide a minimal patch plan

Use cases

  1. 01Review a Python module before merging
  2. 02Identify missing type annotations and documentation
  3. 03Improve naming and function boundaries
  4. 04Plan focused code-style changes

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jurgendn/agent-skills --skill python-code-style

After installing, type/python-code-stylein Claude Code to confirm it loaded.

Bundled filesreferences/style-configs.md

Details

From the project README

Python Code Style

Use tools for mechanical style and human judgment for names, boundaries, and documentation. The goal is readable code that is easy to review and maintain.

For concrete config and docstring templates, read references/style-configs.md.

Defaults

  • Use ruff for linting/import sorting/formatting unless the project already has a different standard.
  • Use type hints for public APIs and non-obvious internal boundaries.
  • Prefer clear names over abbreviations.
  • Keep imports grouped: standard library, third-party, local.
  • Let the formatter decide line wrapping.

Review Checklist

Check:

  • names describe domain meaning;
  • functions have one clear job;
  • public functions/classes have type annotations;
  • docstrings explain behavior, inputs, outputs, and important side effects;
  • errors are explicit and useful;
  • imports are organized;
  • dead code and commented-out code are removed.

Naming

  • Functions/variables: snake_case.
  • Classes: PascalCase.
  • Constants: SCREAMING_SNAKE_CASE.
  • Private helpers: leading underscore only when truly internal.
  • Avoid one-letter names except tight mathematical/local contexts.

Documentation

Document why and contract, not every line. Add docstrings for public APIs, complex transformations, and anything future readers may misuse.

Output

Return:

  • style/config recommendations;
  • naming issues;
  • typing/docstring gaps;
  • risky readability issues;
  • minimal patch plan.

Comments

Markdown supported