← 返回 Skills 市场
ivangdavila

Python

作者 Iván · GitHub ↗ · v1.0.1
linuxdarwinwin32 ✓ 安全检测通过
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 — use items=None then items = items or []
  • is checks identity, == checks equality — "a" * 100 is "a" * 100 may 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: catches SystemExit and KeyboardInterrupt — use except Exception:
  • UnboundLocalError when assigning to outer scope variable — use nonlocal or global
  • open() without context manager leaks handles — always use with open():
  • Circular imports fail silently or partially — import inside function to break cycle
  • 0.1 + 0.2 != 0.3 — floating point, use decimal.Decimal for 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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install py
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /py 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Initial release
v1.0.0
Initial release
元数据
Slug py
版本 1.0.1
许可证
累计安装 15
当前安装数 14
历史版本数 2
常见问题

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。

💬 留言讨论