python

python is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 94 tokens per session (4,030 once invoked), scanned A, original, MIT.

A guide to writing, reviewing, typing, and packaging modern Python programs.

In plain words
What is it for?
It helps with Python language features, type annotations, asynchronous code, project packaging, formatting, linting, and tests.
Why use it?
It keeps Python code easier to check, maintain, and run by combining clear structure with type checking and standard development tools.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ericrisco/rsc-harness/python
Any agent
npx skills add ericrisco/rsc-harness --skill python
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/python.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/python)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/python"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/python.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,030 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00094 $0.04030
Opus 5 $0.00047 $0.02015
Sonnet 5 $0.00019 $0.00806
Haiku 4.5 $0.00009 $0.00403

Measured yesterday against content hash 6938dd0d15dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

python scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

return await asyncio.gather(*(fetch(i) for i in ids))

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(cmd, shell=True) subprocess.run(["ls", path]) # list args, no shell=True
skills/python/SKILL.md · 321 lines

How it starts

The opening of the file, as written. The whole thing — 321 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Modern Python at the language level

Write, review, modernize, type, and package Python that reads like a typed, flat-control-flow, stdlib-first program whose dependencies and tooling all live in one pyproject.toml. Types are part of the design, not decoration; the stdlib is large and you reach for it before a dependency; correctness is ruff + a type checker + pytest in one gate.

Targets Python 3.12+ (floor) / 3.14 (current, released 7 Oct 2025): PEP 695 inline type parameters (class Box[T]:, type Alias = ...), asyncio.TaskGroup, and — in 3.14 — deferred annotation evaluation by default (PEP 649/749, no more from __future__ import annotations), PEP 750 template strings (t"..."), and compression.zstd. Tooling pins: uv 0.11 (project + package manager), ruff 0.15 (lint + format), mypy 1.20 --strict (or Astral's ty, still preview — default to mypy), pytest 8.

Scope — what this skill delegates

  • Building a FastAPI / ASGI service (routes, Pydantic models, SQLAlchemy, uvicorn) -> fastapi. That skill owns the service shape; this one owns the language it is written in.
  • A pytest suite as the primary task — fixtures, parametrize matrices, mocking, coverage, property-based testing -> testing-py (this skill keeps only the baseline: a few tests so verify.sh has something to run, then hands off).
  • Language-agnostic threat modeling / authz / OWASP review -> secure-coding (this skill keeps Python-specific safety: no eval/pickle of untrusted data, subprocess without shell=True, secrets over random).
  • Containerfile / CI pipeline / deploy mechanics -> deployment (this skill ships only a uv-based CI note).
  • Another language -> go, typescript, rust, etc. Django ORM/models/migrations -> django.

Python typing, async language semantics, and uv packaging live here, not in a separate skill — this skill is the canonical authority for the language substrate under any Python program.

Read the full file on GitHub · 321 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 321 lines · 94 tokens per session scan A 6938dd0d15dc

Subscribe to this mod's changes

python is a skill published in the GitHub repository ericrisco/rsc-harness (60 stars, last pushed 2d ago), licensed MIT. It adds 94 tokens to every session and 4,030 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

Python Patterns

Use this skill when writing or reviewing modern Python code and you want consistent patterns for typing, async, structure, packaging, and correctness (especially in services, scripts, CLIs, and data tooling).

AmariahAK/atlarix-skills · 2 tokens

python-docs

Comprehensive Python 3.13 reference covering all language features: variables, built-in types, strings, control flow, functions, lambdas, decorators, classes, inheritance, dataclasses, enums, metaclasses, collections (list, dict, set, tuple, comprehensions), modules and packages, pip, venv, exceptions, context…

pledgeandgrow/pledge-skills · 251 tokens

using-asyncio-python

Apply Using Asyncio in Python practices (Caleb Hattingh). Covers Introducing Asyncio (Ch 1: what it is, I/O-bound concurrency), Threads (Ch 2: drawbacks, race conditions, GIL, ThreadPoolExecutor), Asyncio Walk-Through (Ch 3: event loop, coroutines, async def/await, tasks, futures, gather, wait, async with, async for…

booklib-ai/booklib · 190 tokens

python

Python programming patterns and best practices.

miles990/claude-software-skills · 8 tokens

python-patterns

Pythonic idioms, PEP 8 standards, type hints, and best practices for building robust, efficient, and maintainable Python applications.

deepelementlab/jupyter-studio · 33 tokens

jupyter-notebook

Use when the user asks to create, scaffold, or edit Jupyter notebooks (.ipynb) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script newnotebook.py to generate a clean starting notebook.

microsoft/ai-agents-for-beginners · 57 tokens