← Back to Skills Marketplace
hitjcl

知识库管理

cross-platform ⚠ suspicious
0
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install v2-1-0
Description
发个链接就完事。微信/视频号/抖音/小红书/公众号的内容,丢过来自动识别、下载、上传腾讯文档,智能表格一键归档。 视频直传在线播放,文章自动转存。视频号用自研 sph-download,抖音/小红书用 yt-dlp,公众号用 web_fetch。 支持 mp4/pdf/pptx/docx/jpg/png/文章。你...
README (SKILL.md)

\r \r

进击的知识库\r

\r

🦅 发个链接就完事 — 微信/视频号/抖音/小红书/公众号 → 自动下载上传 → 腾讯文档归档\r \r

核心能力\r

\r 接收链接 → 自动识别来源 → 下载/解析 → 上传腾讯文档 → 写 0 号索引。\r \r 下载方案:视频号用 sph-download(自研解析方案),抖音/小红书用 yt-dlp,公众号用 web_fetch。\r \r | 来源 | 下载方式 | 是否上传视频 |\r |------|----------|-------------|\r | 视频号 | parsers/sph.py(自研 sph-download) | ✅ 上传 |\r | 抖音 | yt-dlp(parsers/douyin.py) | ✅ 上传 |\r | 小红书 | yt-dlp(parsers/xiaohongshu.py) | ✅ 上传 |\r | 公众号 | web_fetch 抓取 | ✅ 上传为 markdown |\r \r

配置\r

\r 打开 agent.py,当前已配置好:\r \r

TENCENT_SPACE_ID = "DS2RjWGhWZ1VyaWt"\r
INDEX_FILE_ID    = "ctEJCDugfswG"\r
INDEX_SHEET_ID   = "t00i2h"\r
```\r
\r
**获取 ID 的方法**(如果是新空间):\r
1. 打开 [docs.qq.com](https://docs.qq.com),进入知识库空间,URL 中 `space/` 后面的就是 `space_id`\r
2. 在空间中新建智能表格 `0号索引`,URL 中拿到 `file_id`\r
3. 打开智能表格,地址栏 `tab=` 后面就是 `sheet_id`\r
\r
## 0 号索引字段\r
\r
| 列名 | 类型 | 字段 ID(固定) |\r
|------|------|----------------|\r
| 文件名字 | 文本 | fkfKit |\r
| 文档大小 | 数字(KB) | f2cnP7 |\r
| 入库时间 | 日期时间 | fHSMJO |\r
| 格式 | 单选 | fOVcRT |\r
| 来源类型 | 单选 | fPoljj |\r
| 来源 | 文本 | f6drfQ |\r
| 是否外链 | 复选 | fcP5do |\r
| 腾讯文档链接 | URL | fBW04a |\r
| 等级 | 单选 | fWqSI6 |\r
\r
## 工作流程\r
\r
### 步骤总览\r
\r
```\r
链接/文件 → 识别来源 → 下载到本地 → upload_to_docs.py → 腾讯文档 + 0号索引\r
```\r
\r
### 各来源处理\r
\r
#### 视频号\r
\r
```\r
1. 下载(自研 sph-download 方案):\r
   python parsers/sph.py \x3C视频号链接> --output-dir \x3C临时目录>\r
   → 返回 JSON {title, author, video, size_bytes}\r
\r
2. 上传+索引:\r
   python upload_to_docs.py \x3Cvideo_path> \\r
     --name "\x3Ctitle>" --format mp4 --source-type 视频号 \\r
     --source-url "\x3C原始链接>" --author "\x3Cauthor>" --level 一般\r
```\r
\r
#### 抖音\r
\r
```\r
1. 下载:\r
   python parsers/douyin.py \x3C链接> --output-dir \x3C临时目录>\r
   → 返回 JSON {title, author, video, size_bytes}\r
\r
2. 上传+索引:\r
   python upload_to_docs.py \x3Cvideo_path> \\r
     --name "\x3Ctitle>" --format mp4 --source-type 抖音 \\r
     --source-url "\x3C原始链接>" --author "\x3Cauthor>" --level 一般\r
```\r
\r
#### 小红书\r
\r
```\r
1. 下载(yt-dlp 方案,与抖音完全一致):\r
   python parsers/xiaohongshu.py \x3C链接> --output-dir \x3C临时目录>\r
   → 返回 JSON {title, author, file, size_bytes, type}\r
\r
2. 上传+索引:\r
   python upload_to_docs.py \x3Cfile_path> \\r
     --name "\x3Ctitle>" --format \x3Ctype> --source-type 小红书 \\r
     --source-url "\x3C原始链接>" --author "\x3Cauthor>" --level 一般\r
```\r
\r
#### 微信公众号\r
\r
```\r
1. web_fetch 抓取文章内容,转 markdown\r
2. 创建腾讯文档(smartcanvas 或 markdown)\r
3. 上传+索引:\r
   python upload_to_docs.py \x3Cmarkdown_file> \\r
     --name "\x3C标题>" --format 文章 --source-type 微信公众号 \\r
     --source-url "\x3C原始链接>" --author "\x3C公众号名>" --level 一般\r
```\r
\r
#### 本地文件(pdf/pptx/docx/jpg/png)\r
\r
```\r
python upload_to_docs.py \x3C文件路径> \\r
  --name "\x3C文件名>" --format \x3C格式> --source-type 本地上传 \\r
  --level 一般\r
