python-dev
Python开发。在编写Python代码、CLI工具、脚本或服务时使用。强调标准库、类型提示、pytest工具链和最小依赖项。
📖 中文导读:Python开发。在编写Python代码、CLI工具、脚本或服务时使用。强调标准库、类型提示、pytest工具链和最小依赖项。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
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