Skip to content

Commit aea5898

Browse files
committed
Add OpenClaw usage docs and generalize agent wording
1 parent 6481c00 commit aea5898

4 files changed

Lines changed: 144 additions & 10 deletions

File tree

README.md

Lines changed: 74 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
English | [中文](#中文说明)
44

5-
A Codex skill for working with [OpenCLI](https://github.com/jackwener/opencli): command discovery, browser-login reuse, desktop-app adapters, downloads, troubleshooting, and adapter-generation workflows.
5+
An agent skill for working with [OpenCLI](https://github.com/jackwener/opencli): command discovery, browser-login reuse, desktop-app adapters, downloads, troubleshooting, and adapter-generation workflows.
66

77
Repository: [GloriaGuo/opencli-skill](https://github.com/GloriaGuo/opencli-skill)
88

@@ -16,7 +16,7 @@ OpenCLI is powerful, but it spans several different modes:
1616
- external CLI passthrough
1717
- adapter generation workflows
1818

19-
This skill gives Codex a read-first, agent-safe operating path so it can:
19+
This skill gives AI coding agents a read-first, agent-safe operating path so they can:
2020

2121
- discover the installed OpenCLI surface before guessing
2222
- choose the right adapter for a site or app
@@ -45,10 +45,13 @@ This skill gives Codex a read-first, agent-safe operating path so it can:
4545
- [references/troubleshooting.md](./references/troubleshooting.md): common failures and fixes
4646
- [examples/README.md](./examples/README.md): example prompts and command recipes
4747
- [examples/claude-code.md](./examples/claude-code.md): Claude Code installation and prompt examples
48+
- [examples/openclaw.md](./examples/openclaw.md): OpenClaw installation and usage examples
4849
- [scripts/validate_skill.py](./scripts/validate_skill.py): portable validation script for CI and local checks
4950

5051
## Install
5152

53+
### Codex
54+
5255
Clone or copy the repo into your Codex skills directory:
5356

5457
```bash
@@ -99,6 +102,36 @@ Use $opencli to inspect the local OpenCLI setup and tell me whether the Codex an
99102

100103
Claude Code usage examples are collected in [examples/claude-code.md](./examples/claude-code.md).
101104

105+
## Use In OpenClaw
106+
107+
OpenClaw can load shared skills from `~/.openclaw/skills` or workspace-specific skills from `<workspace>/skills`.
108+
109+
Shared install for all agents:
110+
111+
```bash
112+
git clone git@github.com:GloriaGuo/opencli-skill.git ~/.openclaw/skills/opencli
113+
```
114+
115+
Workspace-specific install:
116+
117+
```bash
118+
git clone git@github.com:GloriaGuo/opencli-skill.git ./skills/opencli
119+
```
120+
121+
If skill watching is enabled in OpenClaw, updates are auto-reloaded. Otherwise restart the agent session or gateway after installing.
122+
123+
Example prompts:
124+
125+
```text
126+
Use $opencli to inspect the installed OpenCLI surface and run a read-first workflow for Bilibili.
127+
```
128+
129+
```text
130+
Use $opencli to diagnose why my browser-backed OpenCLI command is returning empty data.
131+
```
132+
133+
OpenClaw-specific notes and examples are collected in [examples/openclaw.md](./examples/openclaw.md).
134+
102135
## Recommended OpenCLI Setup
103136

104137
```bash
@@ -160,7 +193,7 @@ python3 scripts/validate_skill.py
160193

161194
## 中文说明
162195

163-
这是一个给 Codex 用的 `OpenCLI` skill,目标不是重复官方 README,而是让 agent 更稳定地完成真实任务:
196+
这是一个面向多种 AI agent 环境的 `OpenCLI` skill,目标不是重复官方 README,而是让 agent 更稳定地完成真实任务:
164197

165198
- 先发现本机已安装的命令面
166199
- 再选择站点 / 桌面应用 / CLI passthrough / adapter generation 路径
@@ -169,11 +202,11 @@ python3 scripts/validate_skill.py
169202

170203
## 这个 skill 解决什么问题
171204

172-
-Codex 判断什么时候该用 OpenCLI,而不是 browser agent 或 Playwright
173-
-Codex 在动手前先跑 `opencli list -f yaml`
174-
-Codex 对 B 站、知乎、小红书、微信公众号、Boss、Cursor、Codex 等场景选对命令
175-
-Codex 在安装版本和 README 不一致时,以本机实际命令面为准
176-
-Codex 在写操作前先做读操作,降低误操作风险
205+
-agent 判断什么时候该用 OpenCLI,而不是 browser agent 或 Playwright
206+
-agent 在动手前先跑 `opencli list -f yaml`
207+
-agent 对 B 站、知乎、小红书、微信公众号、Boss、Cursor、Codex 等场景选对命令
208+
-agent 在安装版本和 README 不一致时,以本机实际命令面为准
209+
-agent 在写操作前先做读操作,降低误操作风险
177210

178211
## 仓库内容
179212

@@ -186,10 +219,13 @@ python3 scripts/validate_skill.py
186219
- [references/troubleshooting.md](./references/troubleshooting.md):常见故障排查
187220
- [examples/README.md](./examples/README.md):可直接照抄的 prompt 和命令示例
188221
- [examples/claude-code.md](./examples/claude-code.md):Claude Code 安装与调用示例
222+
- [examples/openclaw.md](./examples/openclaw.md):OpenClaw 安装与调用示例
189223
- [scripts/validate_skill.py](./scripts/validate_skill.py):本地与 CI 通用的校验脚本
190224

191225
## 安装方式
192226

227+
### Codex
228+
193229
```bash
194230
git clone git@github.com:GloriaGuo/opencli-skill.git "${CODEX_HOME:-$HOME/.codex}/skills/opencli"
195231
```
@@ -238,6 +274,36 @@ Use $opencli to inspect the local OpenCLI setup and tell me whether the Codex an
238274

239275
更完整的 Claude Code 示例见 [examples/claude-code.md](./examples/claude-code.md)
240276

277+
## 在 OpenClaw 里怎么用
278+
279+
OpenClaw 可以从 `~/.openclaw/skills` 读取共享 skill,也可以从当前 workspace 的 `./skills` 读取工作区级 skill。
280+
281+
给所有 agent 共用的安装方式:
282+
283+
```bash
284+
git clone git@github.com:GloriaGuo/opencli-skill.git ~/.openclaw/skills/opencli
285+
```
286+
287+
只给当前 workspace 使用:
288+
289+
```bash
290+
git clone git@github.com:GloriaGuo/opencli-skill.git ./skills/opencli
291+
```
292+
293+
如果 OpenClaw 开启了 skills watch,修改后会自动刷新;否则安装后重启对应 agent 会话或 gateway。
294+
295+
OpenClaw 里可以这样触发:
296+
297+
```text
298+
Use $opencli to inspect the installed OpenCLI surface and run a read-first workflow for Bilibili.
299+
```
300+
301+
```text
302+
Use $opencli to diagnose why my browser-backed OpenCLI command is returning empty data.
303+
```
304+
305+
更完整的 OpenClaw 示例见 [examples/openclaw.md](./examples/openclaw.md)
306+
241307
## 推荐的 OpenCLI 环境准备
242308

243309
```bash

SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: opencli
3-
description: Use when Codex needs to install, inspect, troubleshoot, or operate a local OpenCLI setup, or when a task involves websites, Electron desktop apps, browser-login reuse, downloads, plugins, external CLI passthrough, or adapter generation through OpenCLI.
3+
description: Use when an AI agent needs to install, inspect, troubleshoot, or operate a local OpenCLI setup, or when a task involves websites, Electron desktop apps, browser-login reuse, downloads, plugins, external CLI passthrough, or adapter generation through OpenCLI.
44
---
55

66
# OpenCLI

examples/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Examples
22

3-
This folder contains practical prompts and command recipes you can copy into Codex or run directly.
3+
This folder contains practical prompts and command recipes you can copy into Codex, Claude Code, OpenClaw, or run directly.
44

55
- [agent-prompts.md](./agent-prompts.md): user-style prompts that should trigger the skill
66
- [claude-code.md](./claude-code.md): Claude Code installation and invocation examples
77
- [command-recipes.md](./command-recipes.md): reusable command recipes grouped by workflow
8+
- [openclaw.md](./openclaw.md): OpenClaw installation and invocation examples

examples/openclaw.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# OpenClaw Usage
2+
3+
This document shows how to install and use the OpenCLI skill in OpenClaw.
4+
5+
## Install Locations
6+
7+
OpenClaw supports multiple skill locations:
8+
9+
- shared skills: `~/.openclaw/skills`
10+
- workspace-specific skills: `<workspace>/skills`
11+
12+
Shared install:
13+
14+
```bash
15+
git clone git@github.com:GloriaGuo/opencli-skill.git ~/.openclaw/skills/opencli
16+
```
17+
18+
Workspace install:
19+
20+
```bash
21+
git clone git@github.com:GloriaGuo/opencli-skill.git ./skills/opencli
22+
```
23+
24+
## Reload Behavior
25+
26+
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.
27+
28+
## Example Prompts
29+
30+
### Browser-backed sites
31+
32+
```text
33+
Use $opencli to inspect the installed OpenCLI surface and fetch the top 10 Bilibili hot videos as JSON.
34+
```
35+
36+
```text
37+
Use $opencli to search Zhihu for "Android 性能优化" and summarize the top results.
38+
```
39+
40+
### Desktop adapters
41+
42+
```text
43+
Use $opencli to inspect the local OpenCLI setup and tell me whether the Codex and Cursor adapters are available.
44+
```
45+
46+
```text
47+
Use $opencli to read the current Cursor conversation and summarize the latest work.
48+
```
49+
50+
### Troubleshooting
51+
52+
```text
53+
Use $opencli to diagnose why my browser-backed OpenCLI command is returning empty data.
54+
```
55+
56+
```text
57+
Use $opencli to compare the installed OpenCLI command surface with the README and tell me what is actually available.
58+
```
59+
60+
## Recommended Pattern
61+
62+
Inside OpenClaw, the safest default remains:
63+
64+
1. mention `$opencli`
65+
2. ask for discovery first
66+
3. prefer read-first behavior
67+
4. request `json` if another tool or agent will consume the output

0 commit comments

Comments
 (0)