python-expert

A guide to writing well-structured Python code, including asynchronous programming, type annotations, packaging, decorators, generators, and context managers.

In plain words
What is it for?
Use it when designing Python packages, choosing between asynchronous code and multiprocessing, adding types, handling exceptions, or applying Python-specific patterns.
Why use it?
It helps prevent common Python bugs and keeps scripts and libraries easier to read, test, package, and maintain.

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

Made for: Claude Code, Codex.

Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 435 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.00066 $0.00435
Opus 5 $0.00033 $0.00217
Sonnet 5 $0.00013 $0.00087
Haiku 4.5 $0.00007 $0.00044

Measured yesterday against content hash 614340bd6331, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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/python-expert/SKILL.md · 38 lines

What it actually says

Python Expert

You are a senior Python developer who writes idiomatic, type-safe, well-structured Python.

Core Principles

  • Explicit is better than implicit. Type hints on all function signatures. Clear variable names.
  • Flat is better than nested. Early returns over deep nesting. Guard clauses first.
  • Use the standard library. pathlib over os.path, dataclasses over plain dicts, itertools over manual loops.
  • Type everything. Use mypy --strict or pyright. Types catch bugs before runtime.

Decision Framework

  1. Data container? dataclass for mutable, NamedTuple for immutable, Pydantic for validation.
  2. Async needed? Only if doing I/O-bound work with multiple concurrent operations. CPU-bound → multiprocessing.
  3. Package structure? Single module for scripts. src/ layout for libraries.

Anti-Patterns

  • Bare except: — always catch specific exceptions
  • Mutable default arguments (def f(items=[])) — use None and create inside
  • import * — pollutes namespace, breaks IDE support
  • String concatenation in loops — use str.join() or f-strings
  • Ignoring type hints — they're documentation and bug prevention

Reference Guide

Topic Reference Load When
Type hints references/type-hints.md Complex typing, generics, protocols
Async patterns references/async-patterns.md Concurrency, asyncio, aiohttp
Project structure references/project-structure.md Packaging, pyproject.toml, src layout
Files

What ships with it

3 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 · 38 lines · 66 tokens per session scan A 614340bd6331

Subscribe to this mod's changes

python-expert is a skill published in the GitHub repository FutureJJ/claude-skills (3 stars, last pushed 5mo ago), licensed MIT. It adds 66 tokens to every session and 435 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-08-31.

Related

Other skills, from other repositories

api-sculptor

Designs and implements APIs: REST, GraphQL, gRPC, and WebSocket. Produces OpenAPI 3.1 specs, GraphQL SDL schemas, Protocol Buffer definitions, and working server implementations. Use this skill when the user asks about API design, endpoint structure, schema definition, versioning strategy, pagination, authentication…

mturac/hermes-supercode-skills · 143 tokens

auth-architect

Designs and implements authentication and identity systems. Covers OAuth2 and OIDC flows including authorization code, PKCE, and client credentials; JWT design including RS256 vs HS256, key rotation, token blacklisting, and refresh token strategy; RBAC and ABAC modeling; SSO with Google, GitHub, and SAML 2.0; session…

mturac/hermes-supercode-skills · 166 tokens

db-whisperer

Diagnoses and improves application-layer databases: Postgres, MySQL, SQLite, and MongoDB. Covers EXPLAIN ANALYZE, slow query detection, index strategy, N+1 detection, schema migrations with up/down scripts, connection pooling, replication setup, and vacuum/analyze operations. Use this skill when the user says "this…

mturac/hermes-supercode-skills · 131 tokens

obs-guardian

Builds observability, monitoring, alerting, and incident visibility for production systems. Covers OpenTelemetry instrumentation for traces, metrics, and logs; structured logging with JSON, correlation IDs, and sampling; Prometheus and Grafana scrape configs, dashboards, and recording rules; distributed tracing with…

mturac/hermes-supercode-skills · 165 tokens

prompt-forge

Engineers and optimizes prompts for LLMs: system prompts, few-shot examples, chain-of-thought structures, agent personas, and evaluation frameworks. Use this skill when the user wants to write or improve a system prompt, design few-shot examples, create an agent persona, optimize prompt performance, set up prompt…

mturac/hermes-supercode-skills · 129 tokens

quantum-debugger

Debugs complex, hard-to-reproduce issues: race conditions, memory leaks, deadlocks, performance regressions, heisenbugs, and crash analysis. Uses scientific debugging methodology with hypothesis generation, systematic testing, and root cause isolation. Use this skill when the user reports intermittent crashes…

mturac/hermes-supercode-skills · 143 tokens