← 返回 Skills 市场
1044197988

ht-skills

作者 天山老霸王 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
181
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install ht-skills
功能描述
管理灏天文库文集和文档,支持新建文集、新建文档、查询文集/文档、更新文档、修改文档归属、管理文档层级、查询个人花园限制与用量;支持图片上传到 COS、图片分组、查询图片列表/详情与图片额度。适用于 OpenClaw 自主写文章并上传、文集创建、文档入库、文档移动、插图上传与外链等场景。
使用说明 (SKILL.md)

\r \r

ht-skills 灏天文库管理(客户端)\r

\r 通过服务端 API 调用,需配置 config.json 中的token(个人 API Token)。\r \r ---\r \r

客户端注意事项(必须遵守)\r

\r

  • 查询文集列表:无 --limit--offset。\r
  • 查询文档列表:必须带 --collection-id(文集 ID);若没有文集 ID,需先 list_collections.py --name "文集名称" 查询,或向用户询问目标文集名称。\r
  • 查询文档列表:无 --limit--offset。\r
  • 更新文档author 字段不可更新,只能更新 name、content、sort、parent。\r
  • 修改文档归属:需有目标文集权限;文档属于多个文集时需指定 --from-collection-id。\r
  • 图片上传:需本地可读图片路径;大文件上传耗时较长。上传成功后响应中的 file_url 可直接用于正文插图。\r
  • 图片分组:使用 --group-id 前可用 list_image_groups.py 查询分组 ID;分组必须属于当前用户。\r \r ---\r \r

智能体执行规范(必须遵守)\r

\r

规范一:修改特定文档\r

\r

  1. 先查询:使用 list_documents.py --collection-id \x3C文集ID> --name "关键词"get_document.py --id \x3CID> 定位要修改的文档,确认文档 ID。\r
  2. 再修改:使用 update_document.py --id \x3CID> 修改标题、正文。\r \r

规范二:添加特定文档\r

\r

  1. 文集必填:用户必须提供目标文集。若用户未提供或只说「随便加」「你决定」等,必须主动询问:「请告知要将文档添加到的文集名称」。\r
  2. 查询文集 ID:用户给出文集名称后,用 list_collections.py --name "文集名称" 查询文集 ID;若不存在则询问是否新建。\r
  3. 添加文档:使用 add_document.py --collection-id \x3CID> --name "标题" [--content 内容] [--content-file 文件路径]。\r \r

规范三:添加文集\r

\r

  1. 用户确认:新建文集前必须让用户确认要创建的文集名称,例如:「将创建文集「xxx」,请确认名称是否正确?」。\r
  2. 确认后再执行:用户确认后再执行 create_collection.py --name "文集名称"。若使用 --get-if-exists 则同名已存在时直接返回已有 ID,不重复创建。\r \r

规范四:修改文档归属\r

\r

  1. 先定位文档:用 list_documents.py --collection-id \x3C文集ID> --name "关键词"get_document.py --id \x3CID> 确认文档 ID。\r
  2. 确认目标文集:用户需提供目标文集名称或 ID;若无则 list_collections.py --name "关键词" 查询。\r
  3. 执行移动:使用 move_document.py --id \x3C文档ID> --collection-id \x3C目标文集ID>;文档属于多个文集时需加 --from-collection-id \x3C原文集ID>。\r \r

规范五:上传图片并用于文档\r

\r

  1. 可选分组:若用户要归类图片,先 list_image_groups.pycreate_image_group.py --name "分组名" 取得 group_id。\r
  2. 检查额度(可选):get_image_limits_usage.py 确认 can_upload。\r
  3. 上传upload_image.py --file "路径" [--remark "说明"] [--group-id N]。\r
  4. 使用链接:从返回 JSON 的 data.file_url(或 data.file_path 自行拼域名)插入文档 Markdown/HTML;勿猜测 URL。\r \r ---\r \r

前置条件\r

\r

  1. config.json:在 client 目录配置 config.json,填写token。\r
  2. 环境变量(可选):HT_SKILL_SERVER_URLHT_SKILL_TOKEN 优先级高于 config.json。\r
  3. 依赖pip install requests\r \r

脚本目录\r

\r 所有脚本位于 scripts/,在 client 根目录执行。\r \r

功能一:新建文集(支持有则用、无则建)\r

\r

