python-expert

python-expert is a skill for Claude Code from Miaoge-Ge/coding-agent-skills. It costs 83 tokens per session (1,078 once invoked), scanned A, original, MIT.

Guidance for writing and reviewing Python code, a general-purpose programming language. It covers readable Python style, type hints, asynchronous code, standard-library tools, packaging, and performance.

In plain words
What is it for?
Use it when writing, refactoring, debugging, typing, packaging, profiling, or optimizing Python programs, including projects using asyncio, pytest, pandas, or NumPy.
Why use it?
It helps diagnose Python errors and choose clear, conventional solutions instead of overcomplicating the code. It also supports safer exception handling and measured performance improvements.

Skill for Claude Code

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

Part of the python-expert plugin — 1 skill shipped together

Good fit Use it when writing, refactoring, debugging, typing, packaging, profiling, or optimizing Python programs, including projects using asyncio, pytest, pandas, or NumPy.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/miaoge-ge/coding-agent-skills/python-expert
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 Miaoge-Ge/coding-agent-skills --skill python-expert
Clone the repo
git clone --depth 1 https://github.com/Miaoge-Ge/coding-agent-skills

Made for: Claude Code.

Or install python-expert, the plugin that ships this one along with the rest of its 1 skill.

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-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/python-expert/github.svg)](https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/python-expert)
Your own site
<a href="https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/python-expert"><img src="https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/python-expert/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-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/python-expert"><img src="https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/python-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,078 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.
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.00083 $0.01078
Opus 5.5 $0.00033 $0.00431
Sonnet 5.5 $0.00017 $0.00216
Haiku 4.5 $0.00008 $0.00108

Measured 1mo ago against content hash 9cbe2179049a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

python-expert 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 1mo 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.

plugins/python-expert/skills/python-expert/SKILL.md · 81 lines

How it starts

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

Python Expert

Write code that reads like the problem. Lean on the stdlib, type the boundaries, handle specific exceptions, and measure before optimizing. There's usually one obvious, Pythonic way — find it.

When to Use

  • Writing, refactoring, or reviewing Python.
  • Best practices: PEP 8, typing, packaging, project layout.
  • Debugging exceptions/tracebacks or unexpected behavior.
  • Performance/profiling, async, or data-stack (numpy/pandas) work.

When NOT to Use

  • Another language → relevant language skill.
  • Contest algorithms (language incidental) → competitive-programming-expert.
  • System/architecture design → software-architect.
  • DL modeling/training → deep-learning-expert.

Core Principles

1. Pythonic & typed

  • PEP 8 via autoformatter (ruff format/black) + linter (ruff). Comprehensions, generators, enumerate/zip, pathlib, f-strings.
  • Type public functions; run mypy/pyright strict for libraries. Use dataclasses/pydantic for structured data; enum/Literal for fixed sets.

2. Correct & robust

  • Catch specific exceptions; never bare except:. Re-raise with context (raise X from e). EAFP (try/except) over LBYL where it reads cleaner.
  • Manage resources with context managers (with); don't hand-close files/locks. Prefer pure functions and immutability where practical.

3. Use the stdlib first

  • collections (Counter, defaultdict, deque), itertools, functools (lru_cache, cached_property), contextlib, pathlib, datetime/zoneinfo. Reach for a dependency only when the stdlib falls short.
  • Tooling: uv (or Poetry) for envs/deps, pytest for tests, ruff for lint/format.

4. Concurrency & performance

  • Measure first (timeit, cProfile, py-spy). Use set/dict for O(1) membership; pick the right container.
  • Concurrency model matters because of the GIL: asyncio for high-concurrency I/O, threads for blocking I/O calls, multiprocessing (or vectorized numpy) for CPU-bound work. (Free-threaded 3.13+ is changing this — know your runtime.)

Read the full file on GitHub · 81 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. 1mo ago First seen · 81 lines · 83 tokens per session scan A 9cbe2179049a

Subscribe to this mod's changes

python-expert is a skill published in the GitHub repository Miaoge-Ge/coding-agent-skills (7 stars, last pushed 4mo ago), licensed MIT. It adds 83 tokens to every session and 1,078 once invoked, about $0.0003 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-08-31.