```\r
\r
### upload_to_docs.py 自动完成\r
\r
该脚本自动执行:\r
1. `manage.pre_import` — 获取 COS 上传凭证\r
2. `curl PUT` — 上传到 COS\r
3. `manage.async_import` — 触发导入\r
4. `manage.import_progress` — 轮询直到完成\r
5. `add_to_sheet.py` — 写入 0 号索引\r
\r
```bash\r
python upload_to_docs.py \x3C文件路径> \\r
  --name "标题" \\r
  --format "mp4|pdf|pptx|docx|jpg|png|文章" \\r
  --source-type "视频号|抖音|小红书|微信公众号|本地上传" \\r
  --source-url "原始链接" \\r
  --author "作者名" \\r
  --level "机密|高|一般|普通"\r
```\r
\r
`--level` 不传默认为 `一般`,`--is-external` 不传默认为 `False`。\r
\r
## 文件结构\r
\r
```\r
knowledge-base/\r
├── SKILL.md              # 本文件\r
├── README.md              # 使用说明\r
├── CHANGELOG.md           # 版本历史\r
├── DESIGN.md              # 架构设计\r
├── agent.py               # CLI 辅助\r
├── add_to_sheet.py        # 智能表格记录添加\r
├── upload_to_docs.py      # 一键上传(pre_import→COS→import→索引)\r
└── parsers/\r
    ├── sph.py             # 视频号下载(自研 sph-download)\r
    ├── douyin.py           # 抖音下载(yt-dlp)\r
    ├── xiaohongshu.py      # 小红书下载(yt-dlp)\r
    └── wechat_article.py   # 公众号文章解析\r
```\r
\r
## 注意事项\r
\r
- 视频文件大小限制:腾讯文档单文件 \x3C 100MB\r
- 小红书 yt-dlp 依赖:需要 yt-dlp + cookies(如需要登录态)\r
- 公众号文章过长时可能触发 CreateProcess 命令行限制,使用 `upload_to_docs.py` 可绕过\r
- 索引记录的"入库时间"字段暂不支持 API 设置,需在腾讯文档 UI 上配置自动填入\r
\r
## 常见问题\r
\r
**Q:视频上传腾讯文档后能播放吗?**\r
A:能。腾讯文档支持 mp4 在线播放。\r
\r
**Q:小红书下载失败?**\r
A:确认 yt-dlp 已更新到最新版:`yt-dlp -U`。个别小红书链接可能需要浏览器 cookies。\r
\r
**Q:怎么确认上传成功了?**\r
A:查看 0 号索引智能表格,新记录出现即表示成功。也可以直接打开腾讯文档链接确认。\r
Usage Guidance
Install only if you intentionally want links/files downloaded and archived into Tencent Docs. Before using it, change or verify the Tencent Docs space/sheet IDs, confirm each upload destination, avoid private links or sensitive local files unless appropriate, do not provide browser cookies casually, and prefer the safer argument-list scripts over agent.py until the shell=True command construction is fixed.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The stated purpose matches the main artifacts: receive links or files, download or parse content, upload it to Tencent Docs/COS, and add an index record. That workflow is disclosed, but it is high-impact because it can archive private or copyrighted material.
Instruction Scope
The trigger phrases are broad and the artifacts emphasize automatic handling without a clear confirmation step before download, upload, and indexing. agent.py also uses shell=True with user-influenced URLs and file names, which is not proportionate for this purpose.
Install Mechanism
No hidden installer or background service was found. Dependencies such as yt-dlp, mcporter, curl, and Tencent Docs authentication are documented, but the skill ships with fixed Tencent document/sheet IDs that users should review before use.
Credentials
The skill writes downloads under user Downloads directories, uploads selected local files or fetched content externally, and sends WeChat video links to a third-party parser endpoint. These actions fit the archiving purpose but lack strong runtime scoping, destination validation, and consent boundaries.
Persistence & Privilege
Uploaded content and metadata, including source URLs, document links, and a level/classification field, are persisted in Tencent Docs smart sheets using the user’s mcporter/Tencent Docs authorization. The artifacts do not describe retention, deletion, or redaction controls.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install v2-1-0
  3. After installation, invoke the skill by name or use /v2-1-0
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- 全新升级的微信/视频号/抖音/小红书/公众号内容自动归档到腾讯文档智能表格方案 - 支持链接自动识别来源、下载内容、并归档至指定腾讯文档空间与智能表格 - 视频号采用自研 sph-download,抖音和小红书用 yt-dlp,公众号用 web_fetch,兼容多种格式(mp4/pdf/pptx/docx/jpg/png/文章) - 上传脚本 upload_to_docs.py 支持多参数自动上传、导入和智能表格索引记录 - 提供详细的配置方法、字段说明和常见问题解答,覆盖主流内容平台一键归档场景
Metadata
Slug v2-1-0
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 知识库管理?

发个链接就完事。微信/视频号/抖音/小红书/公众号的内容,丢过来自动识别、下载、上传腾讯文档,智能表格一键归档。 视频直传在线播放,文章自动转存。视频号用自研 sph-download,抖音/小红书用 yt-dlp,公众号用 web_fetch。 支持 mp4/pdf/pptx/docx/jpg/png/文章。你... It is an AI Agent Skill for Claude Code / OpenClaw, with 0 downloads so far.

How do I install 知识库管理?

Run "/install v2-1-0" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 知识库管理 free?

Yes, 知识库管理 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 知识库管理 support?

知识库管理 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 知识库管理?

It is built and maintained by 寒武纪智能Cambrian Intelligence (@hitjcl); the current version is v1.0.0.

💬 Comments