← 返回 Skills 市场
3494
总下载
5
收藏
14
当前安装
2
版本数
在 OpenClaw 中安装
/install py
功能描述
Write reliable Python avoiding mutable defaults, import traps, and common runtime surprises.
使用说明 (SKILL.md)
Quick Reference
| Topic | File |
|---|---|
| Dynamic typing, type hints, duck typing | types.md |
| List/dict/set gotchas, comprehensions | collections.md |
| Args/kwargs, closures, decorators, generators | functions.md |
| Inheritance, descriptors, metaclasses | classes.md |
| GIL, threading, asyncio, multiprocessing | concurrency.md |
| Circular imports, packages, init.py | imports.md |
| Pytest, mocking, fixtures | testing.md |
Critical Rules
def f(items=[])shares list across all calls — useitems=Nonethenitems = items or []ischecks identity,==checks equality —"a" * 100 is "a" * 100may be False- Modifying list while iterating skips elements — iterate over copy:
for x in list(items): - GIL prevents true parallel Python threads — use multiprocessing for CPU-bound
- Bare
except:catchesSystemExitandKeyboardInterrupt— useexcept Exception: UnboundLocalErrorwhen assigning to outer scope variable — usenonlocalorglobalopen()without context manager leaks handles — always usewith open():- Circular imports fail silently or partially — import inside function to break cycle
0.1 + 0.2 != 0.3— floating point, usedecimal.Decimalfor money- Generator exhausted after one iteration — can't reuse, recreate or use
itertools.tee - Class attributes with mutables shared across instances — define in
__init__instead __init__is not constructor —__new__creates instance,__init__initializes- Default encoding is platform-dependent — always specify
encoding='utf-8'
安全使用建议
This skill is documentation-only and appears coherent with its purpose. It doesn't include executable code or ask for secrets. Before installing, confirm your agent sandbox: if the agent is permitted to execute python3 or access local files, the agent could (independently of this skill) run Python code you provide — that's a general platform permission concern, not an issue with this skill. If you want extra caution, keep the agent's execution rights and file access restricted, and verify the system python3 version matches what you expect.
功能分析
Type: OpenClaw Skill
Name: py
Version: 1.0.1
The OpenClaw AgentSkills bundle consists entirely of markdown files providing educational content on common Python programming pitfalls and best practices. The `SKILL.md` defines the skill as a reference for writing reliable Python and specifies a `python3` dependency, which is appropriate. There is no executable code, no instructions for the agent that could lead to prompt injection, data exfiltration, or any other malicious activity. All content is purely informational and aligns with the stated purpose.
能力评估
Purpose & Capability
Name, description, and required binary (python3) align with a Python guidance helper. The content is documentation on common Python pitfalls and does not request unrelated credentials or tools. Minor metadata inconsistency: registry slug is 'py' while SKILL.md uses slug 'python' — likely cosmetic and not a security issue.
Instruction Scope
SKILL.md and the included .md files are documentation-only; they do not instruct the agent to read arbitrary files, send data externally, or run network requests. There are no open-ended directives that would give the agent broad discretion to collect or exfiltrate data.
Install Mechanism
No install spec and no code files to write or execute. This is the lowest-risk form (instruction-only).
Credentials
The skill requests no environment variables, credentials, or config paths. Requesting only python3 is proportionate for a Python guidance skill.
Persistence & Privilege
Defaults (always: false, model invocation allowed) are appropriate. The skill does not request permanent presence or system-wide changes.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install py - 安装完成后,直接呼叫该 Skill 的名称或使用
/py触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Initial release
v1.0.0
Initial release
元数据
常见问题
Python 是什么?
Write reliable Python avoiding mutable defaults, import traps, and common runtime surprises. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 3494 次。
如何安装 Python?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install py」即可一键安装,无需额外配置。
Python 是免费的吗?
是的,Python 完全免费(开源免费),可自由下载、安装和使用。
Python 支持哪些平台?
Python 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。
谁开发了 Python?
由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.1。
推荐 Skills