python-expert-best-practices-code-review

wispbit-ai/skills · updated Apr 24, 2026

$npx skills add https://github.com/wispbit-ai/skills --skill python-expert-best-practices-code-review
0 commentsdiscussion
summary

Simple, pragmatic, opinionated. Only what matters for writing production-grade python code.

skill.md

Python 3.14+ Expert Best Practices

Simple, pragmatic, opinionated. Only what matters for writing production-grade python code.

When to Apply

Reference these guidelines when:

  • Writing Python functions, classes, or modules
  • Reviewing Python code for error handling issues
  • Refactoring existing Python codebases
  • Implementing data validation and API boundaries
  • Optimizing error detection and debugging patterns

Rule Categories by Priority

Priority Category Impact Prefix
1 Error Handling CRITICAL dict-, operators-
2 Common Bugs CRITICAL-HIGH no-mutable-, no-generic-
3 Code Clarity HIGH-MEDIUM listcomp-, no-inline-
4 Code Style LOW avoid-, unnecessary-

Quick Reference

  • dict-required-keys - Use d[key] for required dictionary keys to fail fast with KeyError
  • no-mutable-defaults - No mutable defaults in function/method parameters
  • operators-return-notimplemented - Return NotImplemented for unsupported operand types and design + vs += intentionally
  • no-generic-except - Avoid generic except clauses to prevent hiding unexpected errors
  • listcomp-no-side-effects - List comprehensions must produce a value you use (no side-effect listcomps)
  • no-inline-imports - Place all import statements at the top of the file
  • avoid-explanatory-comments - Avoid unnecessary comments for self-documenting code
  • unnecessary-else-blocks - Avoid unnecessary else blocks after return/break/continue statements

How to Use

Read individual rule files for detailed explanations and code examples:

rules/dict-required-keys.md
rules/no-mutable-defaults.md
rules/operators-return-notimplemented.md
rules/no-generic-except.md
rules/listcomp-no-side-effects.md
rules/no-inline-imports.md
rules/avoid-explanatory-comments.md
rules/unnecessary-else-blocks.md

Each rule file contains:

  • Brief explanation of why it matters
  • When to use and when not to use the pattern
  • Implementation requirements
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Additional context and references

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.726 reviews
  • Amelia Chen· Dec 20, 2024

    Useful defaults in python-expert-best-practices-code-review — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Neel Nasser· Dec 12, 2024

    We added python-expert-best-practices-code-review from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Rahul Santra· Nov 3, 2024

    Useful defaults in python-expert-best-practices-code-review — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Naina Ndlovu· Nov 3, 2024

    python-expert-best-practices-code-review fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Pratham Ware· Oct 22, 2024

    Registry listing for python-expert-best-practices-code-review matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Naina Park· Oct 22, 2024

    python-expert-best-practices-code-review has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Yash Thakker· Sep 25, 2024

    Keeps context tight: python-expert-best-practices-code-review is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Kabir Harris· Sep 9, 2024

    python-expert-best-practices-code-review is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Kabir Anderson· Aug 28, 2024

    Solid pick for teams standardizing on skills: python-expert-best-practices-code-review is focused, and the summary matches what you get after install.

  • Dhruvi Jain· Aug 16, 2024

    I recommend python-expert-best-practices-code-review for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 26

1 / 3