重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/psiace/skills --skill piglet使用《Python 工匠》中的模式编写和审查 Python 代码的简明指南。
| 主题 | 指南 | 参考 |
|---|---|---|
| 变量与命名 | 描述性命名,避免隐式魔法值,保持变量作用域紧密 | references/variables-and-naming.md |
| 分支与条件 | 避免深层嵌套,封装复杂条件 | references/if-else-and-branches.md |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 数字、字符串、容器 | 替换魔法字面量,选择合适的容器 | references/values-and-containers.md |
| 函数与返回值 | 稳定的返回类型,避免错误元组 | references/functions-and-returns.md |
| 异常处理 | 仅捕获你能处理的异常,保持作用域小 | references/exceptions-handling.md |
| 循环与迭代 | 优先使用迭代器辅助工具而非嵌套循环 | references/loops-and-iteration.md |
| 装饰器 | 保留函数签名并避免装饰器陷阱 | references/decorators.md |
| 导入与依赖 | 使用局部导入和边界来防止循环依赖 | references/imports-and-structure.md |
| 规则与文件 I/O | 使用合适的数据结构和 pathlib | references/rules-and-file-io.md |
| Python 中的 SOLID 原则 | 保持继承的可替换性和行为的明确性 | references/solid-python.md |
| 边界情况 | 当 EAFP 能使主路径更清晰时优先使用 | references/edge-cases.md |
| 海象运算符 | 使用赋值表达式消除重复 | references/walrus-operator.md |
urls 中列出了来源 URL。每周安装次数
50
代码仓库
GitHub 星标数
162
首次出现
2026年2月5日
安全审计
安装于
codex45
opencode44
github-copilot42
kimi-cli41
gemini-cli41
amp41
Concise guidance for writing and reviewing Python code using patterns from One Python Craftsman.
| Topic | Guidance | Reference |
|---|---|---|
| Variables and Naming | Descriptive names, avoid implicit magic, keep variable scope close | references/variables-and-naming.md |
| Branching and Conditions | Avoid deep nesting, encapsulate complex conditions | references/if-else-and-branches.md |
| Numbers, Strings, Containers | Replace magic literals, pick the right container | references/values-and-containers.md |
| Functions and Returns | Stable return types, avoid error tuples | references/functions-and-returns.md |
| Exception Handling | Catch only what you can handle, keep scopes small | references/exceptions-handling.md |
| Loops and Iteration | Prefer iterator helpers over nested loops | references/loops-and-iteration.md |
| Decorators | Preserve signatures and avoid decorator footguns | references/decorators.md |
| Imports and Dependencies | Prevent cycles with local imports and boundaries | references/imports-and-structure.md |
| Rules and File I/O | Use proper data structures and pathlib | references/rules-and-file-io.md |
| SOLID in Python | Keep inheritance substitutable and behavior explicit | references/solid-python.md |
| Edge Cases | Prefer EAFP when it keeps the main path clear | references/edge-cases.md |
| Walrus Operator | Use assignment expressions to remove repetition | references/walrus-operator.md |
urls.Weekly Installs
50
Repository
GitHub Stars
162
First Seen
Feb 5, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex45
opencode44
github-copilot42
kimi-cli41
gemini-cli41
amp41
Android 整洁架构指南:模块化设计、依赖注入与数据层实现
1,600 周安装