【OpenClaw】Skill的安装介绍与编写
一、 Skill 的安装与挂载
OpenClaw 提供了两种主流的安装方式,分别对应生产环境的快速部署和本地的开发调试。
1. 通过 ClawHub CLI 安装和更新(推荐)
这是最标准的安装方式。官方与社区维护的插件都可以通过 ClawHub 注册中心直接拉取(但是很卡不如下载了解压)。你只需要在部署了 OpenClaw 的服务器或本地终端执行:
clawhub install <author>/<skill-name>
例如安装官方浏览器控制插件
clawhub install openclaw/agent-browser
安装完成后,必须重启网关进程才能让路由与大模型的 System Prompt 更新生效:
openclaw gateway restart
更新所有已安装的 Skills:
clawhub update --all
同步(扫描 + 发布更新):
clawhub sync --all
2. 本地挂载(适用于开发与私有 Skill)
在进行自定义开发时,你可以直接将写好的 Skill 文件夹放入 OpenClaw 的工作区。
- 全局生效的路径:
~/.openclaw/skills/ - 特定 Agent(单智能体) 专属的skill路径:
~/.openclaw/agents/<agentId>/skills/ - 将代码放入对应目录后,运行
openclaw doctor命令,系统会自动检测并注册新加入的本地技能。
3. Windows系统中本地skill的路径
如果你是npm安装的,内置技能路径在
C:\Users\用户名\AppData\Roaming\npm\node_modules\openclaw\skills
这里包含OpenClaw预装的所有技能,如 clawhub、coding-agent、healthcheck 等50多个内置技能文件夹。
托管技能路径
C:\Users\Fenvy\.openclaw\workspace\skills
这是你可以存放自定义技能的位置,可以在这里创建自己的技能文件夹和 SKILL.md 文件。
说明:内置技能在OpenClaw安装时就已存在,提供基础功能,托管技能用于扩展OpenClaw的功能,clawhub的默认安装目录也在这里
工作区 Skills:当前文件夹/skills
如果skill名称有冲突,skill读取顺序按照上述顺序
二、 Skill 的标准目录结构
为了让 OpenClaw 的 Gateway 能够正确解析、注册并调度你的技能,你的文件夹必须遵循严格的结构规范。以下是一个标准的自定义 Skill 解剖图:
my-skill/
├── SKILL.md # 必须
│
├── scripts/ # 可选:脚本/代码
│ ├── run.py
│ └── helper.sh
│
├── references/ # 可选:参考资料/说明文档
│ ├── usage.md
│ └── faq.md
│
├── assets/ # 可选:模板、配置、图片、样例文件
│ ├── template.json
│ └── example.txt
│
└── LICENSE.txt # 可选:许可证/说明
OpenClaw 的大模型(无论是 Kimi、Claude 还是本地模型)在遇到任务时,会直接读取 SKILL.md 的文本内容,其他几个相对无所谓。
三、 Skill 编写案例
1. OFFICE skill总分结构
目录中除了Skill.md外,还有其余四个文件spreadsheets.md、documents.md、presentations.md、facilities.md对应不同的场景
name: Office
description: “Master Excel, Word, PowerPoint, and Google Workspace with formulas, formatting, and automation.”
What “Office” Means Here
Productivity software: Microsoft 365, Google Workspace, and office administration.
| Signal | Context | Load |
|---|---|---|
| Formulas, pivot tables, VLOOKUP, macros | Spreadsheets | tools/spreadsheets.md |
| Formatting, headers, mail merge, TOC | Documents | tools/documents.md |
| Slides, animations, presenter view | Presentations | tools/presentations.md |
| Supplies, vendors, facilities, space | Office admin | admin/facilities.md |
Spreadsheets (Excel / Google Sheets)
Formulas people actually need:
VLOOKUP/XLOOKUP— lookup value in table, return another columnSUMIF/COUNTIF— sum/count with conditionsINDEX/MATCH— more flexible than VLOOKUPIFwithAND/OR— conditional logic
Common problems:
- VLOOKUP returns #N/A → check for spaces, data types, exact match setting
- Formula works in one cell, breaks when copied → missing
$for absolute references - Dates sorting wrong → format as actual dates, not text
Pivot tables: Right-click data → Create Pivot Table → drag fields to rows/columns/values.
Documents (Word / Google Docs)
Formatting essentials:
- Use Styles (Heading 1, 2, 3) for structure — enables automatic TOC
- Page numbers starting on page 3: Insert break → Different First Page → start numbering
- Different headers per section: Section breaks, unlink from previous
Mail Merge:
- Prepare data source (Excel with columns: Name, Address, etc.)
- Word → Mailings → Start Mail Merge → Letters
- Insert Merge Fields where dynamic content goes
- Preview Results → Finish & Merge
Presentations (PowerPoint / Google Slides)
Professional basics:
- Slide Master for consistent styling (View → Slide Master)
- 6x6 rule: max 6 bullets, 6 words per bullet
- One idea per slide
Animations:
- Entrance animations for bullet reveal (Appear > Fade > Fly In)
- Timing: On Click vs After Previous
- Keep it subtle — animation should aid, not distract
Presenter View: F5 to present, use Presenter View to see notes while audience sees slides.
Office Administration
For those managing physical office operations:
Supplies & Inventory:
- Track with simple spreadsheet: Item, Quantity, Reorder Point, Supplier
- Set calendar reminders for regular orders
- Bulk ordering usually 15-30% cheaper
Vendor Management:
- Cleaning, maintenance, IT support contracts
- Document SLAs and contact info in shared location
- Review contracts annually for renegotiation
Space Planning:
- Hot-desking: Use booking system (even a shared calendar works)
- Meeting room: Clear naming, visible displays, 15-min buffers
Quick Reference
| Task | Excel/Sheets | Word/Docs | PowerPoint/Slides |
|---|---|---|---|
| Find value | VLOOKUP/XLOOKUP | Find & Replace | Find & Replace |
| Conditional format | Home → Conditional | N/A | N/A |
| Auto-update content | Formulas | Fields | Links |
| Export to PDF | File → Save As | File → Save As | File → Save As |
2.经典结构 find skills
什么时候用这个技能,一些名词的定义,怎么执行这个技能(分步骤),一些规则约束,如果执行失败如何处理
name: find-skills
description: Helps users discover and install agent skills when they ask questions like “how do I do X”, “find a skill for X”, “is there a skill that can…”, or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Find Skills
This skill helps you discover and install skills from the open agent skills ecosystem.
When to Use This Skill
Use this skill when the user:
- Asks “how do I do X” where X might be a common task with an existing skill
- Says “find a skill for X” or “is there a skill for X”
- Asks “can you do X” where X is a specialized capability
- Expresses interest in extending agent capabilities
- Wants to search for tools, templates, or workflows
- Mentions they wish they had help with a specific domain (design, testing, deployment, etc.)
What is the Skills CLI?
The Skills CLI (npx skills) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools.
Key commands:
npx skills find [query]- Search for skills interactively or by keywordnpx skills add <package>- Install a skill from GitHub or other sourcesnpx skills check- Check for skill updatesnpx skills update- Update all installed skills
Browse skills at: https://skills.sh/
How to Help Users Find Skills
Step 1: Understand What They Need
When a user asks for help with something, identify:
- The domain (e.g., React, testing, design, deployment)
- The specific task (e.g., writing tests, creating animations, reviewing PRs)
- Whether this is a common enough task that a skill likely exists
Step 2: Search for Skills
Run the find command with a relevant query:
npx skills find [query]
For example:
- User asks “how do I make my React app faster?” →
npx skills find react performance - User asks “can you help me with PR reviews?” →
npx skills find pr review - User asks “I need to create a changelog” →
npx skills find changelog
The command will return results like:
Install with npx skills add <owner/repo@skill>
vercel-labs/agent-skills@vercel-react-best-practices
└ https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
Step 3: Present Options to the User
When you find relevant skills, present them to the user with:
- The skill name and what it does
- The install command they can run
- A link to learn more at skills.sh
Example response:
I found a skill that might help! The "vercel-react-best-practices" skill provides
React and Next.js performance optimization guidelines from Vercel Engineering.
To install it:
npx skills add vercel-labs/agent-skills@vercel-react-best-practices
Learn more: https://skills.sh/vercel-labs/agent-skills/vercel-react-best-practices
Step 4: Offer to Install
If the user wants to proceed, you can install the skill for them:
npx skills add <owner/repo@skill> -g -y
The -g flag installs globally (user-level) and -y skips confirmation prompts.
Common Skill Categories
When searching, consider these common categories:
| Category | Example Queries |
|---|---|
| Web Development | react, nextjs, typescript, css, tailwind |
| Testing | testing, jest, playwright, e2e |
| DevOps | deploy, docker, kubernetes, ci-cd |
| Documentation | docs, readme, changelog, api-docs |
| Code Quality | review, lint, refactor, best-practices |
| Design | ui, ux, design-system, accessibility |
| Productivity | workflow, automation, git |
Tips for Effective Searches
- Use specific keywords: “react testing” is better than just “testing”
- Try alternative terms: If “deploy” doesn’t work, try “deployment” or “ci-cd”
- Check popular sources: Many skills come from
vercel-labs/agent-skillsorComposioHQ/awesome-claude-skills
When No Skills Are Found
If no relevant skills exist:
- Acknowledge that no existing skill was found
- Offer to help with the task directly using your general capabilities
- Suggest the user could create their own skill with
npx skills init
Example:
I searched for skills related to "xyz" but didn't find any matches.
I can still help you with this task directly! Would you like me to proceed?
If this is something you do often, you could create your own skill:
npx skills init my-xyz-skill
更多推荐



所有评论(0)