Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

python-language

БесплатноБез исполняемых скриптовНе проверен

Core Python 3.11+ language standards for typing, dataclasses, imports, pathlib, and stdlib-first code. Use for idiomatic language constructs in Python modules…

HoangNguyen0403от HoangNguyen0403★ 598 звёзд на GitHub

Об этом скилле

Python Language

Priority: P0 (CRITICAL)

Rules

  • Choose annotation evaluation from the project's target version and its consumers: prefer deferred annotations when the project targets 3.14+ and its consumers allow it (deferred by default there, PEP 649); on 3.11–3.13 add from __future__ import annotations only when forward references must stay unevaluated. Do not add or remove the future import where runtime annotation consumers (pydantic, dataclasses, get_type_hints, annotationlib) depend on the current eager/stringized behavior — check them first.
  • Pass encoding= on every text file boundary (open, Path.read_text, Path.write_text), normally encoding="utf-8". Do not rely on the platform default: 3.15 switched the default to UTF-8 while 3.11–3.14 remain locale-dependent.
  • Type public functions, return values, and boundary data shapes.
  • Use pathlib.Path, contextlib, enum, and stdlib helpers before custom wrappers.
  • Use @dataclass(frozen=True) for immutable contracts and value objects.
  • Prefer Protocol, TypedDict, or small dataclasses over dict[str, Any] sprawl.

Recipe

  1. Model contracts explicitly with dataclasses, typed dicts, or pydantic at I/O boundaries.
  2. Keep imports stable: stdlib, third-party, local.
  3. Use comprehensions and generators carefully; stop when readability drops.
  4. Choose explicit timezone-aware datetimes for persisted or user-visible timestamps.
  5. Keep module side effects minimal; import should not start work.

Anti-Patterns

  • No mutable defaults: use field(default_factory=...).
  • No locale-dependent text I/O: omitting encoding at a file or stream boundary makes behavior version- and host-dependent.
  • No os.path in new code: prefer Path.
  • No Any as escape hatch: narrow unknown shapes or validate them.
  • No import-time env reads for volatile runtime state unless cached config is intentional.

Verify

  • Run parser/type checks after cross-module type changes.
  • Load Framework Map for category defaults.

References

Установить python-language в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

evals/evals.json

FAQ

Что делает скилл python-language?

Core Python 3.11+ language standards for typing, dataclasses, imports, pathlib, and stdlib-first code. Use for idiomatic language constructs in Python modules or stubs; defer pytest fixtures, database/client configuration, subprocess security, and other specialized concerns.

Как установить скилл python-language?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл python-language запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить python-language с