OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add wispbit-ai/skills --skill python-expert-best-practices-code-review
Python best practices for writing production-grade code. This skill should be used when writing, reviewing, or refactoring Python code. Triggers on tasks involving Python development, error handling patterns, dictionary operations, and code quality improvements.
npx skills add wispbit-ai/skills --skill python-expert-best-practices-code-review
Simple, pragmatic, opinionated. Only what matters for writing production-grade python code.
Reference these guidelines when:
| 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- |
dict-required-keys - Use d[key] for required dictionary keys to fail fast with KeyErrorno-mutable-defaults - No mutable defaults in function/method parametersoperators-return-notimplemented - Return NotImplemented for unsupported operand types and design + vs += intentionallyno-generic-except - Avoid generic except clauses to prevent hiding unexpected errorslistcomp-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 fileavoid-explanatory-comments - Avoid unnecessary comments for self-documenting codeunnecessary-else-blocks - Avoid unnecessary else blocks after return/break/continue statementsRead individual rule files for detailed explanations and code examples:
Each rule file contains: