hm Fetch 技能
- 作者仓库星标 47
- 作者仓库 MateBot
HM Fetch Skill
Fetch HarmonyOS docs through API first, then fallback to generic fetch.
API-First Rule
Use API route first for正文:
- Endpoint:
https://svc-drcn.developer.huawei.com/community/servlet/consumer/cn/documentPortal/getDocumentById - Request body:
{"objectId":"<slug>","language":"cn"} - Important:
objectIdis the document slug, notdocId.
Scripts
- Single page by slug:
python3 scripts/fetch_huawei_doc_api.py --slug typescript-to-arkts-migration-guide --out /tmp/doc.md
- Preset migration pages:
python3 scripts/fetch_huawei_doc_api.py --preset migration --out-dir references/huawei-migration
- One-shot refresh (API first, fallback to fetch-skill):
bash scripts/fetch_huawei_migration_refs.sh
Local-First Workflow
- Refresh local cache by
bash scripts/fetch_huawei_migration_refs.sh. - Answer questions from
references/huawei-migration/*.md. - Only if local cache is insufficient, refetch specific slug by API script.
Outputs
references/huawei-migration/01-arkts-migration-background.mdreferences/huawei-migration/02-typescript-to-arkts-migration-guide.mdreferences/huawei-migration/03-arkts-more-cases.md
- 流狐分类
- 文档
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @aresbit · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 检测到的网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Use API route first for正文: Endpoint: https://svc-drcn.developer.huawei.com/community/servlet/consumer/cn/documentPortal/getDocumentById Request body: {"objectId":"<slug>","language":"cn"}
Single page by slug: python3 scripts/fetchhuaweidocapi.py --slug typescript-to-arkts-migration-guide --out /tmp/doc.md Preset migration pages:
Refresh local cache by bash scripts/fetchhuaweimigrationrefs.sh. Answer questions from references/huawei-migration/.md. Only if local cache is insufficient, refetch specific slug by API script.
references/huawei-migration/01-arkts-migration-background.md references/huawei-migration/02-typescript-to-arkts-migration-guide.md references/huawei-migration/03-arkts-more-cases.md
# HM Fetch Skill
Fetch HarmonyOS docs through API first, then fallback to generic fetch.
## API-First Rule
Use API route first for正文:
- Endpoint: `https://svc-drcn.developer.huawei.com/community/servlet/consumer/cn/documentPortal/getDocumentById`
- Request body: `{"objectId":"<slug>","language":"cn"}`
- Important: `objectId` is the document slug, not `docId`.
## Scripts
- Single page by slug:
- `python3 scripts/fetch_huawei_doc_api.py --slug typescript-to-arkts-migration-guide --out /tmp/doc.md`
- Preset migration pages:
- `python3 scripts/fetch_huawei_doc_api.py --preset migration --out-dir references/huawei-migration`
- One-shot refresh (API first, fallback to fetch-skill):
- `bash scripts/fetch_huawei_migration_refs.sh`
## Local-First Workflow
1. Refresh local cache by `bash scripts/fetch_huawei_migration_refs.sh`.
2. Answer questions from `references/huawei-migration/*.md`.
3. Only if local cache is insufficient, refetch specific slug by API script.
## Outputs
- `references/huawei-migration/01-arkts-migration-background.md`
- `references/huawei-migration/02-typescript-to-arkts-migration-guide.md`
- `references/huawei-migration/03-arkts-more-cases.md` 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> API-First Rule → Scripts → Local-First Workflow → Outputs
要点 -> Fetch HarmonyOS docs through API first, then fallback to generic fetch. · 1. Refresh local cache by bash scripts/fetchhuaweimigrationrefs.sh.
文件/命令 -> {"objectId":"<slug>","language":"cn"} · objectId · docId · python3 scripts/fetchhuaweidocapi.py --preset migration --out-dir references/huawei-migration · bash scripts/fetchhuaweimigrationrefs.sh · references/huawei-migration/.md · references/huawei-migration/01-arkts-migration-background.md · references/huawei-migration/02-typescript-to-arkts-migration-guide.md
内容 SHA-256 -> 851ecdf441bb
方法与流程
适用与边界
原文中的明确线索
{"objectId":"<slug>","language":"cn"}、objectId、docId、python3 scripts/fetchhuaweidocapi.py --preset migration --out-dir references/huawei-migration、bash scripts/fetchhuaweimigrationrefs.sh、references/huawei-migration/.md、references/huawei-migration/01-arkts-migration-background.md、references/huawei-migration/02-typescript-to-arkts-migration-guide.md