Skip to content

Python Code Style Guide

Makes the agent apply modern Python linting, formatting, naming and docstring standards

Repository
wshobson/agents
Stars
42,095
Licence
MIT
Files
1 file

What it does

When this skill is installed, the agent follows a defined set of Python style rules when writing or reviewing code. It recommends ruff for linting and formatting, mypy or pyright for strict type checking, PEP 8 naming conventions, a fixed import order, and Google-style docstrings. It can also produce pyproject.toml configuration snippets and README-style project documentation in that format.

Great for

  • Developers setting up linting, formatting and type checking in a new Python project
  • Teams that want a shared written standard for naming, imports and docstrings
  • Reviewers who want consistent feedback on style in Python pull requests

Skip it if

  • Projects that already use a different style guide (such as Black with a custom config or NumPy docstrings), since the skill will push its own conventions
  • Non-Python codebases, where the advice does not apply

Try asking

  • “Set up ruff and mypy in my pyproject.toml for a new Python 3.12 project”
  • “Review this module for PEP 8 naming and import order problems”
  • “Write Google-style docstrings for the public functions in this service class”
  • “Create a README structure for my Python package”
Step-by-step guide: how to use Python Code Style GuideInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    python-code-style.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip python-code-style.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip python-code-style.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • State your project's minimum Python version so the agent sets target-version correctly rather than using the default py312
  • Tell the agent if your team already has a linter config, so it extends that config instead of replacing it
  • Ask for changes to existing code in small batches so the reformatting is easy to review

What's inside

  • SKILL.md

Redistributed unmodified from wshobson/agents under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.