wshobson avatar

Python Code Style

Covers the full spectrum of Python code quality tooling with a focus on modern practices like ruff over black/flake8 and 120-character line limits. The configurations are production-ready, especially the pyproject.toml setups for ruff and mypy that you can drop straight into a project. Heavy emphasis on Google-style docstrings with realistic examples that show proper argument documentation and exception handling. The naming convention examples are spot-on for teams trying to establish consistency. This handles the boring-but-critical setup work that every Python project needs but most developers piece together from scattered sources.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
14
skills.sh installs
17.1K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill python-code-style --agent claude-code

Installs into .claude/skills of the current project.

Files

Python Code Style & Documentation

Consistent code style and clear documentation make codebases maintainable and collaborative. This skill covers modern Python tooling, naming conventions, and documentation standards.

When to Use This Skill

  • Setting up linting and formatting for a new project
  • Writing or reviewing docstrings
  • Establishing team coding standards
  • Configuring ruff, mypy, or pyright
  • Reviewing code for style consistency
  • Creating project documentation

Core Concepts

1. Automated Formatting

Let tools handle formatting debates. Configure once, enforce automatically.

2. Consistent Naming

Follow PEP 8 conventions with meaningful, descriptive names.

3. Documentation as Code

Docstrings should be maintained alongside the code they describe.

4. Type Annotations

Modern Python code should include type hints for all public APIs.

Quick Start

# Install modern tooling
pip install ruff mypy

# Configure in pyproject.toml
[tool.ruff]
line-length = 120
target-version = "py312"  # Adjust based on your project's minimum Python version

[tool.mypy]
strict = true

Fundamental Patterns

Pattern 1: Modern Python Tooling

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
Documentation, Code Review & Quality, Python

More from wshobson/agents

All 174
1vercel avatarbuilding-componentsvercel/components.buildGuide for building modern, accessible, and composable UI components. Use when building new components, implementing accessibility, creating composable APIs, set15.1Kskills.sh installs
2samber avatargolang-pkg-go-devsamber/cc-skills-golangGolang package and module documentation and exploration via `godig`, a pkg.go.dev API client (CLI + MCP server) — package docs, API references, symbols, code ex13.3Kskills.sh installs
3dart-lang avatardart-use-ffigendart-lang/skillsGuide agents to use `package:ffigen` to automatically generate FFI bindings instead of writing them manually. Use this skill when a task involves writing new FF13.1Kskills.sh installs
4blader avatarhumanizerblader/humanizerRemove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's compreh12.5Kskills.sh installs
5antfu avatarvitepressantfu/skillsVitePress static site generator powered by Vite and Vue. Use when building documentation sites, configuring themes, or writing Markdown with Vue components.12.1Kskills.sh installs
6imbad0202 avataracademic-paperimbad0202/academic-research-skills12-agent academic paper writing pipeline. 11 modes (full/plan/outline/revision/revision-coach/abstract/lit-review/format-convert/citation-check/disclosure/rebut11.4Kskills.sh installs