Skip to content

Commit 57bd1c7

Browse files
committed
Deepen OpenClaw skill configuration docs
1 parent aea5898 commit 57bd1c7

2 files changed

Lines changed: 150 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,49 @@ Workspace-specific install:
118118
git clone git@github.com:GloriaGuo/opencli-skill.git ./skills/opencli
119119
```
120120

121-
If skill watching is enabled in OpenClaw, updates are auto-reloaded. Otherwise restart the agent session or gateway after installing.
121+
Config file: `~/.openclaw/openclaw.json`
122+
123+
Minimal shared-skill watcher setup:
124+
125+
```json5
126+
{
127+
skills: {
128+
load: {
129+
watch: true,
130+
watchDebounceMs: 250,
131+
},
132+
entries: {
133+
opencli: {
134+
enabled: true,
135+
},
136+
},
137+
},
138+
}
139+
```
140+
141+
Load the skill from an extra shared directory:
142+
143+
```json5
144+
{
145+
skills: {
146+
load: {
147+
extraDirs: [
148+
"/Users/you/skill-packs",
149+
],
150+
watch: true,
151+
watchDebounceMs: 250,
152+
},
153+
},
154+
}
155+
```
156+
157+
Notes:
158+
159+
- `~/.openclaw/skills` is shared across agents
160+
- `./skills` or `<workspace>/skills` is workspace-scoped
161+
- `skills.load.extraDirs` is useful when you keep a central skill pack outside the default directories
162+
- `skills.entries.opencli.enabled: false` can disable this skill without deleting files
163+
- if skill watching is disabled, restart the relevant agent session or gateway after installing or updating
122164

123165
Example prompts:
124166

@@ -290,7 +332,49 @@ git clone git@github.com:GloriaGuo/opencli-skill.git ~/.openclaw/skills/opencli
290332
git clone git@github.com:GloriaGuo/opencli-skill.git ./skills/opencli
291333
```
292334

293-
如果 OpenClaw 开启了 skills watch,修改后会自动刷新;否则安装后重启对应 agent 会话或 gateway。
335+
配置文件位置:`~/.openclaw/openclaw.json`
336+
337+
一个最小可用的共享 skill 自动刷新配置:
338+
339+
```json5
340+
{
341+
skills: {
342+
load: {
343+
watch: true,
344+
watchDebounceMs: 250,
345+
},
346+
entries: {
347+
opencli: {
348+
enabled: true,
349+
},
350+
},
351+
},
352+
}
353+
```
354+
355+
如果你想从额外目录加载一整套 skill:
356+
357+
```json5
358+
{
359+
skills: {
360+
load: {
361+
extraDirs: [
362+
"/Users/you/skill-packs",
363+
],
364+
watch: true,
365+
watchDebounceMs: 250,
366+
},
367+
},
368+
}
369+
```
370+
371+
说明:
372+
373+
- `~/.openclaw/skills` 适合所有 agent 共用
374+
- `./skills` 或 `<workspace>/skills` 适合当前 workspace 独享
375+
- `skills.load.extraDirs` 适合挂载你自己的集中 skill 目录
376+
- `skills.entries.opencli.enabled: false` 可以在不删文件的情况下禁用这个 skill
377+
- 如果没开 watch,安装或更新后需要重启对应 agent 会话或 gateway
294378

295379
OpenClaw 里可以这样触发:
296380

‎examples/openclaw.md‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,74 @@ Workspace install:
2121
git clone git@github.com:GloriaGuo/opencli-skill.git ./skills/opencli
2222
```
2323

24+
## Config File
25+
26+
OpenClaw skill loading is controlled through:
27+
28+
```text
29+
~/.openclaw/openclaw.json
30+
```
31+
32+
### Minimal watch setup
33+
34+
```json5
35+
{
36+
skills: {
37+
load: {
38+
watch: true,
39+
watchDebounceMs: 250,
40+
},
41+
entries: {
42+
opencli: {
43+
enabled: true,
44+
},
45+
},
46+
},
47+
}
48+
```
49+
50+
### Load from extra directories
51+
52+
```json5
53+
{
54+
skills: {
55+
load: {
56+
extraDirs: [
57+
"/Users/you/skill-packs",
58+
],
59+
watch: true,
60+
watchDebounceMs: 250,
61+
},
62+
},
63+
}
64+
```
65+
66+
### What the config means
67+
68+
- `watch: true`: reload skill file changes automatically
69+
- `watchDebounceMs: 250`: avoid reloading too often during rapid edits
70+
- `entries.opencli.enabled: true`: explicitly enable this skill
71+
- `entries.opencli.enabled: false`: disable it without deleting the folder
72+
- `extraDirs`: mount one or more additional skill directories
73+
2474
## Reload Behavior
2575

2676
If OpenClaw has skill watching enabled, skill updates are reloaded automatically. If not, restart the relevant agent session or gateway after installing or updating the skill.
2777

78+
## Recommended Install Patterns
79+
80+
### Shared skill for all agents
81+
82+
Use `~/.openclaw/skills/opencli` when multiple agents should see the same skill.
83+
84+
### Workspace-local skill
85+
86+
Use `./skills/opencli` when the skill should apply only to one project or one agent workspace.
87+
88+
### Central skill pack
89+
90+
Use `skills.load.extraDirs` when you maintain several reusable skills outside the default OpenClaw directories.
91+
2892
## Example Prompts
2993

3094
### Browser-backed sites

0 commit comments

Comments
 (0)