AgentSkillsCN

python-dev

Python开发。在编写Python代码、CLI工具、脚本或服务时使用。强调stdlib、类型提示、pytest工具链和最少依赖。

SKILL.md
--- frontmatter
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