python

python is a skill for Claude Code from nimadorostkar/Claude-Skills-collection. It costs 108 tokens per session (1,136 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 Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the languages plugin — 12 skills shipped together

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nimadorostkar/claude-skills-collection/python
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.

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.

Or install languages, the plugin that ships this one along with the rest of its 12 skills.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,136 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00108 $0.01136
Opus 5.5 $0.00043 $0.00454
Sonnet 5.5 $0.00022 $0.00227
Haiku 4.5 $0.00011 $0.00114

Measured 9d ago against content hash 1f3f1f8585e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 9d ago.

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. 9d ago Changed · +53 tokens per session 1f3f1f8585e3
  2. 1mo ago 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 (30 stars, last pushed 9d ago), licensed MIT. It adds 108 tokens to every session and 1,136 once invoked, about $0.0004 per session on Opus 5.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

hypothesis-testing

Property-based testing with Hypothesis for discovering edge cases and validating invariants. Use when implementing comprehensive test coverage, testing complex logic with many inputs, or validating mathematical properties and invariants across input domains. Triggered by: hypothesis, property-based testing, @given…

foryourhealth111-pixel/Vibe-Skills · 62 tokens

test-harness

Generates pytest test suites with happy path, edge cases, error conditions, fixture scaffolding, mocks, async patterns. Triggers on: "generate tests", "write tests for", "test this function", "create test suite", "pytest for", "unit tests for", "mock strategy for".

Mathews-Tom/armory · 65 tokens

incremental-python-programmer

Takes a Python repository and natural language feature description as input, implements the feature with proper code placement, generates comprehensive tests, and ensures all tests pass. Use when Claude needs to: (1) Add new features to existing Python projects, (2) Implement functions, classes, or modules based on…

ArabelaTso/Skills-4-SE · 110 tokens

python-regression-test-generator

Automatically generates regression tests for Python codebases by analyzing changes between old and new code versions and their existing tests. Migrates tests to work with new code, generates tests for new functionality, and creates mocks for external dependencies. Supports unittest and pytest frameworks. Use when…

ArabelaTso/Skills-4-SE · 70 tokens

directed-test-input-generator

Generate targeted test inputs to reach specific code paths and hard-to-reach behaviors in Python code. Use when: (1) Targeting uncovered branches or specific execution paths, (2) Need coverage-guided test generation, (3) Want to leverage LLM understanding of code semantics for meaningful test inputs, (4) Testing…

ArabelaTso/Skills-4-SE · 112 tokens

testing

Python test-writing best practices covering test structure, fixtures, parametrization, and mocking with pytest. Use when writing, reviewing, or refactoring tests, adding test coverage, or working in tests directories and conftest.py.

ludo-technologies/python-best-practices · 47 tokens