← 返回 Skills 市场
nidhov01

09 AI编程

作者 nidhov01 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
222
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install 09-ai
功能描述
AI辅助编程技能,帮助Claude学习如何创建和使用OpenClaw技能
使用说明 (SKILL.md)

AI编程技能

AI辅助编程技能,帮助Claude学习如何创建和使用OpenClaw技能。

技能描述

这是一个关于如何开发OpenClaw技能的完整指南。它解释了技能的结构、如何编写SKILL.md、如何创建工具脚本,以及如何在对话中"教"Claude使用这些技能。

使用场景

  • 用户问:"如何在OpenClaw中创建新技能?" → 提供完整指南
  • 用户说:"创建一个数据处理技能" → 按照指南创建技能结构
  • 用户问:"SKILL.md应该怎么写?" → 提供格式和示例
  • 用户说:"我写了一个技能,OpenClaw不会用" → 解释如何教学

技能结构

标准技能目录结构

skill-name/
├── SKILL.md              # 主文档(OpenClaw自动读取)
├── references/           # 参考文档(自动读取)
│   ├── topic1.md
│   └── topic2.md
└── tools/               # 工具脚本(需要教OpenClaw调用)
    └── script.py

OpenClaw如何学习

自动做的

  • ✅ 读取 SKILL.md
  • ✅ 读取 references/*.md
  • ✅ 理解功能说明
  • ✅ 响应相关请求

需要你做的

  • ⚠️ 安装 Python 依赖
  • ⚠️ 在对话中教它如何使用工具
  • ⚠️ 提供清晰的工具脚本

创建技能的步骤

步骤1:创建技能目录

mkdir -p ~/.openclaw/skills/my-skill/references

步骤2:编写SKILL.md

---
name: my-skill
description: 我的自定义技能
version: 1.0.0
---

# 我的技能

## 功能
- 功能1: 描述
- 功能2: 描述

## 使用方法
当我说"XXX"时,请调用YYY工具

步骤3:添加参考文档(可选)

cat > ~/.openclaw/skills/my-skill/references/guide.md \x3C\x3C 'EOF'
# 使用指南

详细的使用说明...
EOF

步骤4:在对话中"教"OpenClaw

用户: 我创建了一个新技能 my-skill,位置在 ~/.openclaw/skills/my-skill/

OpenClaw: 我看到这个技能了,它包含...

用户: 这个技能有一个工具在 tools/script.py,
当我说"执行XXX"时,请调用它。

OpenClaw: 明白了,我会记住这个规则。

用户: 执行XXX

OpenClaw: [自动调用工具]

SKILL.md编写规范

推荐格式

---
name: your-skill
description: 简短描述
version: 1.0.0
author: 你的名字
---

# 技能名称

## 功能概述
简要描述这个技能做什么

## 主要功能

### 功能1
- 说明
- 使用示例

### 功能2
- 说明
- 使用示例

## 使用方法

### 场景1: XXX
当用户说"XXX"时,我会:
1. 步骤1
2. 步骤2

## 工具脚本

### script1.py
位置: tools/script1.py
功能: 描述
调用方式: python tools/script1.py

## 限制
- 限制1
- 限制2

工具脚本最佳实践

基本结构

#!/usr/bin/env python3
"""
工具脚本名称
"""

def main():
    """主函数"""
    # 你的代码
    pass

if __name__ == "__main__":
    main()

关键点

  • ✅ 清晰的函数命名
  • ✅ 完整的注释
  • ✅ 错误处理
  • ✅ 命令行参数支持

故障排除

问题1:OpenClaw识别不到Skill

解决

# 确认位置
ls ~/.openclaw/skills/your-skill/SKILL.md

# 验证格式
head -5 ~/.openclaw/skills/your-skill/SKILL.md
# 应该看到 --- 开头的YAML

问题2:OpenClaw不会调用工具

解决:需要在对话中教它

  • 告诉它工具位置
  • 告诉它调用方式
  • 告诉它触发条件

问题3:文档没有被索引

解决:确认文件在 references/ 目录

ls ~/.openclaw/skills/your-skill/references/

最佳实践

✅ DO(推荐)

  1. 清晰的命名

    • skill-name: 清楚表达功能
    • file names: 描述性命名
  2. 完整的文档

    • SKILL.md: 完整功能说明
    • references/: 详细参考文档
  3. 示例丰富

    • 代码示例
    • 对话示例
    • 使用场景
  4. 错误处理

    • 工具脚本处理异常
    • 提供错误信息

❌ DON'T(避免)

  1. 不要过度依赖自动化

    • OpenClaw需要你教它如何使用工具
  2. 不要省略文档

    • 没有文档 = OpenClaw学不会
  3. 不要硬编码路径

    • 使用相对路径或环境变量

注意事项

  1. SKILL.md是关键:OpenClaw自动读取
  2. 需要你教学:在对话中教它使用工具
  3. 提供工具脚本:清晰的调用接口
  4. 持续优化:根据使用反馈改进
安全使用建议
This skill is a documentation/teaching guide and is coherent with that purpose. Before using it, do the following: (1) only place tool scripts in ~/.openclaw/skills you trust and open-review their contents — the agent may execute them once taught; (2) install Python packages yourself from trusted sources and avoid running unreviewed install commands; (3) avoid embedding secrets or hard-coded credentials in skill files or tools; (4) when teaching the agent to call local scripts, prefer wrapper functions with minimal, audited permissions and explicit input validation. If you want higher assurance, test tool scripts in an isolated environment before teaching OpenClaw to invoke them.
功能分析
Type: OpenClaw Skill Name: 09-ai Version: 1.0.0 The skill bundle is purely educational documentation designed to teach the OpenClaw agent and the user how to create and structure new skills. It contains no executable code, only Markdown files (SKILL.md and guides/OpenClaw如何学习文档说明.md) that describe directory structures, metadata formats, and conversational patterns for tool integration. There are no signs of malicious prompt injection, data exfiltration, or unauthorized execution logic.
能力评估
Purpose & Capability
Name/description match the actual content: an authoring/teaching guide for OpenClaw skills. The skill requires no env vars, binaries, or installs, which is proportionate for a documentation/instruction-only skill.
Instruction Scope
SKILL.md stays on-topic (how to structure SKILL.md, references/, tools/, and how to 'teach' OpenClaw). It includes commands to create ~/.openclaw/skills and examples showing how OpenClaw can be taught to call tools/scripts. That is expected for this purpose, but it means the agent may later execute user-provided local scripts when taught — users should review those scripts before teaching or enabling calls to them.
Install Mechanism
No install spec or code files are present. The document recommends manual pip installs for any tool scripts, which is appropriate for an instructions-only skill and does not introduce an install-time risk from the skill itself.
Credentials
The skill requests no credentials, no config paths, and no system-wide access. It does recommend installing common Python packages (requests, pandas, numpy) for tool scripts; these are reasonable for the described examples and are user-managed.
Persistence & Privilege
always:false and agent autonomy is default. The guide explicitly describes teaching the agent persistent call rules (telling OpenClaw where a tool is and when to call it). This is expected functionality but increases the importance of reviewing any local scripts the agent may execute later.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install 09-ai
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /09-ai 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- 首个发布版本,提供完整的 AI 辅助编程技能指南 - 详细说明 OpenClaw 技能结构、开发步骤及 SKILL.md 编写规范 - 包含工具脚本创建和教学说明,支持自定义命令与自动化 - 提供常见故障排查方法及最佳实践建议 - 适用于指导如何创建、描述、组织和教学 OpenClaw 技能
元数据
Slug 09-ai
版本 1.0.0
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 1
常见问题

09 AI编程 是什么?

AI辅助编程技能,帮助Claude学习如何创建和使用OpenClaw技能. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 222 次。

如何安装 09 AI编程?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install 09-ai」即可一键安装,无需额外配置。

09 AI编程 是免费的吗?

是的,09 AI编程 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

09 AI编程 支持哪些平台?

09 AI编程 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 09 AI编程?

由 nidhov01(@nidhov01)开发并维护,当前版本 v1.0.0。

💬 留言讨论