/pythonista:python-patternsfrom pythonista
Apply idiomatic, behavior-preserving Python patterns -- EAFP, guard clauses, comprehensions, dataclasses, decorators, exception hierarchies, YAGNI-driven simplification -- to a file or module without changing what it does. Use when the user asks to simplify, make more idiomatic/pythonic, clean up, or reduce over-engineering in Python code, or as the idiom-cleanup stage of a mutating pipeline.
Ships in pythonista. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Safe-tier mutation stage of the pythonista pipeline: idiom-level, behavior-preserving cleanup.
Absorbs the retired python-simplifier skill wholesale (idioms, dead-code judgment, duplication,
YAGNI are one cognitive operation, not four) plus a verified, citation-backed cherry-pick from
affaan-m/everything-claude-code's python-patterns.
patterns stage of python-workflow's tidy or ship-it recipespython-refactor's structural movesreferences/idioms.md for the full before/after catalog.python-scan's evidence (find_dead_code, find_duplicates, find_unpythonic,
find_overengineering) to target real findings over combing files blind.references/idioms.md__slots__/generator idioms, exception chaining, Custom Exception Hierarchy| Content | Routes to | Why |
|---|---|---|
Anti-Patterns table (mutable defaults, type()/isinstance, ==None, bare except, import *) | python-quality-tools | All five map to real ruff rules (B006, E721, E711, E722, F403) -- enforced there, not duplicated as prose here |
| Import Conventions (stdlib/third-party/local ordering) | python-quality-tools | ruff I001 territory, not a judgment call |
| Concurrency (threading/multiprocessing/async) | (out of scope) | High-stakes correctness territory, not an everyday idiom pass -- the one genuinely arguable routing call here, not clean-cut like the rest |
| Structural moves (Extract Method, Encapsulate Global State, DI) | python-refactor | Idiom-level vs. structural is the tier boundary between these two skills |
python-patterns (this skill, idiom-level) → python-refactor (structural). If a cleanup needs
more than a same-function idiom swap -- splitting a function, eliminating a global, introducing a
domain model -- stop and hand off rather than forcing it through this skill's before/after catalog.
python-workflow's plan checkpoint unless python-scan's
find_dead_code, find_duplicates, find_unpythonic, and find_overengineering are all
empty.Prompt: "apply idiomatic patterns to fixtures/smelly_module.py".
Expect range(len(order["items"])) loops flagged for enumerate, order.get("valid") == True
flagged for direct truthiness (order.get("valid")), and the manual lines += ... + "\n"
string-concatenation loop in build_receipt flagged for "\n".join(...).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub takfes/indie-marketplace --plugin pythonista12 skills in this plugin
/python-architectureWhole-module structural critique using deep-module design vocabulary: is a module's interface small relative to what it hides (deep) or nearly as complex as its implementation (shallow), does it survive the deletion test, and does its seam sit in the right place. Emits structured findings, never an HTML report or a mutation. Explicit call only, or reachable through python-workflow's critique recipe recommending it by name.
/python-documentAdd missing module summaries, docstrings, type annotations, and why-comments to Python code -- additive only, never changing behavior or rewording existing documentation. Use when the user asks to document, add docstrings/type hints/comments to, or improve documentation coverage of Python code, or as the documentation stage of a ship pipeline./python-