skills/python/SKILL.md
Python project patterns: uv package/workspace management, MLflow experiment tracking, Ray distributed computing, Nvidia Warp GPU kernels, Pydantic validation, Click CLIs, and service architecture. Load when writing Python with pyproject.toml or uv.lock.
npx skillsauth add cloudvoyant/codevoyant pythonInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Patterns for structuring Python projects managed by uv, with recipes for ML tracking, distributed compute, GPU kernels, and service architecture. Conventions apply to standalone packages and multi-package workspaces.
| You are working on… | Load recipe |
|---|---|
| uv project setup, deps, or monorepo workspace | references/recipes/uv-workspace.md |
| Publishing a package to PyPI or private registry | references/recipes/uv-publishing.md |
| MLflow experiment tracking or model registry | references/recipes/mlflow.md |
| Ray distributed training or remote tasks | references/recipes/ray-training.md |
| GPU kernels with Nvidia Warp | references/recipes/warp-hpc.md |
| Pydantic models or dataclasses | references/recipes/pydantic.md |
| Click CLI commands | references/recipes/click-cli.md |
| Module architecture, error handling, typing | references/recipes/service-patterns.md |
Load uv-workspace for any new Python project — every other recipe assumes a uv-managed source tree.
uv is the only package manager — never pip, never python directly; always uv run …pyproject.toml, uv.lock, and .python-version togetheruv.lock per workspace, shared across every membersrc/<package>/ layout for every package; tests as a sibling tests/ dirfrom __future__ import annotations at the top of every moduleBaseModel; internal arg bundles → @dataclassctx.obj, never globalspytest --import-mode=importlib so same-named test modules can coexist across libsA multi-package workspace:
acme/ ← workspace root (NOT a package)
pyproject.toml ← [tool.uv.workspace] members = ["libs/*", "apps/*"]
uv.lock ← one lockfile for the whole workspace
.python-version ← "3.12"
libs/
voxel-sdk/
pyproject.toml
src/voxel_sdk/__init__.py
tests/
mesh-sdk/ ← depends on voxel-sdk via { workspace = true }
pyproject.toml
src/mesh_sdk/__init__.py
apps/
acme-cli/
pyproject.toml ← [project.scripts] acme = "acme_cli.cli:cli"
src/acme_cli/cli.py
A standalone package collapses to one pyproject.toml + src/<pkg>/ + tests/.
Field(default_factory=list) (Pydantic) or field(default_factory=list) (dataclass), never = []import warp / import ray breaks the non-GPU/non-cluster host — defer to function bodies and lock with an AST discipline testruntime_env.pip for Ray remote tasks builds a fresh per-task venv and times out the gRPC channel — bake heavy deps into the worker image, ship source via working_dirworking_dir is capped at 100 MB — stage a trimmed tree, not the repo root (excludes .venv, .git, dist, build)RAY_ENABLE_UV_RUN_RUNTIME_ENV=0 before import rayfrozen=True on Pydantic models makes instances hashable but assignment raises — use only for genuinely immutable value objectsField(..., ge=0, le=1) marks the field required AND bounded; a bare type annotation with no Field works for unconstrained fieldstools
Vim and Neovim key binding reference. Triggers on: "vim keys", "vim shortcuts", "how do I open a file in vim", "vim search replace", "vim splits", "vim buffers", "how do I navigate in vim".
testing
Generate a responsible-AI usage and decision-attribution report for the current session. Triggers on: "usage report", "usage generate", "usage run", "usage help".
development
Unified task runner dispatcher: auto-detects mise, just, task.dev, or package.json scripts and provides commands to run, list, or detect the project task runner. Triggers on: "/task", "run task", "list tasks", "detect task runner", "what tasks", "mise run", "just run", "pnpm run", "package.json scripts".
development
TanStack patterns: Start file-based routing, Router v1, Query v5, Form, and server functions. Load when working with @tanstack/ packages in a React project.