plugins/python-skills/skills/python-guidelines/SKILL.md
This skill should be used when writing, reviewing, or refactoring Python code. Covers code integration, idiomatic patterns, docstring formatting, anti-abstraction rules, and software engineering basics.
npx skillsauth add fcakyon/claude-codex-settings python-guidelinesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Integrate into existing code. Don't append to it.
Simple is better than complex. Flat is better than nested. Errors should never pass silently. Unless explicitly silenced. If the implementation is hard to explain, it's a bad idea.
-- The Zen of Python (PEP 20)
Don't do this:
# Generate comment report only if requested
if include_comments:
comment_report = generate_comments_report(start_date, end_date, team, verbose)
else:
comment_report = ""
print(" Skipping comment analysis (disabled)")
Do this:
comment_report = generate_comments_report(start_date, end_date, team, verbose) if include_comments else ""
Ask yourself: "Am I adding code, or integrating into what exists?"
YAGNI: You Aren't Gonna Need It.
Don't build for hypothetical future requirements. Add complexity only when the current task demands it.
Avoid:
Three similar lines of code is better than a premature abstraction. Refactor when the third real use case appears, not before.
But simplicity does not mean chaos. Always maintain:
Ask yourself: "Is this abstraction solving a problem I have right now, or one I'm imagining?"
source .venv/bin/activate or uv run python -c "..."python -c "import pkg; print(pkg.__file__)", then Read.Never assume anything. Run python -c "..." to verify hypotheses about code behavior, package functions, or data structures before suggesting a plan or exiting plan mode.
Ask yourself: "Did I verify this with python -c before building on it?"
int | str unions, uppercase shapes (N, M), lowercase builtins list/dict/tuple, capitalize Any/Pathname (type, optional): Description(type) in parentheses. Never tuple types. Separate named values for multiple returns.__init__: Args only. No Examples/Notes/Methods/References.Ask yourself: "Would a new developer understand this function from the docstring alone?"
For deeper guidance, see the reference files in references/:
zen-of-python.md -- Full Zen of Python (PEP 20) with annotationsgoogle-style-guide.md -- Curated sections: exceptions, defaults, imports, naming, commentsidiomatic-patterns.md -- 18 Python idioms with before/after code exampleseffective-python-tips.md -- Key tips from "Effective Python" by Brett Slatkin, organized by categorytools
This skill should be used when user asks to "set up overleaf", "configure overleaf cookie", "overleaf auth failed", "overleaf 401", "overleaf session expired", "overleaf unauthorized", or needs to install or refresh their Overleaf session cookie for the overleaf-skills plugin.
documentation
This skill should be used when user asks to "fetch overleaf review comments", "address overleaf reviews", "apply overleaf comments", "review my overleaf paper", "sync overleaf feedback to local", "what comments are on my overleaf doc", or wants to act on Overleaf reviewer feedback in a local git-tracked LaTeX repo.
tools
This skill should be used when user asks to "deploy with Dokploy", "use Dokploy Cloud", "manage self-hosted Dokploy", "deploy Docker Compose on Dokploy", "manage Dokploy databases", "configure Dokploy domains", or "look up Dokploy CLI commands".
development
Guides Stripe integration decisions — API selection (Checkout Sessions vs PaymentIntents), Connect platform setup (Accounts v2, controller properties), billing/subscriptions, Treasury financial accounts, integration surfaces (Checkout, Payment Element), migrating from deprecated Stripe APIs, and security best practices (API key management, restricted keys, webhooks, OAuth). Use when building, modifying, or reviewing any Stripe integration — including accepting payments, building marketplaces, integrating Stripe, processing payments, setting up subscriptions, creating connected accounts, or implementing secure key handling.