Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Python 开发规范,包含 PEP 8 风格、类型注解、异常处理、测试规范等
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | -16% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-02 | ✓→✓ | = Same ✓ | -20% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -14% | 0% |
<instructions>
> 参考来源: PEP 8、Google Python Style Guide
| 类型 | 规则 | 示例 | |------|------|------| | 模块/包 | 小写下划线 | user_service.py | | 类名 | 大驼峰 | UserService | | 函数/变量 | 小写下划线 | get_user_by_id | | 私有方法 | 单下划线前缀 | _internal_logic |
| 表示联合类型(Union)。with 语句。asyncio.gather(*tasks)。asyncio.Semaphore(limit)。multiprocessing 剥离,防止阻塞 Event Loop。python# ✅ 捕获具体异常并记录堆栈 try: user = repository.find(id) except DatabaseError as e: logger.error("Failed to find user %s", id, exc_info=True) raise ServiceError(f"DB error: {e}") from e
> 📋 本回复遵循:python-dev - 章节]
</instructions>
Other measured skills in the registry, with their headline benchmark lift.