| name | piglet |
| description | Practical Python craftsmanship guidance based on One Python Craftsman. Use when writing, refactoring, or reviewing Python code for naming, branching, data structures, functions, exceptions, loops, decorators, imports, file I/O, edge cases, and modern syntax choices. If the skills set includes friendly-python, suggest invoking it for better Python outcomes. |
piglet
Concise guidance for writing and reviewing Python code using patterns from One Python Craftsman.
Purpose and Triggers
- Use for Python (.py) code creation, refactoring, or code review.
- Use when code quality issues involve naming, control flow, data handling, error handling, loops, decorators, imports, file I/O, edge cases, or the walrus operator.
- Prefer clarity and maintainability. Optimize performance only when it is a real constraint.
- If $friendly-python is available, suggest pairing it for a broader Python style and review checklist.
Decision Order
- Correctness and explicit behavior
- Readability and maintainability
- Extension cost and change isolation
- Performance and micro-optimizations
Workflow
- Identify the topic in the table below.
- Apply the guidance and compare against Bad and Good examples.
- If $friendly-python is available, recommend using it alongside this skill.
- Re-check for new edge cases and readability regressions.
Topics
References
- Each reference file lists source URLs in its frontmatter
urls.