Python tooling conventions. Use when working on .py files, pyproject.toml, or Python projects. Enforce uv for package management, ty for type checking. NOT for JavaScript/TypeScript projects or shell scripts.
Apply these conventions when Python work is the primary workstream.
| $ARGUMENTS | Action |
|------------|--------|
| Active (auto-invoked when Python work is primary) | Apply the operator contract below |
| Empty | Display the convention summary and routing guidance |
| check | Verify tooling compliance only |
| File | Purpose |
|------|---------|
| references/tooling-contract.md | Required command sequence for install, run, lint, type-check, and test flows |
| references/redirection-boundaries.md | When Python conventions should yield to shell, JS/TS, or domain-specific skills |
| references/exceptions.md | When to break conventions (legacy, corporate) |
| references/library-preferences.md | Guided library defaults for new Python work |
| references/performance-tips.md | Profiling tools, optimization patterns quick-reference |
| references/testing-patterns.md | Fixture scopes, markers, conftest skeleton |
pyproject.toml are the primary surface of the task.references/redirection-boundaries.md when Python appears alongside shell, JS/TS, or other dominant workstreams.references/tooling-contract.md for package management, command execution, linting, type checking, and tests.references/exceptions.md before recommending any legacy or constrained-environment deviation.references/library-preferences.md only when choosing libraries for new Python work.uv, uv run, uv add, ty, ruff, pytest, and pyproject.toml.checkuv, uv run, ty, ruff, pytest, and pyproject.toml in the expected ways.references/exceptions.md.mypy, pip install, or bare python.uv for all Python package operationsuv add, uv add --group dev, uv remove, and uv lock --upgrade-package <pkg> as appropriateuv sync --locked when validating an existing lockfile workflowpyproject.tomluv run ty check, not mypyuv run ruff check and uv run ruff formatuv run pytestuv run <command> for Python command executionuv manage virtual environments automatically.venv directoriesuv run to execute within the project environmentGuided library preferences apply only when starting new Python work and no stronger local constraint already exists. Read references/library-preferences.md before recommending replacements for an established stack.
pyproject.toml for all project metadata and dependenciesuv workspace members for monorepo sub-packagesreferences/tooling-contract.md before considering Python work completereferences/performance-tips.md for quick Python profiling and optimization patterns.performance-profiler.pyproject.toml.references/testing-patterns.md for fixtures, markers, tmp_path, monkeypatch, parametrization, and coverage policy.test-architect.Run from this skill directory before declaring changes complete:
python scripts/check.py
git diff --check
Completion criteria:
scripts/check.py exits 0.git diff --check exits 0.After changing skill definitions, public descriptions, reference files, or eval behavior, invoke docs-steward if available.
pip install, uv pip install, or bare python when the task is not explicitly on an approved exception path.uv add for runtime dependencies and uv add --group dev for development-only dependencies unless references/exceptions.md justifies a legacy or constrained-environment deviation.uv run ty check for type checking; do not recommend mypy or bare ty check as the default path in this repo.uv run ruff check, uv run ruff format, uv run ty check, and uv run pytest as the default completion gate for Python changes unless an exception is documented.uv.lock by hand; use uv lock, uv sync, or dependency commands.references/exceptions.md before approving a legacy toolchain, alternate environment manager, or alternate library path.references/redirection-boundaries.md instead of force-fitting this skill onto the whole task.Canonical terms (use these exactly):
uv -- the required package manager and task runnerty -- the required type checker (not mypy)uv run ty check -- the required type-check commandruff -- the required linter and formatterpyproject.toml -- the single source of project configurationuv run -- prefix for all Python command executionuv sync --locked -- default reproducible install check for lockfile-backed workflowsreferences/redirection-boundaries.md.check, references/tooling-contract.md, and references/exceptions.md to separate hard violations from documented transition paths.references/tooling-contract.md first for command-sequence questions.references/redirection-boundaries.md when shell, JS/TS, CI, or framework-specific work is mixed into the request.references/exceptions.md only when the task appears to require legacy, corporate, or constrained-environment exceptions.references/library-preferences.md only when selecting libraries for new Python work.IS for: Python tooling conventions, command selection, dependency-management rules, type/lint/test gates, and exception-aware repo guidance.
NOT for: JS/TS conventions, shell conventions, CI pipeline design, profiling investigations, test architecture, or framework/domain-specific implementation strategy.
npx skills add wyattowalsh/python-conventions下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer