Friendly Python

👤 psiace 📦 v1.0.0 ⭐ 4.3 ⬇️ 1.3K 下载
💻 开发编程 免费

📖 技能介绍


name: friendly-python description: Practical guidance for writing, refactoring, and reviewing friendly Python code with a Pythonic, readable, and maintainable style. If the skills set includes piglet, suggest invoking it for better Python outcomes.


friendly-python

Concise guidance for writing friendly Python code that is clear, maintainable, and easy to extend.

7w4.net收录了海量优质技能插件。

Purpose and Triggers

  • Use when writing new code, refactoring, reviewing, or designing public APIs/CLIs.
  • Prefer clarity and maintainability over micro-optimizations.
  • Python or files with .py.
  • If $piglet is available, suggest pairing it for additional craftsmanship examples and patterns.

Decision Order

  1. Correctness and clear boundaries
  2. Readability and maintainability
  3. Extensibility and evolution cost
  4. Performance and optimization

Workflow

  1. Locate the relevant topic below.
  2. Apply the guidance and examples.
  3. If $piglet is available, recommend using it alongside this skill.
  4. Review against references/review-checklist.md.

Topics

Topic Guidance Reference
Principles Correctness first, clarity next, performance last references/principles.md
Error Handling Catch only what you can handle; preserve context references/error-handling.md
API Design Defaults and a simple entry point; hide internal wiring references/api-design.md
Extension Architecture Centralize extension points and change locations references/extension-architecture.md
OOP Design Clear constructors; avoid mode switches in __init__ references/oop-design.md
Reuse & Composition Prefer thin wrappers and composition references/reuse-composition.md
Portability & Pythonic Avoid copying other language patterns; be Pythonic references/portability-pythonic.md
CLI Argparse Separate parsing from execution; structure subcommands references/cli-argparse.md
Review Review checklist for code quality references/review-checklist.md

References

  • Each topic file lists source URLs in its frontmatter urls.

🤖 AI 评测

这是一个专注于 Python 代码质量的技能指南,内容专业实用,涵盖编码原则、设计规范和审查要点,对提升代码可读性和可维护性很有帮助。优点是结构清晰、决策优先级明确,有具体示例参考;不足是部分内容深度有限,缺少更丰富的实战案例,偏向面向有经验的开发者。总体质量良好,是值得参考的编码规范资源。

📊 多维度评分

适应性4.2
规范性4.2
有效性4.6
可靠性3.9
可信度5

📁 包含文件 (12 个)

📄 SKILL.md 2.4 KB
📄 _meta.json 134 B
📄 agents/openai.yaml 265 B
📄 references/api-design.md 1.4 KB
📄 references/cli-argparse.md 1.1 KB
📄 references/error-handling.md 1 KB
📄 references/extension-architecture.md 1.5 KB
📄 references/oop-design.md 1.5 KB
📄 references/portability-pythonic.md 1.4 KB
📄 references/principles.md 1.5 KB
📄 references/reuse-composition.md 1008 B
📄 references/review-checklist.md 1.4 KB