ha-find-skills
The ha-find-skills workflow discovers and installs third-party skills from external registries when the active catalog lacks a needed capability. It searches ClawHub, Skillhub, or GitHub in order, validates candidates against licensing and safety criteria, and installs vetted skills to the Hope Agent skills directory after user confirmation. Use it when users request integrations like Slack or Notion, ask explicitly to find skills, or when custom code would replace an existing published skill.
git clone --depth 1 https://github.com/shiwenwen/hope-agent /tmp/ha-find-skills && cp -r /tmp/ha-find-skills/skills/ha-find-skills ~/.claude/skills/ha-find-skillsSKILL.md
# Find Skills
Hope Agent can load skills from multiple sources. When the user needs a capability the active catalog doesn't cover, this workflow finds a candidate on a public registry, confirms with the user, and installs it into `~/.hope-agent/skills/` so it's picked up on next prompt rebuild.
## Before searching — check what's already there
1. Look at the active skill catalog in the current system prompt. Many needs (notes, reminders, weather, TTS, GitHub, Slack, …) may already be covered by a bundled or user-installed skill.
2. If anything plausibly matches, **invoke it instead** — don't reinstall.
3. Only proceed to external search when the gap is real.
## Search — pick the first available source
Registries are checked in order; use the first one whose CLI is installed. If none is installed, fall back to source 3.
### 1. ClawHub (`clawhub` CLI, registry: clawhub.com)
```bash
clawhub --version # detect
clawhub search "<query>" # keyword search
```
Install flow:
```bash
clawhub install <slug> --dir ~/.hope-agent/skills
```
### 2. Skillhub (`skillhub` CLI, Tencent-CDN registry — better for users in China)
```bash
skillhub --version # detect
skillhub search "<query>"
skillhub install <slug> # installs to current workspace ./skills by default
```
After `skillhub install`, if the slug landed under `./skills/<name>/`, move it to `~/.hope-agent/skills/<name>/` so Hope Agent's extra_skills_dir picks it up.
### 3. GitHub code search (fallback, no CLI required)
Use `gh` (already available on most machines) to search public repos for `SKILL.md` files:
```bash
gh api -X GET search/code \
-f q='filename:SKILL.md "<keyword>"' \
--jq '.items[] | {repo: .repository.full_name, path: .path, url: .html_url}' \
| head -20
```
For promising hits, fetch the raw SKILL.md to read the frontmatter (`name`, `description`, `license`) before recommending.
## Quality gate — before recommending
Every candidate must pass:
- **License present and permissive** (MIT / Apache-2.0 / BSD / ISC / CC-BY). If the repo has no LICENSE file, flag it — user decides whether to accept the legal gray area.
- **SKILL.md frontmatter parses cleanly** (`name` + `description` minimum).
- **No obvious red flags** in bundled scripts: `curl … | sh`, network calls to unknown hosts, credential harvesting patterns. Skim scripts before install.
- **Install count / stars** if the registry exposes them (`clawhub search` prints `installs`): prefer >1k installs or >50 stars.
## Install — always confirm with the user first
This is a **HIGH-risk** operation (arbitrary third-party code joins the agent's toolchain). Workflow:
1. Present top 1–3 candidates to the user with: name, one-line description, source URL, license, install count / stars.
2. **Ask explicitly**: "Install `<slug>` from `<source>`? This adds it to `~/.hope-agent/skills/<name>/` and runs on future turns."
3. Only after explicit "yes" / "go ahead":
- Run the registry CLI install, or `git clone` the repo into `~/.hope-agent/skills/<slug>/`.
- If the skill's frontmatter declares `metadata.openclaw.install` or `metadata.hope-agent.install` with `bins:`, those dependencies need separate install (via brew/npm/go/uv) — Hope Agent's Skills panel has an "Install dependency" button, or use `ha-settings` to toggle `allow_remote_install` for HTTP-mode users.
4. Verify install: `ls ~/.hope-agent/skills/<slug>/SKILL.md` — confirm the file exists.
## Post-install
Tell the user:
> Installed `<slug>` into `~/.hope-agent/skills/<slug>/`. It will appear in the skill catalog on the next turn / conversation. Open **Settings → Skills** to review, or disable it if unwanted.
The catalog rebuilds automatically when the cache version bumps (add/remove/toggle triggers a bump). If the user doesn't see the new skill in the next turn, ask them to toggle it in Settings → Skills, which forces a refresh.
## What this skill will NOT do
- It won't install skill dependencies (brew / npm / go binaries) silently — those require explicit user consent via the Skills panel or `ha-settings`.
- It won't touch bundled skills (`skills/` in the app install) — those are vendored and versioned with the release.
- It won't delete installed skills. Use Settings → Skills or tell the user to `rm -rf ~/.hope-agent/skills/<slug>/`.
## Credits
Design inspired by [`vercel-labs/skills#find-skills`](https://github.com/vercel-labs/skills), which popularised the "agent finds its own skills" pattern. ClawHub (MIT, `openclaw/clawhub`) and Skillhub (Tencent-COS installer) are the two registries this workflow speaks to; neither source file has been vendored — the CLI usage documented above is factual interoperation notes.>
Use when the user asks to draft, polish, translate, or reply to an email. Produces a clean draft with subject line, greeting, body, and sign-off, plus a pre-send self-check.
Use when the user mentions 飞书 / Feishu / Lark workspace operations: docx (云文档) read/write, bitable (多维表格) records / views / dashboards, drive (云盘) upload/download, wiki (知识库) link resolution, approval (审批) instance create/cancel/query, calendar (日历) event create/list/update + attendees, contact (联系人) user/department lookup, hire (招聘) job/talent/application listing. Trigger on phrases like 'OKR 周报', '把这份文档发到飞书云盘', '给团队拉个评审会议', '查 [姓名] 的联系方式', '撤销那条审批', '/wiki 链接', or any request that mentions a feishu / lark URL / token (doxcn.../bascn.../wikcn.../boxcn.../om_...).
Hope Agent browser automation — the standard `status → tabs → snapshot → act` loop, stale-ref recovery rules, and what to do when login / 2FA / captcha / camera-prompt / dialog blocks progress. Load this skill whenever you reach for the `browser` tool. Trigger on: user asks the agent to open / control / click / scrape / log into / verify something in a web app ('open X and click Y', '打开 X 然后点击 Y', 'log into my Gmail', 'scrape this page', 'fill out the form on X'); user reports a flow that requires real browser context (cookies, JS-rendered content, OAuth).
Self-service diagnostics — query Hope Agent's local SQLite databases (logs / sessions / async jobs) directly via the `exec` tool to investigate problems, analyze usage, and locate root causes. Trigger on: user reports something broken / failing / slow / stuck / not responding ('X 不工作', 'X 报错', 'X 卡住', '为什么 X 失败', 'why did X fail', 'show me the logs', 'check what happened'); ad-hoc data analysis ('this week's token usage', '最近调用最多的工具', 'how many subagent runs failed', 'tool error rate', 'find sessions where X happened'); verifying a fix ('did the error stop after I changed Y'). Use BEFORE asking the user to paste log snippets — the data is on disk, query it directly. Read-only — SELECT only, never UPDATE/DELETE/INSERT/DROP.
Hope Agent native macOS desktop control — the standard `mac_control` status / diagnostics / apps / dock / spaces / snapshot / visual / windows / menu / clipboard / dialog loop, target-first action rules, no-blind-coordinate policy, and recovery for stale AX/window/menu/dialog state. Load whenever using `mac_control`, or when the user asks to control local Mac apps, Dock, Spaces, click/type/menu/window/dialog/clipboard, automate Finder/TextEdit/System Settings, visually locate UI, or says 控制 Mac, macOS 自动化, 点按钮, 打开应用, Dock, Space, 关闭窗口, 菜单点击, 视觉定位.
Self-understanding and issue reporting for Hope Agent itself. Use when the user asks how Hope Agent works internally, asks about its own source code/docs/runtime behavior, reports a bug/failure/slowness/crash, asks to diagnose logs, or asks to create/submit a GitHub issue for a bug, feature request, or improvement (including when there is no bug). Chinese triggers: 自查, 了解自己, 自我诊断, 排查 Hope Agent, 提交 issue, 需求 issue, 功能改进.
Check for and install Hope Agent updates through conversation. Use whenever the user asks about upgrades, new versions, release notes, or reports a bug that might already be fixed upstream — phrases like 'upgrade Hope Agent', 'update hope agent', 'check for new version', '升级一下', '有新版本吗', '帮我升级', 'is there a newer build', 'check release notes', 'install the latest'. Also use proactively when an `app_update(action=\"check\")` result shows `has_update: true` and the user hasn't been told yet. Covers all three formfactors: desktop GUI bundle (DMG/MSI/AppImage), `hope-agent server` daemon installed via Homebrew/Scoop/AUR/apt/dnf, and headless single-binary deployments. The upgrade is always user-confirmed via `ask_user_question` — never silent.