skillhub-skills-to-doc
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "skillhub-skills-to-doc" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-338c27b115a6d9382fa9f6eef2d063446291489abc5f8a787f464e2100d12647. Verify the upstream source and version against https://skillhub.cn/skills/user_84aa03cf/chenlin-skillhub-skills-to-doc before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
SkillHub skills to DOC: given a SkillHub user profile URL, automatically scrape all skills posted by that user (name / SkillHub rating / description / link) and generate a local .docx document in a uniform template that can be opened by double-clicking. Trigger phrases include “export SkillHub skills”, “make someone’s skills into Word”, “SkillHub profile to DOC”, etc.
Introduction source: third_party · user_84aa03cf · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Software, accounts and paid services
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: skillhub-skills-to-doc
slug: chenlin-skillhub-skills-to-doc
displayName: SkillHub 技能转本地 Word 文档
version: 1.0.0
summary: 给一个 SkillHub 用户主页,自动抓取全部技能(名称/评分/描述/链接)并按模板生成可双击打开的本地 .docx 文档。
license: MIT
description: 给定 SkillHub 用户主页 URL,自动抓取该用户发布的全部技能(名称 / skillhub评分 / 描述 / 链接),按统一模板生成可双击打开的本地 .docx 文档。触发词:导出 skillhub 技能、把某人技能做成 word、skillhub 用户页转 doc、抓取页面上的技能清单、把 skillhub 主页变成文档。
trigger_terms:
- 导出 skillhub 技能
- 把某人技能做成 word
- skillhub 用户页转 doc
- 抓取页面上的技能清单
- 把 skillhub 主页变成文档SkillHub 技能 → 本地 Word 文档
需求本质
用户给一个 SkillHub 用户主页 URL,希望把该页列出的全部技能收集起来,
按固定模板(序号.名称 + skillhub评分 + 描述 + 链接)导出成一个本地 .docx 文件,
不依赖在线文档、不依赖手动复制。
这是一条「给页面 → 抓内容 → 套模板 → 出 doc」的高频重复动作。本 Skill 把它固化, 帮用户养成"一次抓全、离线归档"的习惯,避免每次都手工翻页、逐条复制。
关键事实(实测得到的硬知识,迁移时务必保留)
- API 不在主站:SkillHub 是 SPA,
skillhub.cn的普通页面抓取只能拿到前 10 条。 真实数据 API 在api.skillhub.cn(同源子域)。 - 列表不含量评分:
/api/v1/users/{user_id}/skills?page=N&pageSize=50返回技能列表, 但没有 evaluation / score,需逐技能再请求详情。 - 评分公式:SkillHub 页面显示的评分 = 各评测维度均值的平均(四舍五入 1 位)。 验证过「判断标准制定」维度均值 4.65 → 页面显示 4.7。不要用子项均值(会算成 4.64,错)。
- 描述乱码:少数技能
description是 YAML 块标量标记>-(泄漏的脏数据), 需用详情接口的summary_zh回填。 - 输出格式:本地
.docx,链接做成可点击超链接(python-docx + relationship)。
何时使用
- 用户说「把 xxx 的 SkillHub 技能导出成 word / doc / 文档」
- 用户贴来
https://skillhub.cn/user/...并要求收集上面的内容 - 用户想把某个 SkillHub 用户的所有技能做一份离线清单
执行步骤
步骤 1:定位受管 Python + 确保依赖
本 Skill 的脚本用受管 Python 跑(实测可连 api.skillhub.cn)。docx 生成需要 python-docx,
脚本会自动 pip install(装到当前 python 的用户/venv 环境),无需手动。
PY="$HOME/.workbuddy/binaries/python/versions/3.13.12/python.exe"
SKILL_DIR="$HOME/.workbuddy/skills/skillhub-skills-to-doc"
步骤 2:抓取(fetch_skills.py)
"$PY" "$SKILL_DIR/scripts/fetch_skills.py" "<用户主页URL或user_id>" skills_data.json
- 入参可以是完整 URL(
https://skillhub.cn/user/user_00c9b356)或裸user_id。 - 输出
skills_data.json:列表 + 逐技能 evaluation + 清洗后的 description + 计算好的score。 - 打印总数与有评分数,作为抓取完整性信号。
步骤 3:生成 docx(gen_docx.py)
"$PY" "$SKILL_DIR/scripts/gen_docx.py" skills_data.json 输出文档.docx "标题(可选)"
- 按评分降序排列(无评分的排最后)。
- 每条模板:
N.名称 skillhub评分 X.X→描述:…→ 可点击链接。 - 默认不含「总体评测」(用户明确去掉)。
步骤 4(可选):把描述浓缩成三句话
若用户要求"描述精炼成三句话",用并行子代理对 skills_data.json 的 description 做摘要,
覆盖回 description 字段后再跑步骤 3。摘要 prompt 要点:每技能 3 句中文(功能 / 适用场景 / 核心特点),
句末用 。,不要标题/编号。此步需 AI 判断,脚本不自动做。
验证信号(Loop Engineering · 出口闸门)
宣布"完成"前,必须拿外部信号核对(禁止 AI 自评"看起来对"):
- 技能数 == 超链接数:
docx里<w:hyperlink计数应等于技能总数(zipfile 读word/document.xml校验)。 - 格式正确:首条为
1.名称 skillhub评分 X.X,末条为N.名称。 - 无总体评测:
总体评测在document.xml中出现次数应为 0。 - 可打开:文件存在且
Document(path)能正常加载(无损坏)。
出口闸门两问(任一答不出 → 降级标注风险,不封顶对外):
- 最强反证:什么时候会静默失效?→ 用户 id 提取错、API 改路径、某技能详情 404 导致评分缺失。
- 失效条件:什么变量会让本 Skill 失效?→ SkillHub 把 API 从
api.skillhub.cn迁移、改鉴权、分页字段变更。
故障应对
| 现象 | 处理 |
|---|---|
| 只抓到 10 条 | 确认用的是 api.skillhub.cn 列表 API(非主站 HTML)。本脚本已写死,检查网络/被墙。 |
| 某技能无评分 | 详情接口可能 404/限流;脚本已 try/except 跳过,该技能排到末尾标「暂无评分」。 |
description 显示 >- |
脚本已用 summary_zh 回填;若仍空,标「(无描述)」。 |
| docx 打不开 | 多半是 hyperlink relationship 写错;用验证信号 1 的 zipfile 计数法复检。 |
| python-docx 缺失 | 脚本自动 pip install;若 venv 不可写,手动 python -m pip install python-docx。 |
扩展说明
本 Skill 针对 SkillHub 用户主页这一高频场景固化。若将来要适配别的"给页面→抓清单→出 doc"
场景,核心可复用骨架是:① 找到该站点的真实数据 API(别信 SPA 首屏 HTML)② 评分/字段的
真实计算公式(别自己拍脑袋)③ 本地 docx 超链接生成。换站点时只改 fetch_skills.py 的 API 与
字段映射,gen_docx.py 基本不用动。
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决用户高频重复动作(翻页、复制、归档),具备明确实用价值
- 针对 SkillHub 用户主页这一具体场景,受众较广
Highlights
- 触发词覆盖多种变体,边界清晰
- 描述完整,未截断或错位
Highlights
- Phase/步骤清晰,有出口条件
- 含端到端示例,frontmatter 完整
Highlights
- 工具来源明确,参数正确
- 覆盖主要异常,有验证机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 51, 105
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- skillhub.cn
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Translation pending; see source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.