目录提交
dirs-submit
by allinaigc
安装
claude skill add --url https://github.com/openclaw/skills文档
dirs-submit
Use ship to login, submit URLs, preview metadata, check versions, and self-update.
Structure
- Read
references/config.mdwhen you need config shape or token storage details. - Read
references/api.mdwhen you need request endpoints or payload examples. - Read files under
examples/when you need concrete success/error output examples.
Workflow
1. Login — 浏览器授权
提交 URL 需要订阅计划。
ship login
可选指定站点:
ship login --site aidirs.org
ship login --site backlinkdirs.com
流程:
- 选择站点(或通过
--site指定) - 自动打开浏览器进入登录页
- 用户在浏览器完成登录
- CLI 在本地启动 localhost 回调接收 token
- token 写入本地配置
成功输出:
✅ Login successful
2. Token / Config 存储规则
配置文件路径:
~/.config/ship/config.json
结构是按站点分开存:
{
"currentSite": "aidirs.org",
"sites": {
"aidirs.org": {
"token": "xxx",
"baseUrl": "https://aidirs.org"
},
"backlinkdirs.com": {
"token": "yyy",
"baseUrl": "https://backlinkdirs.com"
}
}
}
规则:
- 同一个站点再次登录,会覆盖该站点旧 token
- 不同站点互不覆盖
currentSite指向最后一次登录的站点- 不传
--site时,CLI 默认使用currentSite
3. Submit — 提交 URL
ship submit <url>
示例:
ship submit https://example.com
ship submit https://example.com --site aidirs.org
ship submit https://example.com --site backlinkdirs.com
ship submit https://example.com --json
ship submit https://example.com --quiet
内部调用:
POST /api/submit
Authorization: Bearer <token>
Content-Type: application/json
{ "link": "https://example.com" }
4. Fetch — 预览元数据
ship fetch <url>
示例:
ship fetch https://example.com
ship fetch https://example.com --site aidirs.org
ship fetch https://example.com --json
调用 POST /api/fetch-website,不创建提交记录。
5. Version / Update
ship version
ship version --latest
ship version --json
ship self-update
ship self-update --json
说明:
version --latest会检查 GitHub latest releaseself-update会下载当前平台对应的 release asset 并替换本地可执行文件- Windows 当前不做自动覆盖更新,会提示用户手动下载最新版本
Result Interpretation
Skill 执行 CLI 后,应根据输出向用户自然语言转述:
- 成功提交 / 成功 fetch → 直接告知成功
401→ 告知 token 无效,建议重新运行ship login402或返回upgradeUrl→ 告知用户需要订阅,并附升级链接400→ 直接转述具体错误- 网络超时 / 网络错误 → 告知稍后重试
常见错误
| 状态码/情况 | 含义 | Skill 应告知用户 |
|---|---|---|
| 400 | URL 参数错误、重复站点等 | 直接告知具体错误原因 |
| 401 | Token 无效或未授权 | 提示重新运行 ship login |
| 402 | 需要订阅计划 | 友好提示订阅,并附 upgradeUrl |
| 500 | 服务器错误 | 告知稍后重试 |
| timeout/network | 网络超时或请求失败 | 告知网络问题并建议重试 |
Environment / Config Reference
| 来源 | 键 | 说明 |
|---|---|---|
| 配置文件 | ~/.config/ship/config.json | 本地存储多站点 token |
| 环境变量 | DIRS_TOKEN | Bearer Token(备用) |
| 环境变量 | DIRS_BASE_URL | API Base URL(备用) |
| CLI 参数 | --site | 显式切换站点 |
环境变量仍兼容,但优先推荐使用 ship login 写入配置。
Examples
ship login --site aidirs.org
ship submit https://example.com --site aidirs.org
ship fetch https://example.com --site backlinkdirs.com --json
ship version --latest
ship self-update
相关 Skills
Claude API
by anthropic
Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements). TRIGGER when: code imports `anthropic`/`@anthropic-ai/sdk`; user asks for the Claude API, Anthropic SDK, or Managed Agents; user adds/modifies/tunes a Claude feature (caching, thinking, compaction, tool use, batch, files, citations, memory) or model (Opus/Sonnet/Haiku) in a file; questions about prompt caching / cache hit rate in an Anthropic SDK project. SKIP: file imports `openai`/other-provider SDK, filename like `*-openai.py`/`*-generic.py`, provider-neutral code, general programming/ML.
并行代理
by axelhu
Use when facing 2 or more independent tasks that can be worked on without shared state - dispatches parallel subagents using sessions_spawn for concurrent investigation and execution, adapted for OpenClaw
优酷短剧热点
by codenova58
注册“优酷短剧”技能;用于短剧频道与剧集页信息整理与表现摘要。