mirror of
https://github.com/iflytek/skillhub.git
synced 2026-09-11 22:51:04 +00:00
docs(compat): align ClawHub support guidance
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
This commit is contained in:
parent
e43fa82af8
commit
0e16df8163
6 changed files with 26 additions and 22 deletions
|
|
@ -9,13 +9,13 @@ SkillHub provides a ClawHub-compatible API for common read and install flows. Wi
|
|||
|
||||
- 🔍 Search for private skills within your organization
|
||||
- 📥 Download and install skill packages
|
||||
- ⭐ Star and rate skills
|
||||
- ⭐ Star skills
|
||||
|
||||
Current compatibility boundaries:
|
||||
|
||||
- ClawHub CLI `0.23.3` uses `/api/v1/whoami`, which matches the SkillHub compatibility API.
|
||||
- ClawHub publishing depends on upload-ticket endpoints that SkillHub does not implement, so `clawhub publish` and `clawhub sync` are not supported.
|
||||
- ClawHub does not restore a private Registry saved by `login`. Set `CLAWHUB_REGISTRY` in each shell session or pass `--registry` explicitly.
|
||||
- ClawHub CLI `0.23.3` does not reliably prioritize the private Registry saved during `login`; site discovery or the default can select another target. Set `CLAWHUB_REGISTRY` in each shell session or pass `--registry` explicitly.
|
||||
- Canonical slugs use `--` between namespace and skill. If either component itself contains `--`, the coordinate is ambiguous; use the first-party SkillHub CLI with its explicit `--namespace` option.
|
||||
|
||||
## Quick Start
|
||||
|
|
@ -25,7 +25,7 @@ Current compatibility boundaries:
|
|||
Set the SkillHub registry address for the current shell session:
|
||||
|
||||
```bash
|
||||
# ClawHub does not restore this value from its login configuration
|
||||
# Do not depend on the registry resolution order of the login configuration
|
||||
export CLAWHUB_REGISTRY=https://skillhub.your-company.com
|
||||
```
|
||||
|
||||
|
|
@ -138,8 +138,8 @@ SkillHub compatibility layer provides the following endpoints:
|
|||
| `/api/v1/download/{slug}` | GET | Download skill (redirect) | Optional* |
|
||||
| `/api/v1/download` | GET | Download skill (query params) | Optional* |
|
||||
| `/api/v1/skills/{slug}` | GET | Get skill details | Optional |
|
||||
| `/api/v1/skills/{slug}/star` | POST | Star a skill | Required |
|
||||
| `/api/v1/skills/{slug}/unstar` | DELETE | Unstar a skill | Required |
|
||||
| `/api/v1/stars/{slug}` | POST | Star a skill | Required |
|
||||
| `/api/v1/stars/{slug}` | DELETE | Unstar a skill | Required |
|
||||
| `/api/v1/publish` | POST | Legacy compatibility endpoint; not used by ClawHub CLI `0.23.3` | Required |
|
||||
|
||||
Notes:
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ SkillHub 提供 ClawHub 兼容 API,覆盖常用的只读发现和安装流程
|
|||
|
||||
- 🔍 搜索组织内的私有技能
|
||||
- 📥 下载和安装技能包
|
||||
- ⭐ 收藏和评分技能
|
||||
- ⭐ 收藏技能
|
||||
|
||||
当前兼容边界:
|
||||
|
||||
- 已验证的 ClawHub CLI `0.23.3` 使用 `/api/v1/whoami`,与 SkillHub 兼容层一致。
|
||||
- ClawHub CLI 的发布协议依赖 SkillHub 未实现的上传票据接口,因此 `clawhub publish` 和 `clawhub sync` 不属于支持范围。
|
||||
- ClawHub CLI 不读取登录配置中保存的私有 Registry。每个终端会话都应设置 `CLAWHUB_REGISTRY`,或在命令中显式传入 `--registry`。
|
||||
- ClawHub CLI `0.23.3` 不会可靠地优先使用登录时保存的私有 Registry;站点发现或默认地址可能覆盖预期目标。每个终端会话都应设置 `CLAWHUB_REGISTRY`,或在命令中显式传入 `--registry`。
|
||||
- canonical slug 使用 `--` 分隔 namespace 与 skill。坐标任一部分自身包含 `--` 时无法无歧义解析,请改用第一方 SkillHub CLI 的显式 `--namespace` 参数。
|
||||
|
||||
## 快速开始
|
||||
|
|
@ -25,7 +25,7 @@ SkillHub 提供 ClawHub 兼容 API,覆盖常用的只读发现和安装流程
|
|||
为当前终端会话设置 SkillHub 注册中心地址:
|
||||
|
||||
```bash
|
||||
# ClawHub CLI 不会从 login 配置中恢复该地址
|
||||
# 不依赖 login 配置的 Registry 解析顺序
|
||||
export CLAWHUB_REGISTRY=https://skillhub.your-company.com
|
||||
```
|
||||
|
||||
|
|
@ -138,8 +138,8 @@ SkillHub 兼容层提供以下端点:
|
|||
| `/api/v1/download/{slug}` | GET | 下载技能(重定向) | 可选* |
|
||||
| `/api/v1/download` | GET | 下载技能(查询参数) | 可选* |
|
||||
| `/api/v1/skills/{slug}` | GET | 获取技能详情 | 可选 |
|
||||
| `/api/v1/skills/{slug}/star` | POST | 收藏技能 | 必需 |
|
||||
| `/api/v1/skills/{slug}/unstar` | DELETE | 取消收藏 | 必需 |
|
||||
| `/api/v1/stars/{slug}` | POST | 收藏技能 | 必需 |
|
||||
| `/api/v1/stars/{slug}` | DELETE | 取消收藏 | 必需 |
|
||||
| `/api/v1/publish` | POST | 旧版兼容发布端点;ClawHub CLI `0.23.3` 不使用 | 必需 |
|
||||
|
||||
说明:
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ npx clawhub search email
|
|||
# Install a skill package
|
||||
npx clawhub install my-skill
|
||||
|
||||
# Publish a skill package
|
||||
npx clawhub publish ./my-skill
|
||||
# Publish a skill package (the ClawHub CLI publishing protocol is not compatible)
|
||||
SKILLHUB_REGISTRY=http://your-skillhub-host:8080 npx @astron-team/skillhub@latest publish ./my-skill
|
||||
```
|
||||
|
||||
## Q: How do I configure HTTPS?
|
||||
|
|
|
|||
|
|
@ -57,16 +57,18 @@ Ensure skill package conforms to SkillHub specification:
|
|||
2. **Publish via CLI (Recommended)**
|
||||
|
||||
```bash
|
||||
# Configure registry
|
||||
export CLAWHUB_REGISTRY=http://localhost:8080
|
||||
# Configure the SkillHub registry
|
||||
export SKILLHUB_REGISTRY=http://localhost:8080
|
||||
|
||||
# Publish to default namespace
|
||||
npx clawhub publish ./my-skill
|
||||
npx @astron-team/skillhub@latest publish ./my-skill
|
||||
|
||||
# Publish to specific namespace
|
||||
npx clawhub publish ./my-skill --namespace my-team
|
||||
npx @astron-team/skillhub@latest publish ./my-skill --namespace my-team
|
||||
```
|
||||
|
||||
> The ClawHub CLI compatibility surface covers search, inspection, and installation only. Use the SkillHub CLI above for publishing.
|
||||
|
||||
3. **Publish via Web UI**
|
||||
|
||||
Visit `http://localhost:3000/dashboard/publish`, select namespace, upload zip file, choose visibility, and click "Publish".
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ npx clawhub search email
|
|||
# 安装技能包
|
||||
npx clawhub install my-skill
|
||||
|
||||
# 发布技能包
|
||||
npx clawhub publish ./my-skill
|
||||
# 发布技能包(ClawHub CLI 的发布协议不兼容 SkillHub)
|
||||
SKILLHUB_REGISTRY=http://your-skillhub-host:8080 npx @astron-team/skillhub@latest publish ./my-skill
|
||||
```
|
||||
|
||||
## Q: 如何配置 HTTPS?
|
||||
|
|
|
|||
|
|
@ -57,16 +57,18 @@ SkillHub 提供了类似 npm 的发布体验,但增加了企业级的权限控
|
|||
2. **使用 CLI 发布(推荐)**
|
||||
|
||||
```bash
|
||||
# 配置注册中心
|
||||
export CLAWHUB_REGISTRY=http://localhost:8080
|
||||
# 配置 SkillHub 注册中心
|
||||
export SKILLHUB_REGISTRY=http://localhost:8080
|
||||
|
||||
# 发布到默认命名空间
|
||||
npx clawhub publish ./my-skill
|
||||
npx @astron-team/skillhub@latest publish ./my-skill
|
||||
|
||||
# 发布到指定命名空间
|
||||
npx clawhub publish ./my-skill --namespace my-team
|
||||
npx @astron-team/skillhub@latest publish ./my-skill --namespace my-team
|
||||
```
|
||||
|
||||
> ClawHub CLI 仅用于兼容搜索、查看和安装;其发布协议与 SkillHub 不兼容。发布请使用上面的 SkillHub CLI。
|
||||
|
||||
3. **使用 Web UI 发布**
|
||||
|
||||
访问 `http://localhost:3000/dashboard/publish`,选择命名空间、上传 zip 文件、选择可见性后点击「发布」。
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue