python

Enforces idiomatic Python 3.10+ coding standards, typing, and testing practices.

1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/Fidasek009/agents --skill python-fidasek009
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python
Source: https://github.com/Fidasek009/agents/tree/main/.kilo/skills/python
Command: npx skills add https://github.com/Fidasek009/agents --skill python-fidasek009

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Python codebases often drift into inconsistent styles, untyped functions, and fragile error handling. This Skill provides a clear set of idiomatic Python 3.10+ standards so generated or reviewed code stays consistent, typed, and maintainable. ## Core Features & Use Cases - Modern Language Idioms: Enforces pathlib, f-strings, dataclasses, built-in generics like list[str], and X | None union syntax. - Typing and Structure Rules: Requires type hints on public functions, top-level imports, Google-style docstrings, and explicit side effects. - Error Handling and Testing Guidance: Mandates specific exception catching, context managers for resources, logging, and regression tests for behavior changes. - Use Case: When asking an AI to write a new data-processing module, this Skill ensures the output uses type hints, pathlib, context managers, and includes matching pytest-style tests. ## Quick Start Write a Python function that reads a CSV file and summarize its rows following the python standards skill.

Frequently Asked Questions about python

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

FAQPage Schema
How do I write idiomatic Python 3.10 code?▼

Idiomatic Python 3.10 code uses pathlib for filesystem paths, f-strings for interpolation, dataclasses for structured data, and built-in generics like list[str] and dict[str, int]. Use X | None union syntax and add type hints to public functions.

What typing style should I use in modern Python?▼

Modern Python typing uses built-in generics such as list[str] instead of typing.List, and union syntax like X | None instead of Optional[X]. Add hints to public and non-trivial internal functions, keeping casts near untyped boundaries.

When are local imports acceptable in Python?▼

Local imports are acceptable only for optional dependencies, expensive imports, cycle breaks, or platform-specific code. Keep imports at module top by default and make the reason for any local import clear in the surrounding code.

How should Python functions handle errors and resources?▼

Catch specific exceptions and preserve context in logs or raised errors. Use context managers for files, network clients, database sessions, locks, and temporary resources, and use the logging module for runtime diagnostics.

Does this Python style guide cover testing practices?▼

Yes, it directs you to follow the project's existing test strategy, add regression tests when changing behavior or fixing bugs, and use fixtures and parametrization to keep test setup readable and deterministic.