python

python is a skill for Claude Code, Codex from nimadorostkar/Claude-Skills-collection. It costs 55 tokens per session (1,083 once invoked), scanned A, original, MIT.

A Python coding guide for Python 3.11 and newer. It covers type annotations, asynchronous input and output, data models, pytest testing, and code-quality tools.

In plain words
What is it for?
Use it to build modules and services, add types to existing code, convert blocking work to async code, create pytest tests, and improve slow code.
Why use it?
It helps make Python code easier to check, test, modernize, and run reliably when it handles network or file operations.

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/nimadorostkar/claude-skills-collection/python
Any agent
npx skills add nimadorostkar/Claude-Skills-collection --skill python
Clone the repo
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection

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/nimadorostkar/claude-skills-collection/python.svg)](https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/python)
Your own site
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/python"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/python.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,083 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00055 $0.01083
Opus 5 $0.00028 $0.00541
Sonnet 5 $0.00011 $0.00217
Haiku 4.5 $0.00006 $0.00108

Measured yesterday against content hash e0c85b4c0fdd, 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 0 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.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/languages/python/SKILL.md · 118 lines

How it starts

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

Python

Purpose

Write production Python that is type-safe, async-first, and testable. This skill sets a single quality bar — annotated, linted, tested — and applies it consistently to new code and to code being modernized.

When to Use

  • Writing new Python modules, packages, or services.
  • Adding type coverage to an untyped or partially typed codebase.
  • Converting blocking I/O to asyncio, or debugging async behavior.
  • Standing up a pytest suite, fixtures, or parametrized tests.
  • Modernizing Python 2-era or pre-3.10 idioms.

Capabilities

  • Full type annotation, including generics, Protocol, TypedDict, and ParamSpec.
  • Async design: task groups, timeouts, cancellation, structured concurrency.
  • Data modeling with dataclasses, enum, and Pydantic when validation is needed.
  • Test authoring: fixtures, factories, mocking, property-based tests via Hypothesis.
  • Tooling configuration: pyproject.toml, ruff, mypy, uv or Poetry.
  • Profiling and hot-path optimization.

Inputs

  • Source files or a package path.
  • Target Python version (default: 3.12).
  • Existing tooling config, if any.
  • Runtime constraints: sync vs async, framework, deployment target.

Outputs

  • Type-annotated source that passes mypy --strict.
  • A pytest suite with meaningful assertions, not coverage padding.
  • A pyproject.toml section configuring ruff and mypy.
  • A short summary of behavioral changes when refactoring.

Workflow

  1. Survey — Read the module and its imports. Identify the runtime model (sync, async, threaded) and existing conventions. Do not fight established conventions without a reason.
  2. Model the data — Define dataclasses, enums, and protocols before writing logic. Type the boundaries first.
  3. Implement — Write the smallest correct version. Prefer standard library over dependencies.
  4. Test — Cover the contract and the failure modes, not the implementation details.
  5. Gate — Run ruff check --fix, ruff format, mypy --strict, pytest. Fix each failure and re-run until all four are clean.

Read the full file on GitHub · 118 lines

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 · 118 lines · 55 tokens per session scan A e0c85b4c0fdd

Subscribe to this mod's changes

python is a skill published in the GitHub repository nimadorostkar/Claude-Skills-collection (26 stars, last pushed 17d ago), licensed MIT. It adds 55 tokens to every session and 1,083 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. 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

neo-python

Use this skill when writing, reviewing, debugging, or architecting Python 3.10+ code, including type hints, structural pattern matching, dataclasses, async/task groups, packaging-aware project structure, testability, and maintainability.

Benknightdark/neo-skills · 51 tokens

code-mentor

Comprehensive AI programming tutor offering interactive lessons, code reviews, debugging help, algorithm practice, and project guidance for Python and JavaScript. Triggers when users ask to learn a language, debug code, review their work, practice algorithms, prepare for interviews, or build a project.

serejaris/kimi-skills · 60 tokens

neo-python-manager

Use this skill when the user asks how to install, add, remove, update, or run Python dependencies; choose between uv, Poetry, venv, or pip; create/sync a virtual environment; or diagnose Python package manager setup from pyproject.toml, lock files, or requirements.txt.

Benknightdark/neo-skills · 64 tokens

agent-framework-azure-ai-py

Build persistent agents on Azure AI Foundry using the Microsoft Agent Framework Python SDK.

lingxling/awesome-skills-cn · 24 tokens

datarobot-setup

Sets up DataRobot for local development including Python SDK, dr-cli, Agent Assist, and all required dependencies. Use when the user has not yet worked with DataRobot on this machine, OR when any DataRobot task fails due to missing or invalid credentials. Covers first-time setup, re-authentication, and credential…

datarobot-oss/datarobot-agent-skills · 70 tokens

cardputer-buddy

Iterate on the Cardputer-Adv MicroPython app bundle (Claude Buddy, Snake, Hello) after the device is already provisioned via m5-onboard. Use when the user wants to add a new app, push a single changed .py without re-flashing, watch device serial logs, or run a one-shot REPL command. Trigger on "add an app", "push to…

anthropics/claude-plugins-official · 109 tokens