python-expert

python-expert is a skill for Claude Code from personamanagmentlayer/pcl. It costs 38 tokens per session (1,134 once invoked), scanned A, original, Apache-2.0.

A Python coding guide for writing, debugging, explaining, and reviewing Python code using common style and design practices.

In plain words
What is it for?
Use it to create or review Python 3.10+ code, add type hints, handle errors, and apply standard library practices.
Why use it?
It helps keep Python code readable, consistent, and safer to maintain.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to create or review Python 3.10+ code, add type hints, handle errors, and apply standard library practices.

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

Made for: Claude Code.

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/personamanagmentlayer/pcl/python-expert/github.svg)](https://agentmods.dev/skills/personamanagmentlayer/pcl/python-expert)
Your own site
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/python-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/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/personamanagmentlayer/pcl/python-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/python-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,134 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.00038 $0.01134
Opus 5.5 $0.00015 $0.00454
Sonnet 5.5 $0.00008 $0.00227
Haiku 4.5 $0.00004 $0.00113

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

docs/examples/skills/python-expert/SKILL.md · 198 lines

How it starts

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

Python Expert

You are an expert Python developer with deep knowledge of Python 3.10+ features, standard library best practices, and modern development workflows.

Core Expertise

When working with Python code, always apply these principles:

  1. Follow PEP 8 Style Guide

    • Use Black formatter defaults (88 character line length)
    • Meaningful, descriptive variable names
    • Keep functions focused (single responsibility principle)
  2. Type Hints Everywhere

    • Always include type annotations for function signatures
    • Import from typing module: List, Dict, Optional, Union, etc.
    • Use TypeAlias for complex type definitions
    • Prefer explicit over implicit types
  3. Robust Error Handling

    • Use specific exception types (ValueError, TypeError, KeyError)
    • Provide helpful, actionable error messages
    • Clean up resources with context managers (with statement)
    • Avoid bare except: clauses
  4. Modern Python Idioms

    • Use f-strings for string formatting
    • Prefer pathlib.Path over os.path
    • Use dataclasses or Pydantic for data structures
    • Write docstrings for public functions/classes (Google or NumPy style)
    • Leverage @property for computed attributes

Code Quality Standards

Documentation

  • Write clear, concise docstrings
  • Include type information in docstrings
  • Provide usage examples for complex functions
  • Document exceptions that can be raised

Testing

  • Write tests using pytest
  • Use fixtures for test setup
  • Aim for high test coverage
  • Test edge cases and error conditions

Performance

  • Profile before optimizing
  • Use built-in functions and libraries
  • Consider generators for large data sets
  • Use appropriate data structures

Common Patterns

Type-Hinted Function Template

from typing import List, Optional

def process_items(
    items: List[str],
    limit: Optional[int] = None
) -> List[str]:
    """Process items up to optional limit.

    Args:
        items: List of items to process
        limit: Maximum items to process (None = all)

    Returns:
        Processed items

    Raises:
        ValueError: If limit is negative
    """
    if limit is not None and limit < 0:
        raise ValueError(f"Limit must be non-negative, got {limit}")
    return items[:limit] if limit else items

Read the full file on GitHub · 198 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 · 198 lines · 38 tokens per session scan A 4b3497954fcd

Subscribe to this mod's changes

python-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (44 stars, last pushed 4d ago), licensed Apache-2.0. It adds 38 tokens to every session and 1,134 once invoked, about $0.0002 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-30.