python

python is a skill for Claude Code, Codex from sordi-ai/skill-everything. It costs 24 tokens per session (2,230 once invoked), scanned A, original, MIT.

A set of recommended practices for writing production Python code, including type annotations, error handling, asynchronous code, and package setup.

In plain words
What is it for?
Use it when creating or reviewing Python code, especially reusable libraries and production code paths.
Why use it?
It helps avoid common Python mistakes that can cause bugs, hidden failures, or maintenance problems.

Skill for Claude CodeCodex

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

Good fit Use it when creating or reviewing Python code, especially reusable libraries and production code paths.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/sordi-ai/skill-everything/python/github.svg)](https://agentmods.dev/skills/sordi-ai/skill-everything/python)
Your own site
<a href="https://agentmods.dev/skills/sordi-ai/skill-everything/python"><img src="https://agentmods.dev/badge/skills/sordi-ai/skill-everything/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/sordi-ai/skill-everything/python"><img src="https://agentmods.dev/badge/skills/sordi-ai/skill-everything/python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,230 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.00024 $0.02230
Opus 5.5 $0.00010 $0.00892
Sonnet 5.5 $0.00005 $0.00446
Haiku 4.5 $0.00002 $0.00223

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

skills/python/SKILL.md · 216 lines

How it starts

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

Sub-Skill: Python Best Practices

Purpose: Prevents the Python-specific mistakes LLMs make on autopilot — mutable defaults, bare excepts, missing guards, and subtle performance traps that pass review but break in production.

Rule classification

  • MUST — load-bearing. Violating causes bugs, security issues, or invisible failures. Never break.
  • SHOULD — default behavior. Deviation needs a documented reason in the code or PR.
  • AVOID — usually wrong; documented exception inline where needed.

Where these rules don't strictly apply: test fixtures, generated code, throwaway scripts, REPL exploration, and tutorial snippets may legitimately differ. The rules below apply to production code paths and reusable libraries.


Rules

Type Hints

  1. SHOULD: Annotate function signatures with types. def process(data) tells callers nothing. Use def process(data: list[str]) -> dict[str, int]:. Return type None should be explicit too. Exception: lambdas and short generator helpers in private scope.

  2. SHOULD: Use built-in lowercase generics for Python 3.9+. list[str], dict[str, int], tuple[int, ...] rather than List, Dict, Tuple from typing.

  3. MUST: Use Optional[X] or X | None for nullable parameters, never a bare default of None without a type annotation. def find(id: int) -> User | None: not def find(id):.

  4. AVOID: Any as a shortcut. If the type is genuinely unknown, document why with a comment. Any silences the type checker and hides bugs. Exception: third-party libraries without stubs and explicit dynamic-data boundaries (e.g. JSON decode at the API edge).


Error Handling

  1. MUST: Never use bare except:. It catches SystemExit, KeyboardInterrupt, and GeneratorExit. Always catch except Exception: at minimum, or a specific exception class.

    # Wrong
    try:
        risky()
    except:
        pass
    
    # Correct
    try:
        risky()
    except ValueError as e:
        logger.warning("Invalid value: %s", e)
    

Read the full file on GitHub · 216 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 · 216 lines · 24 tokens per session scan A 6eea2e1a9f70

Subscribe to this mod's changes

python is a skill published in the GitHub repository sordi-ai/skill-everything (20 stars, last pushed 5mo ago), licensed MIT. It adds 24 tokens to every session and 2,230 once invoked, about $0.0001 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.

Related

Other skills, from other repositories