python-helper
FreeNo executable scriptsNot checkedCurrent Python development guidance for versions, uv and pip, packaging, typing, asyncio, pytest, Ruff, security, and runtime boundaries. Use when writing or…
by shepherdjerred★ 85 GitHub starsAbout this skill
Python Helper
Follow the project's declared Python version and dependency workflow. Validate runtime data, make async ownership explicit, and distinguish read-only checks, local mutations, and external publication.
Current baseline
Verified 2026-08-03:
| Line | Status |
|---|---|
| Python 3.14.6 | Current stable; 3.14 and 3.13 are bugfix branches |
| Python 3.12, 3.11, 3.10 | Security-only branches |
| Python 3.15.0b4 | Prerelease; RC1 was scheduled for 2026-08-04 and final for 2026-10-01 |
Python 3.14.7 was scheduled for the day after this verification. Check live status before repeating a patch number:
python --version
uv --version
The project's requires-python is the syntax and standard-library ceiling. Do not use a current interpreter to justify APIs outside that declared range.
Read references/releases.md for the 48-page research ledger and 3.14/3.15 features. Read references/tooling-and-packaging.md for uv, pip, publishing, Ruff, and type-checkers. Read references/testing-and-concurrency.md for pytest, asyncio, TaskGroup, interpreters, and free threading. Read references/types-and-security.md for typed boundaries, deferred annotations, subprocesses, archives, and secrets.
Command authority
Read-only or check-oriented commands:
python --version
uv --version
uv python list
uv tree --locked
uv run --locked ruff check .
uv run --locked ruff format --check .
uv run --locked pytest --collect-only
uv run --locked mypy .
uv run --locked pyright
For a uv-managed project, run project-installed tools through uv run --locked so checks use the versions selected by uv.lock and fail on lock drift. For another dependency workflow, use its verified project environment rather than whichever global tool happens to be on PATH.
Local mutations include uv add, uv sync, uv python install, uv python pin, ruff check --fix, and ruff format. Ruff unsafe fixes can change runtime behavior or remove comments; require an explicit diff review and focused tests.
uv publish mutates an external registry. Require explicit artifacts, registry, credentials, and publication authorization.
uv projects
Use uv's project interface for a uv-managed application or package:
uv sync --locked
uv run --locked pytest
uv add httpx
uv add --dev pytest ruff
- Commit
uv.lock; it is a universal exact-resolution lockfile. --lockedchecks that project metadata and lock agree.--frozenuses the lock without checking whether project metadata changed; it is not the stricter CI option.- Development tools belong in
[dependency-groups].dev. [project.optional-dependencies]defines consumer-installable extras.uv pipis the lower-level environment interface, not the default project/lock workflow.uv --versionreports the uv binary.uv versionreads or can update the project version.
pip boundaries
Use python -m pip inside a verified virtual environment when a project uses pip. pip freeze is an environment snapshot, not a portable lock or secure supply-chain workflow. pip lock remains experimental and its pylock.toml is specific to the current Python/platform.
Secure requirements installs need complete hashes and may disallow source distributions:
python -m pip install --require-hashes --only-binary :all: -r requirements.txt
Type and validate boundaries
Avoid bare dict and list[dict]; they introduce imprecise values. Use dataclasses, TypedDict, Pydantic models, or precise mappings according to whether runtime validation is needed.
from pydantic import BaseModel, TypeAdapter
class User(BaseModel):
id: int
email: str
Users = TypeAdapter(list[User])
users = Users.validate_python(response.json())
Check HTTP status before parsing. A type annotation does not validate JSON, environment variables, database results, cache values, or deserialized files.
Any disables static checking and is not an escape hatch for repository code.
Use precise protocols, generics, or object plus boundary validation instead.
Use Never for exhaustiveness.
TypeIs narrows both branches and requires the narrowed type to be a subtype. TypeGuard remains necessary for some invariant-container or otherwise non-subtype narrowing. Neither is universally preferred.
Async and concurrency
Use TaskGroup when sibling cancellation and grouped failures are the intended semantics. asyncio.gather() does not cancel sibling awaitables merely because one fails. return_exceptions=True turns exceptions into results and must not silently normalize failure.
Reuse clients so connection pooling works:
import asyncio
import httpx
async def fetch_all(urls: list[str]) -> list[str]:
async with httpx.AsyncClient() as client:
async with asyncio.TaskGroup() as g
Install python-helper in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the python-helper skill do?
Current Python development guidance for versions, uv and pip, packaging, typing, asyncio, pytest, Ruff, security, and runtime boundaries. Use when writing or reviewing Python, pyproject.toml, Python CI, tests, dependency workflows, or Python upgrades.
How do I install the python-helper skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the python-helper skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
by Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
by Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
by Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
by Anthropic