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★ 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 annotationsonly 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), normallyencoding="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 overdict[str, Any]sprawl.
Recipe
- Model contracts explicitly with dataclasses, typed dicts, or pydantic at I/O boundaries.
- Keep imports stable: stdlib, third-party, local.
- Use comprehensions and generators carefully; stop when readability drops.
- Choose explicit timezone-aware datetimes for persisted or user-visible timestamps.
- 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
encodingat a file or stream boundary makes behavior version- and host-dependent. - No
os.pathin new code: preferPath. - No
Anyas 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
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic