Python
v1.0.0为 OpenClaw agents 提供 Python 语言支持。涵盖环境配置、依赖管理、linting、测试及 Python 代码执行的最佳实践。
0· 22·0 当前·0 累计
下载技能包
最后更新
2026/4/20
安全扫描
OpenClaw
安全
high confidence该技能的说明、文件和需求均符合通用的 Python 支持/助手角色;所请求或描述的内容均未超出该范畴。
评估建议
This skill appears to be what it says: a set of Python best-practice instructions and a style guide. Before using it, be aware that the guidance includes running pip install at runtime (including an example function that calls pip via subprocess). Installing packages dynamically can execute arbitrary code and access the network, so only install trusted, pinned packages, prefer using isolated virtual environments (venv/virtualenv), and consider running such operations in a sandbox. Also note two ...详细分析 ▾
✓ 用途与能力
Name/description (Python support) matches the SKILL.md content: environment checks, running scripts, dependency management, linting/testing guidance and a style guide. The skill does not request unrelated credentials, binaries, or config paths.
ℹ 指令范围
Instructions stay within Python tooling and best practices, but they explicitly recommend installing packages at runtime (pip install via subprocess). Runtime installs are expected for dependency management but allow arbitrary package code execution and network access—this is inherent to the task and should be handled cautiously. SKILL.md references additional reference files (testing-patterns.md, debugging-tips.md) that are not present in the package manifest.
✓ 安装机制
Instruction-only skill with no install spec and no code files beyond documentation. Nothing is written to disk by the skill itself during installation.
✓ 凭证需求
No environment variables, credentials, or config paths are requested. The skill does not require access to unrelated systems or secrets.
✓ 持久化与权限
Default privileges (not always: true) and autonomous invocation allowed (platform default). The skill does not request permanent presence or system-wide changes.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv1.0.02026/4/20
python-support 技能首发版 - 为 OpenClaw agents 提供 Python 环境搭建、依赖管理、lint、测试与执行最佳实践 - 包含环境检查、脚本运行与安全包装安装的快速上手指南 - 推荐脚本执行、错误处理、文件编码、跨平台路径管理与输出格式的最佳实践 - 提供风格指南、测试模式与调试技巧的参考链接
● 无害
安装命令
点击复制官方npx clawhub@latest install python-support
镜像加速npx clawhub@latest install python-support --registry https://cn.longxiaskill.com 镜像可用
技能文档
--- name: python-support description: 为 OpenClaw agents 提供 Python 语言支持。涵盖环境搭建、依赖管理、lint、测试及 Python 代码执行的最佳实践。用于运行 Python 脚本、管理虚拟环境、安装包、调试 Python 代码,或通过 lint 与格式化保障代码质量。
# Python Support
快速开始
在 OpenClaw 中所有 Python 相关操作均使用本 skill。环境检查
验证 Python 环境: ``bash
python3 --version
pip3 --list
which python3
` 运行脚本
始终使用绝对路径并显式指定 Python 解释器:
`bash
python3 /path/to/script.py
` 依赖管理
安全安装包:
`bash
pip3 install --quiet package-name
` 一次性脚本需依赖时,可内联安装并验证:
`python
import subprocess
import sys
def ensure_package(package):
try:
__import__(package)
except ImportError:
subprocess.check_call([sys.executable, "-m", "pip", "install", "--quiet", package])
`
最佳实践
Shebang:可执行脚本使用#!/usr/bin/env python3- 错误处理:外部操作务必加 try/except
编码:所有文件操作指定encoding="utf-8"路径:跨平台路径用pathlib.Path`- 输出:结构化输出优先 JSON 或其他机器可读格式
参考资料
- 见 references/style-guide.md 获取 Python 风格指南
- 见 references/testing-patterns.md 获取测试模式
- 见 references/debugging-tips.md 获取调试技巧