python-expert

python-expert is a skill for Claude Code, Codex from ApexIQ/skillsmith. It costs 47 tokens per session (2,152 once invoked), scanned A, original, MIT.

A guide for writing and reviewing modern Python code, covering types, project structure, packaging, asynchronous code, errors, and performance.

In plain words
What is it for?
Use it when creating Python modules or packages, reviewing code, structuring projects, optimizing programs, or debugging async and other Python issues.
Why use it?
It helps keep Python code clear, maintainable, and suitable for production use.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating Python modules or packages, reviewing code, structuring projects, optimizing programs, or debugging async and other Python issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/apexiq/skillsmith/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 ApexIQ/skillsmith --skill python_expert
Clone the repo
git clone --depth 1 https://github.com/ApexIQ/skillsmith

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/apexiq/skillsmith/python_expert/github.svg)](https://agentmods.dev/skills/apexiq/skillsmith/python_expert)
Your own site
<a href="https://agentmods.dev/skills/apexiq/skillsmith/python_expert"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/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/apexiq/skillsmith/python_expert"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/python_expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,152 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00047 $0.02152
Opus 5.5 $0.00019 $0.00861
Sonnet 5.5 $0.00009 $0.00430
Haiku 4.5 $0.00005 $0.00215

Measured 3mo ago against content hash 4df7ba48dc97, 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 1 finding 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 3mo 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.

Makes network callslowCapability

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

response = requests.get(f"/api/users/{uid}") # blocks
.agent/skills/python_expert/SKILL.md · 271 lines

How it starts

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

🐍 Python Expert — Production-Grade Python

Philosophy: Python's simplicity is its power. Write code that reads like well-edited prose — explicit, flat, and simple. If your code needs a comment to explain what it does, rewrite the code.

1. When to Use This Skill

  • Writing new Python modules, packages, or scripts
  • Reviewing Python code for idioms and best practices
  • Structuring Python projects for packaging and distribution
  • Optimizing Python performance
  • Writing async Python code
  • Debugging Python-specific issues

2. Modern Python Idioms (3.10+)

Type Hints — Always

# GOOD: Fully typed
def fetch_users(
    team_id: str,
    active_only: bool = True,
    limit: int = 100,
) -> list[User]:
    """Fetch users for a team."""
    ...

# BAD: No types — impossible to maintain
def fetch_users(team_id, active_only=True, limit=100):
    ...

Structural Pattern Matching (3.10+)

# GOOD: Pattern matching for complex dispatch
match command:
    case {"action": "create", "data": data}:
        return create_item(data)
    case {"action": "delete", "id": item_id}:
        return delete_item(item_id)
    case {"action": action}:
        raise ValueError(f"Unknown action: {action}")
    case _:
        raise ValueError("Invalid command format")

Dataclasses & Pydantic Over Raw Dicts

# GOOD: Typed, validated, documented
from dataclasses import dataclass, field
from datetime import datetime

@dataclass
class User:
    id: str
    name: str
    email: str
    role: str = "member"
    created_at: datetime = field(default_factory=datetime.now)

# BETTER for APIs: Pydantic with validation
from pydantic import BaseModel, EmailStr, Field

class UserCreate(BaseModel):
    name: str = Field(min_length=2, max_length=100)
    email: EmailStr
    role: str = Field(default="member", pattern="^(member|admin|viewer)$")

# BAD: Raw dict — no validation, no docs, typo-prone
user = {"name": "Jane", "emial": "[email protected]"}  # typo? who knows

Read the full file on GitHub · 271 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. 3mo ago First seen · 271 lines · 47 tokens per session scan A 4df7ba48dc97

Subscribe to this mod's changes

python-expert is a skill published in the GitHub repository ApexIQ/skillsmith (5 stars, last pushed 8mo ago), licensed MIT. It adds 47 tokens to every session and 2,152 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

python-expert compared with skills from other repositories

python-expert next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
python-expertApexIQ/skillsmithSkill58mo agoMITA47Claude Code, Codex
async-fastapiVersoXBT/claude-initial-setupSkill46mo agoMITA72Claude Code
dependency-injection-fastapiVersoXBT/claude-initial-setupSkill46mo agoMITA70Claude Code
pydantic-validationVersoXBT/claude-initial-setupSkill46mo agoMITA77Claude Code
project-structure-pythonVersoXBT/claude-initial-setupSkill46mo agoMITA78Claude Code
pythonic-patternsVersoXBT/claude-initial-setupSkill46mo agoMITA71Claude Code
type-hints-guideVersoXBT/claude-initial-setupSkill46mo agoMITA79Claude Code