python-coding-standards

Enforce Python coding standards for naming, formatting, type hints, and imports.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/kleon6436/GitHubCopilotSettings --skill python-coding-standards-kleon6436
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-coding-standards
Source: https://github.com/kleon6436/GitHubCopilotSettings/tree/main/skills/python-coding-standards
Command: npx skills add https://github.com/kleon6436/GitHubCopilotSettings --skill python-coding-standards-kleon6436

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill codifies Python coding standards to ensure consistent, readable, and maintainable code across projects, aligning with PEP 8 and project-specific rules.

Core Features & Use Cases

  • Naming conventions for modules/packages, classes, functions/methods, variables, constants, private members, and name mangling.
  • Code formatting guidelines: indentation, line length, string quotes, trailing commas, and recommended formatters.
  • Type hints: enforce Python 3.10+ style hints, explicit return types, and static typing guidance.
  • Import order: standard library, third-party, and local imports with isort-friendly structure.
  • Docstring standards: Google or NumPy style for public APIs.
  • Error handling: explicit exceptions and proper logging or re-raising.
  • Class design: use dataclass or pydantic models for data containers.
  • Async patterns: prefer async/await for I/O-bound operations and proper async context managers.
  • Testing conventions: pytest-oriented guidelines for tests and fixtures.
  • Project-specific rules: additional repository-specific conventions.

Quick Start

Apply these rules to your Python project to enforce clean, consistent coding.

Frequently Asked Questions about python-coding-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Python coding standards for consistent project structure?

You can enforce Python coding standards by applying rules for naming, formatting, type hints, import order, and docstrings. This ensures consistent, readable, and maintainable code across projects during code reviews and onboarding.

What are the recommended Python type hints and import order conventions?

Recommended Python type hints use Python 3.10+ style syntax with explicit return types. Import order follows standard library, third-party, and local imports sequentially, utilizing an isort-friendly structure for clean module organization.

How do I write Python docstrings and handle exceptions according to PEP 8?

Write Python docstrings using Google or NumPy style for public APIs. Handle exceptions by explicitly catching them and applying proper logging or re-raising techniques rather than suppressing errors.

Does this coding standard support async patterns and pytest testing conventions?

Yes, the coding standard supports async patterns by preferring async/await for I/O-bound operations and using proper async context managers. It also provides pytest-oriented guidelines for structuring tests and fixtures.

Can I use dataclass or pydantic models for class design in Python?

Yes, you can and should use dataclass or pydantic models for data containers in Python class design. This approach aligns with defined coding standards to ensure maintainable and structured data handling.