# Python Code Style (python-code-style)

> Covers Python linting and formatting setup with ruff and mypy, PEP 8 naming, import order, type hints and Google-style docstrings.

- Category: [Code Standards](https://www.myskills.tools/en/categories/code-standards/)
- Source: Community · Seth Hobson
- Repository: https://github.com/wshobson/agents/tree/main/plugins/python-development/skills/python-code-style (commit cbb6049)
- SKILL.md: https://github.com/wshobson/agents/blob/main/plugins/python-development/skills/python-code-style/SKILL.md
- Install command: `npx skills add wshobson/agents --skill python-code-style`
- License: MIT
- Compatible with: Claude Code, Codex, Cursor, Copilot, OpenCode
- Permissions: read-repo ✓, write-files ✓, shell ✓, network ✓
- Status: Scan passed
- A rule scan cannot catch every risk. Read this skill's SKILL.md and check its permissions before installing.

## Core rule

Let tools handle formatting debates: configure once, enforce automatically.

## Execution Phases

1. **Configure tooling** — Configure ruff in pyproject.toml for linting and formatting, and enable mypy or pyright in strict mode.
2. **Naming and imports** — Follow PEP 8 with clarity over brevity; group imports as standard library, third-party, local, and use absolute imports only.
3. **Types and docstrings** — Add type hints and Google-style docstrings to every public API, with Args, Returns, Raises and examples.
4. **Format and document** — Use 120-character lines with clear breaks, keep a README and a Keep a Changelog CHANGELOG, and run linters in CI.

## Permissions (summarised from SKILL.md)

| Capability | Needed | Details |
|---|---|---|
| File writes | Required | Edits config such as pyproject.toml, adds types and docstrings to code, and writes project docs. |
| Command execution | Limited | Runs ruff check --fix, ruff format, and commands to install tools such as ruff and mypy. |
| Network outbound | Limited | Only the package index, when installing tools such as ruff and mypy with pip. |

## SKILL.md frontmatter (YAML)

```yaml
---
name: python-code-style
description: Python code style, linting, formatting, naming conventions, and documentation standards. Use when writing new code, reviewing style, configuring linters, writing docstrings, or establishing project standards.
---
```

Home: https://www.myskills.tools/en/ · URL: https://www.myskills.tools/en/skills/python-code-style/