python scripts/create_collection.py --name "文集名称" [--description "50字内简介"] [--brief "500字以上详细介绍"]\r
python scripts/create_collection.py --name "文集名称" --get-if-exists\r
```\r
\r
## 功能二:新建文档到指定文集\r
\r
```bash\r
python scripts/add_document.py --collection-id 123 --name "文档标题" [--content "正文"] [--content-file 路径] [--parent 0]\r
```\r
\r
## 功能三:查询文集列表\r
\r
```bash\r
python scripts/list_collections.py [--name "关键词"]\r
```\r
\r
## 功能四:查询文集详情\r
\r
```bash\r
python scripts/get_collection.py --id 123 [--include-docs]\r
```\r
\r
## 功能五:查询文档列表\r
\r
```bash\r
python scripts/list_documents.py --collection-id 123 [--name "关键词"]\r
# collection-id 必填。若无文集 ID,需先 list_collections 查询或向用户询问\r
```\r
\r
## 功能六:查询文档详情\r
\r
```bash\r
python scripts/get_document.py --id 456\r
```\r
\r
## 功能七:更新文档(修订已发文章)\r
\r
```bash\r
python scripts/update_document.py --id 456 --name "新标题"\r
python scripts/update_document.py --id 456 --content "新正文"\r
python scripts/update_document.py --id 456 --content-file 文件路径\r
python scripts/update_document.py --id 456 --sort 50\r
python scripts/update_document.py --id 456 --parent 0\r
```\r
\r
## 功能八:修改文档归属(移动到目标文集)\r
\r
```bash\r
# 将文档移动到目标文集\r
python scripts/move_document.py --id 456 --collection-id 789\r
\r
# 文档属于多个文集时,需指定原文集 ID\r
python scripts/move_document.py --id 456 --collection-id 789 --from-collection-id 123\r
```\r
\r
- `--id`:文档 ID(必填)\r
- `--collection-id`:目标文集 ID(必填)\r
- `--from-collection-id`:原文集 ID;文档只属于一个文集可不填,属于多个文集则必填\r
\r
## 功能九:设置文档父级(文集内层级)\r
\r
```bash\r
python scripts/set_document_parent.py --collection-id 123 --document-id 456 --parent 0 [--sort 1]\r
```\r
\r
- `parent=0` 表示根文档;同级别 `sort` 越小越靠前\r
\r
## 功能十:查询当前用户个人花园限制与用量\r
\r
```bash\r
python scripts/get_garden_limits_usage.py\r
```\r
\r
- 无参数,返回当前用户的花园限制与占用情况\r
- 占用字段使用更直观的 `已用/上限` 结构(如 `3/10`、`18/100`)\r
\r
## 功能十一:图片分组\r
\r
```bash\r
python scripts/create_image_group.py --name "分组名称"\r
python scripts/list_image_groups.py [--limit 100] [--offset 0]\r
python scripts/update_image_group.py --id \x3C分组ID> --name "新名称"\r
```\r
\r
## 功能十二:图片上传与查询\r
\r
```bash\r
python scripts/get_image_limits_usage.py\r
python scripts/upload_image.py --file "图片路径" [--remark "备注"] [--group-id N]\r
python scripts/list_images.py [--group-id N] [--name "文件名关键词"] [--limit 50] [--offset 0]\r
python scripts/get_image.py --id \x3C图片ID>\r
```\r
\r
- 上传成功后的 `data.file_url` 为可访问地址(依赖服务端 `cos.public_base_url` 或 `cos.domain` 配置)\r
- `list_images.py` 的 `--name` 对应服务端查询参数 `file_name`(文件名模糊匹配)\r
安全使用建议
This package is a straightforward Python client that sends a user-provided API token and any user-selected files to the configured server (default in README/config: zzht.tech / aiknowledge.cn ecosystem). Before installing: 1) verify the server URL you will use (HT_SKILL_SERVER_URL or config.json) is the official service you trust (README mentions https://zzht.tech and aiknowledge.cn); 2) only provide an API token that you intend to grant remote content-management access to; avoid using broader credentials; 3) be aware the agent can run bash to invoke scripts and will read/upload any local files you or the agent specify (so do not allow it to choose arbitrary file paths); 4) correct the small metadata inconsistency (registry shows no required env vars while SKILL.md documents HT_SKILL_SERVER_URL and HT_SKILL_TOKEN) or confirm with the publisher. If you want stronger guarantees, run the scripts locally after inspecting config.json and confirm the server endpoints and TLS settings before using your token.
功能分析
Type: OpenClaw Skill Name: ht-skills Version: 1.0.1 The skill bundle is a legitimate API client for the '灏天文库' (HT-Skills) document and image management platform. It provides a suite of scripts in the `scripts/` directory to perform CRUD operations on document collections and upload images to a remote server (zzht.tech). The code in `lib/api_client.py` safely handles authentication via tokens and environment variables, and the `SKILL.md` instructions for the AI agent emphasize operational safety, such as requiring user confirmation before creating or modifying data. No evidence of malicious intent, data exfiltration, or prompt injection was found.
能力评估
Purpose & Capability
Name/description match the included Python client scripts and README: all scripts call a remote service API to create/list/update collections, documents, and images. The only credential used is an API token for the service, which is consistent with the stated purpose. (Minor metadata mismatch: SKILL.md lists HT_SKILL_SERVER_URL / HT_SKILL_TOKEN as environment variables but the registry 'Required env vars' section shows none.)
Instruction Scope
Runtime instructions are explicit: configure config.json or HT_SKILL_* env vars and run individual scripts. Scripts only read config.json and any local file paths explicitly provided (e.g., --content-file or --file for image upload) and then POST contents to the configured server. This is expected behavior, but be aware the agent (allowed-tools: [bash]) will run shell commands to execute these scripts and so can read and upload any local file path it is told to use.
Install Mechanism
There is no install spec or external download; the package is an instruction-only Python client with scripts and requires only the requests package (requirements.txt). No third-party downloads or archive extraction are performed by the skill.
Credentials
The skill needs one API token (HT_SKILL_TOKEN or token in config.json) and an optional server URL. That is proportionate to its purpose. The registry metadata omission of required env vars (while SKILL.md documents them) is inconsistent and worth correcting before trusting automated installs.
Persistence & Privilege
always:false and no special persistent privileges are requested. The skill does not modify other skills or system-wide config; autonomous invocation is enabled (disable-model-invocation:false) which is the platform default and not on its own a red flag.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ht-skills
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ht-skills 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
本次更新大幅扩展了客户端的功能边界,从单纯的文档管理升级为包含多媒体资源(图片)管理的综合知识库工具,并增强了对个人账号用量的监控能力。 🎉 新增功能 1. 图片管理模块 新增对图片资源的完整 CRUD 支持,可直接通过 Python 脚本管理云端图片: 上传:支持将本地图片上传至对象存储(COS),返回公开外链。 分组:支持创建、修改、查询图片分组,便于图片分类管理。 查询:支持按文件名关键词、分组 ID 筛选图片列表,以及获取单张图片详情。 额度:提供个人图片上传配额查询接口。 2. 空间用量监控 新增个人花园限制查询功能,可实时查看当前账号的资源使用状况: 文集数量上限与当前数量。 单文集文档数上限与占用情况。 单文档字数限制。 是否允许新建文集的判定状态。 🚀 脚本变更 以下新脚本已加入 scripts/ 目录并同步至 API 网关: 脚本名称 功能描述 对应 API get_garden_limits_usage.py 查询个人花园限制与用量 GET /api/garden/limits-usage create_image_group.py 创建图片分组 POST /api/image-groups list_image_groups.py 查询图片分组列表 GET /api/image-groups update_image_group.py 修改图片分组名称 PATCH /api/image-groups/{id} get_image_limits_usage.py 查询图片上传额度与占用 GET /api/images/limits-usage upload_image.py 上传图片 POST /api/images/upload list_images.py 查询当前用户图片列表 GET /api/images get_image.py 查询图片详情 GET /api/images/{id} 📖 文档更新 配置说明:保持不变,继续支持 config.json 或环境变量 (HT_SKILL_TOKEN) 方式。 参数详解:为所有新增的图片及花园限制脚本补充了详细的命令行参数说明表。 使用示例:在“使用示例”章节中增加了图片上传、分组管理及限额查询的实操代码片段。
v1.0.0
ht-skills 1.0.0 - 初始版本发布 - 支持灏天文库文集和文档的增删查改,包括文集新建、文档新建、查询、更新、文档归属和层级管理。 - 明确客户端与 API 配置、必填参数和操作步骤,内含详细操作与执行规范说明。 - 提供所有核心操作的命令行示例,便于使用和集成。 - 加强交互规范,确保文集与文档的操作前置确认和必要信息获取。
元数据
Slug ht-skills
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

ht-skills 是什么?

管理灏天文库文集和文档,支持新建文集、新建文档、查询文集/文档、更新文档、修改文档归属、管理文档层级、查询个人花园限制与用量;支持图片上传到 COS、图片分组、查询图片列表/详情与图片额度。适用于 OpenClaw 自主写文章并上传、文集创建、文档入库、文档移动、插图上传与外链等场景。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 181 次。

如何安装 ht-skills?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ht-skills」即可一键安装,无需额外配置。

ht-skills 是免费的吗?

是的,ht-skills 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ht-skills 支持哪些平台?

ht-skills 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ht-skills?

由 天山老霸王(@1044197988)开发并维护,当前版本 v1.0.1。

💬 留言讨论