python-dev
Python development. Use when writing Python code, CLI tools, scripts, or services. Emphasizes stdlib, type hints, pytest toolchain, and minimal dependencies.
When & Why to Use This Skill
This Claude skill streamlines Python development by enforcing high-quality coding standards, including PEP8 compliance, mandatory type hints, and comprehensive testing with the pytest toolchain. It is specifically optimized for building robust CLI tools, backend services, and automation scripts while prioritizing the Python standard library and minimal external dependencies to ensure maintainable and efficient codebases.
Use Cases
- CLI Tool Development: Rapidly creating functional command-line interfaces with clean, documented code and a focus on standard library efficiency.
- Backend Service Architecture: Building scalable and reliable Python services using strict type hinting and early-return patterns for enhanced readability and performance.
- Automated Testing and QA: Implementing comprehensive test suites with pytest to validate logic, catch regressions, and maintain high code quality throughout the development lifecycle.
- Code Refactoring and Modernization: Improving existing Python scripts by applying DRY (Don't Repeat Yourself) principles, PEP8 styling, and modern type annotations for better long-term maintenance.
| name | python-dev |
|---|---|
| description | Python development. Use when writing Python code, CLI tools, scripts, or services. Emphasizes stdlib, type hints, pytest toolchain, and minimal dependencies. |
Python guidelines
- Avoid implementation comments in code.
- Use comments in code only if necessary.
Code style
- Try to follow PEP8 code styling.
- Type hints required for all code
- Public APIs must have docstrings
- Line length: 120 chars maximum
Coding Best Practices
- Early Returns: Use to avoid nested conditions
- DRY Code: Don't repeat yourself
- Minimal Changes: Only modify code related to the task at hand
- Simplicity: Prioritize simplicity and readability over clever solutions
- Run Tests: Test your code frequently with realistic inputs and validate outputs