← 返回 Skills 市场
eeyan2025-art

AI SkillHub

作者 eeyan2025-art · GitHub ↗ · v2.1.0 · MIT-0
cross-platform ⚠ suspicious
222
总下载
0
收藏
0
当前安装
16
版本数
在 OpenClaw 中安装
/install ai-skillhub
功能描述
OpenClaw AI SkillHub 核心。支持两种触发方式:①「!skill URL」自动模式,AI 自动归纳关键词和分类;②「!skill 关键词 URL」手动模式,用户指定关键词。提取内容 → 生成原始内容.md + SKILL.md → 推送 GitHub。
使用说明 (SKILL.md)

AI SkillHub — 全自动知识策展系统

命令格式

!skill \x3CURL>              ← 自动模式,AI 自动归纳关键词和分类
!skill \x3C关键词> \x3CURL>     ← 手动模式,用户指定关键词

⚡ 第零步:立即回复用户(不得跳过)

收到命令的第一件事是回复:

✅ 收到!正在处理「{URL}」,请稍等...

然后才开始执行下面的步骤。


🗺️ 平台识别 → 执行卡速查表

先看 URL,匹配平台,直接跳到对应执行卡,不要阅读其他部分。

URL 特征 平台 执行卡
youtube.comyoutu.be YouTube → [执行卡 A]
bilibili.com B站 → [执行卡 B]
mp.weixin.qq.com 微信公众号 → [执行卡 C]
douyin.comv.douyin.com 抖音 → [执行卡 D]
其他所有网址 通用网页 → [执行卡 E]

[执行卡 A] YouTube

A1. 先跑字幕脚本(必须第一步,不得绕过)

python3 ~/.openclaw/scripts/yt_transcript.py "{url}"

结果判断:

输出包含 "transcript" 字段 → 提取成功,将 transcript 内容作为正文,进入 [Step 4 归类]

输出包含 "error" 字段 → 字幕不可用,进入 A2


A2. 字幕失败 → 通知用户运行本地流水线

告知用户:

⚠️ 该视频没有字幕,需要在你的 Windows 本地下载音频后转写。

请在你的电脑上打开 PowerShell,运行:

powershell -ExecutionPolicy Bypass -File "C:\Users\admin\Documents	rae_projects\vps skill\yt_local_pipeline.ps1" "{url}" tiny

运行完成后,会在当前目录生成 yt_transcript_XXXXXX.txt 文件。
请把文件内容粘贴回来,我继续处理。

收到用户粘贴的内容后,将其作为正文,进入 [Step 4 归类]。


[执行卡 B] B站

B1. 检查 cookies 并下载音频

BILI_COOKIES="$HOME/.openclaw/cookies/bilibili.txt"
if [ -f "$BILI_COOKIES" ]; then
  COOKIES_ARG="--cookies $BILI_COOKIES"
else
  COOKIES_ARG=""
fi

python3 -m yt_dlp -x --audio-format mp3 --audio-quality 5 \
  $COOKIES_ARG \
  -o /tmp/content_audio.mp3 \
  "{url}" 2>&1

结果判断:

下载成功 → 进入 B2

下载失败且 cookies 不存在 → 告知用户:

❌ B站下载失败:需要登录 cookies。
cookies 文件应在:~/.openclaw/cookies/bilibili.txt
请联系管理员重新导出 cookies 后重试。

B2. Whisper 转写

python3 -c "
import whisper
model = whisper.load_model('tiny')
result = model.transcribe('/tmp/content_audio.mp3', language='zh')
with open('/tmp/原始内容.txt', 'w', encoding='utf-8') as f:
    f.write(result['text'])
print('转写完成,字数:', len(result['text']))
"

模型选择:默认 tiny。用户明确说「用 small」「用 medium」时才替换。

转写完成后,将 /tmp/原始内容.txt 内容作为正文,进入 [Step 4 归类]。


[执行卡 C] 微信公众号

C1. 第一步:必须先跑 wx_extract.py(不得跳过,不得用其他工具替代)

python3 ~/.openclaw/scripts/wx_extract.py "{url}"

结果判断:

输出 JSON 包含 "content" 字段且无 "error" 字段 → 提取成功,将 content 内容作为正文,进入 [Step 4 归类]

输出包含 "error": "blocked" 字段 → 进入 C2


C2. 第二步:extract_content_from_websites 浏览器模式

extract_content_from_websites(
  url="{url}",
  mode="browser_only",
  prompt="提取微信公众号文章完整正文,包括标题和所有段落"
)

✅ 成功 → 将结果作为正文,进入 [Step 4 归类]

❌ 失败 → 进入 C3


C3. 第三步:搜索引擎缓存

使用 batch_web_search 搜索:

  1. "{文章标题}" 全文
  2. "{url中的短ID}" site:weixin.sogou.com

✅ 找到完整内容 → 使用,注明「内容来自搜索缓存」,进入 [Step 4 归类]

❌ 未找到 → 进入 C4


C4. 最终兜底:请用户提供

⚠️ 该微信文章受谷歌云 IP 限制,自动抓取失败。
请在微信中打开文章,复制全文后粘贴给我,我继续处理。

[执行卡 D] 抖音

直接告知用户,不要尝试任何下载:

❌ 抖音视频无法处理。
原因:当前服务器(美国 Google Cloud IP)被抖音 API 封锁,无论是否有 cookies 均无效。
建议:若该内容同时发布在 B站或 YouTube,请提供对应链接。

[执行卡 E] 通用网页(知乎 / 小红书 / 其他)

E1. extract_content_from_websites

extract_content_from_websites(
  url="{url}",
  mode="browser_only",
  prompt="提取这个页面的完整正文内容,包括标题、所有段落,不要省略任何内容"
)

✅ 成功 → 进入 [Step 4 归类]

❌ 失败 → 进入 E2


E2. 搜索引擎兜底

batch_web_search("{页面标题} 全文")

✅ 找到 → 进入 [Step 4 归类]

❌ 找不到 → 告知用户无法提取,请求直接粘贴内容


[Step 4] 自动归类(仅自动模式)

手动模式(用户提供了关键词)跳过此步。

llm-task 分析内容,确定 keywordcategory

{
  "prompt": "你是一个知识分类专家。请根据以下内容,输出:\
1. keyword(关键词):2-6个字,概括内容主题,中文或英文均可,作为文件夹名使用(不含特殊字符)\
2. category(分类):从以下分类中选一个最合适的:编程开发 / 法律金融 / 内容创作 / 商业运营 / 效率工具 / 健康生活 / 教育学习 / 其他\
3. reason(理由):一句话说明分类依据\
\
【内容标题】:{title}\
【内容摘要(前500字)】:{content[:500]}\
\
严格按 JSON 格式输出:{\"keyword\": \"...\", \"category\": \"...\", \"reason\": \"...\"}",
  "model": "minimax/auto"
}

[Step 5] 保存原始内容

写入 /tmp/原始内容.md

# 原始内容记录

## 来源信息
- URL:{url}
- 平台:{platform}
- 关键词:{keyword}
- 分类:{category}
- 归类方式:{自动归类 / 用户指定}
- 提取时间:{datetime}
- 提取方式:{方式,例:YouTube字幕API / B站yt-dlp+Whisper(tiny) / wx_extract.py / 本地流水线+Whisper(tiny)}

## 内容正文
{完整内容,一字不删}

[Step 6] 事实抽取

llm-task 扫描全文,重点检测财务/结果类关键词:

{
  "prompt": "你是一个事实抽取专家。从以下内容中抽取所有关键事件,特别关注【结果、状态、金额、是否成功】。\
\
必须扫描:追回、退款、退回、赔付、胜诉、执行成功、失败、已追回、已退款、钱、款、金额、赔偿\
\
输出格式:\
## 关键事件\
| 事件 | 结果状态 | 证据句子 | 时间/金额 |\
\
## financial_outcome\
- has_financial_outcome: true/false\
- outcome_summary:\
- evidence_sentence:\
\
注意:必须逐句扫描,不得跳段",
  "input": "{原始内容全文}"
}

[Step 7] 生成 SKILL.md

写入 /tmp/SKILL.md

# {关键词} Skill

## ⚠️ 关键结果
{如果 has_financial_outcome=true,用粗体标注结果}

## 核心事件
{从 Step 6 events 转化}

## 详细内容
{结构化总结}

## 重要事实清单
{其他关键事实}

[Step 8] 推送 GitHub

export GITHUB_TOKEN=$(grep GITHUB_TOKEN ~/.openclaw/.env | cut -d= -f2)
export GITHUB_REPO=$(grep GITHUB_REPO ~/.openclaw/.env | cut -d= -f2)
export GITHUB_BRANCH=$(grep GITHUB_BRANCH ~/.openclaw/.env | cut -d= -f2-)

rm -rf /tmp/skillhub_repo
git clone "https://${GITHUB_TOKEN}@github.com/${GITHUB_REPO}.git" /tmp/skillhub_repo

mkdir -p "/tmp/skillhub_repo/skills/{category}/{keyword}"
cp /tmp/原始内容.md "/tmp/skillhub_repo/skills/{category}/{keyword}/原始内容.md"
cp /tmp/SKILL.md "/tmp/skillhub_repo/skills/{category}/{keyword}/SKILL.md"

cd /tmp/skillhub_repo
git config user.email "openclaw@bot"
git config user.name "OpenClaw Bot"
git add .
git commit -m "Add skill [{category}/{keyword}] - $(date '+%Y-%m-%d')"
git push origin ${GITHUB_BRANCH:-main}

rm -rf /tmp/skillhub_repo

完成通知

✅ Skill 已保存:【{keyword}】
🏷️ 分类:{category}
📄 原始内容:skills/{category}/{keyword}/原始内容.md
🧠 分析摘要:skills/{category}/{keyword}/SKILL.md
📦 来源:{url}
🔗 GitHub:https://github.com/{GITHUB_REPO}/tree/main/skills/{category}/{keyword}
📌 提取方式:{方式}

🚫 禁止事项(违反即为错误)

  1. 禁止对 YouTube 直接用 yt-dlp 下载——VPS 是谷歌云 IP,必然 403,不要尝试
  2. 禁止对微信公众号跳过 wx_extract.py——必须先跑脚本,不能直接用浏览器工具或 llm-task
  3. 禁止用 llm-task 访问任何 URL——llm-task 只做文本推理,没有联网能力
  4. 禁止对抖音尝试任何下载——直接告知用户不可用
  5. 禁止只推送一个文件——必须同时推送 原始内容.md + SKILL.md
  6. 禁止省略或截断原始内容——原始内容必须一字不删全量保存

工具与环境

工具/路径 用途
python3 ~/.openclaw/scripts/yt_transcript.py YouTube 字幕提取
python3 ~/.openclaw/scripts/wx_extract.py 微信公众号提取
python3 -m yt_dlp B站/西瓜视频音频下载
whisper(Python 库) 音频转写
~/.openclaw/cookies/bilibili.txt B站登录 cookies
~/.openclaw/.env GitHub Token / Repo 配置
C:\...\yt_local_pipeline.ps1 YouTube 无字幕时本地下载流水线(用户在 Windows 本地运行)
exec 在 VPS 执行 shell 命令
extract_content_from_websites 网页/浏览器内容提取
batch_web_search 搜索引擎兜底
llm-task 纯文本推理(不能联网)
安全使用建议
This skill will execute code and read secrets from your home directory (e.g., ~/.openclaw/scripts/* and ~/.openclaw/.env) even though those credentials are not declared in the registry metadata. Before installing or enabling: 1) Inspect any local scripts the skill calls (~/.openclaw/scripts/yt_transcript.py, wx_extract.py) — they will be executed with your account privileges. 2) Don't store broad secrets in ~/.openclaw/.env; create a dedicated GitHub token with minimal scopes (repo create/write only for the single repo) if you must allow pushes. 3) Consider running the skill in an isolated/sandbox account or VM so local scripts and .env reads cannot expose unrelated secrets. 4) If you don't trust those local scripts or the source of this skill, decline installation; prefer a version that declares required env vars (GITHUB_TOKEN, GITHUB_REPO) and documents all local dependencies. 5) If you proceed, restrict the GitHub token scope, review cookie files, and disable autonomous invocation or require explicit user confirmation for push actions.
功能分析
Type: OpenClaw Skill Name: ai-skillhub Version: 2.1.0 The skill bundle exhibits high-risk behavior by executing shell commands with unsanitized inputs ({url}, {keyword}) in SKILL.md, creating significant command injection vulnerabilities. It accesses sensitive data including GITHUB_TOKEN and Bilibili cookies from the filesystem. Furthermore, it instructs users to run a PowerShell script on their local machine with 'ExecutionPolicy Bypass' from a hardcoded path (C:\Users\admin\...), which is a common social engineering tactic. While these actions support the stated goal of content curation, the combination of credential access, lack of sanitization, and local execution prompts warrants a suspicious classification.
能力评估
Purpose & Capability
The skill's description (content extraction → generate files → push to GitHub) matches the high-level flow in SKILL.md, but the recipe requires local scripts (~/.openclaw/scripts/yt_transcript.py, wx_extract.py), a cookies file (~/.openclaw/cookies/bilibili.txt), and GitHub credentials read from ~/.openclaw/.env. None of these required files/credentials are declared in the registry metadata. Requiring arbitrary local scripts and an undeclared GitHub token is disproportionate to the stated metadata and should have been declared.
Instruction Scope
The instructions tell the agent to execute local scripts (e.g., ~/.openclaw/scripts/yt_transcript.py, wx_extract.py), run system commands (yt_dlp, whisper invocations), read files in the user's home (~/.openclaw/.env, ~/.openclaw/cookies/*), write to /tmp, and embed/consume a GitHub token to clone/push. Executing arbitrary user-local scripts and reading shell-visible .env files broadens scope well beyond content extraction and can lead to execution of arbitrary code or exposure of unrelated secrets.
Install Mechanism
No install spec (instruction-only), which is lower risk from third-party downloads. However, the skill delegates work to local scripts in ~/.openclaw/scripts and tools (yt-dlp, whisper) that may not be present and could be arbitrarily implemented by the user or a compromised process. The lack of an install manifest hides these implicit dependencies and their security implications.
Credentials
Although the registry lists no required env vars, the runtime steps explicitly read GITHUB_TOKEN, GITHUB_REPO, and GITHUB_BRANCH from ~/.openclaw/.env and may read cookies from ~/.openclaw/cookies/bilibili.txt. Requiring access to a GitHub token and arbitrary cookie files is sensitive and should have been declared; pulling credentials by grepping a local .env file is a disproportionate and under-specified request for this skill.
Persistence & Privilege
The skill is not marked always:true and does not request persistent installation. Autonomous model invocation is permitted (platform default). The concerning part is not persistence but that it executes local scripts and reads files in the user's home on each run—this increases runtime privilege but does not modify agent configuration or other skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ai-skillhub
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ai-skillhub 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.1.0
v2.1: 重写执行卡结构,明确每个平台处理方法;新增 B站 cookies 支持;新增 YouTube 无字幕本地流水线;微信强制先用 wx_extract.py;抖音标注不可用
v3.0.0
v3.0.0-fix-use-web_fetch-and-exec-as-real-tools
v2.0.0
ai-skillhub v2.0.0 — 全面重写,优化分流与平台适配 - 全新分步流程,针对 B站(yt-dlp下载)、YouTube/公众号/知乎网页(Agent侧提取)、抖音(支持Cookie下载)分别处理 - 每一步均实时反馈处理进度,保证用户知情 - 音频转写新增 faster-whisper 本地支持 - 原始内容和知识摘要以 markdown 保存并自动推送到 GitHub - 增强断点续跑与错误提示,关键错误和中断均明确告知
v1.3.0
**ai-skillhub v1.3.0 Changelog** - 全面重写 SKILL.md,流程与用户提示更简明,每步反馈更加明确。 - 平台内容提取全面切换到 browser_only,适配 YouTube/B站/短视频/公众号/知乎/新闻等,无需依赖字幕 API 或下载工具。 - 加强断点续跑:每步写入 checkpoint,即使失败也能恢复,支持重复命令自动检测进度。 - 错误处理与 Discord 通知格式标准化,让用户明确失败原因与处理建议。 - 流程优化,所有步骤更贴合实际操作与 Discord 聊天体验,全程无需人工干预。
v1.2.0
**YouTube 视频处理全面升级:不再尝试直接下载视频,优先使用字幕 API,再降级为网页正文提取或本地音频转写。** - 改为优先通过字幕API获取 YouTube、B站等视频内容,无需视频下载,兼容 VPS 网络限制。 - faster-whisper 本地音频转写仅作为字幕和网页正文均不可得时的降级方案。 - 完善输出进度与平台适配策略,对所有平台均即时进度反馈。 - 新增对 GitHub 推送、处理断点、关键财务类内容的强制抽取与高亮。 - 更新错误处理逻辑,确保无法下载/获取内容时有自动降级与用户提示。
v1.1.0
Version 1.1.0 - Simplified and clarified step-by-step workflow, with enhanced platform detection and handling. - Added detailed, direct support for YouTube (auto-detects and uses no-proxy subtitle extraction, with explicit fallback/error guidance). - Improved table for platform recognition and extraction methods for B站、YouTube、西瓜视频、公众号、知乎、微博、抖音及更多网页类型。 - Streamlined all user feedback messages and error notifications for improved clarity and relevance. - Clarified fallback strategies (e.g. for YouTube/音频转写) and included precise examples for each extraction/transcription approach. - Updated error response and handling instructions to match new process and platform constraints.
v1.0.9
Major update: Real-time progress feedback added. Every workflow step now sends immediate status messages in Discord, greatly improving user experience and transparency. - Every step now sends a Discord message upon completion; no more waiting until all tasks finish. - Improved error handling: specific user notifications added for each type of failure. - Descriptions and process clarified for both video/audio (with transcription) and text article workflows. - Strong enforcement of dual-file output (原始内容.md and SKILL.md), both pushed to GitHub. - Detailed instructions for workflow messaging, file management, and fallback scenarios included. - Technical rationale added: explains the importance of step-by-step feedback for users and connection stability.
v1.0.8
ai-skillhub v1.0.8 - 新增:收到命令后立即自动回复用户,提示“视频处理中”,无需等待流程结束。 - 明确要求后台执行全流程,前台先告知用户预计处理时长。 - 其余流程与规则保持不变。
v1.0.7
Major workflow restructuring: switched音频转写 to核心,精简说明,统一文件生成逻辑。 - 步骤流程简化并重构,核心为 yt-dlp 下载音频+MiniMax 转写,禁用其他内容源。 - 删除冗余网页转写及字幕提取 fallback 步骤,所有视频均强制走音频下载→AI转写。 - 平台支持表和处理优先级更新,更突出音频管线为主流程。 - 明确禁止以网页正文/摘要替换音频转写,完善强制事实抽取规则要求。 - 推送及文件保存命名、内容写法做出更清晰规范。 - 文档结构更精练,面向自动化与复用。
v1.0.6
**重大更新:新增原始内容文件保存机制,保证每次处理完整留存原文。** - 每次处理都自动生成并推送两份文件到 GitHub:“原始内容.md”(全量原文,不得改写)与“SKILL.md”(分析精华)。 - 增加独立的 save_raw_content 步骤,严格保存完整的转录或正文,无遗失。 - 完善事实抽取(fact_extraction)规范,确保所有关键信息判别更准确。 - 精简与调整工作流程说明,强调“不可修改原文”原则。 - 完善关键词防漏机制,命中财务关键词必须高亮标记。 - 提供详细错误处理方案,确保任一环节失败都可追溯和补救。
v1.0.5
**重大更新:引入“强制事实抽取层”,确保所有关键信息(特别是结果、金额、是否追回/退款/赔付)被结构化标注。** - 新增 Step 6:fact_extraction,显式调用 LLM 结构化抽取结果、状态、金额等核心事实。 - SKILL.md 生成流程调整,强制在文档开头标注关键结果及证据,并列出所有核心事件和重要事实。 - 新增“强制关键词扫描”机制,防止遗漏事实(如“追回”“赔付”等)。 - 输出通知增加 fact_extraction 结果摘要。 - 移除冗余流程说明,使文档更简练准确。 - 保持全自动、无需人工干预的设计目标。
v1.0.4
- 优化整体流程,增加对西瓜视频与抖音 Cookie 授权音频下载的处理,无需人工干预即可多平台适配。 - 精简并重写说明文档,详细拆解分步执行及出错分支、更清晰标注平台支持矩阵。 - 新增用户辅助互动流程,遇抖音视频需 Cookie 时可自动请求用户提交,获取后自动重试。 - 强化自动分类、去重、推送 GitHub 的说明,将 index.md 自动维护纳入流程。 - 现支持 B站、YouTube、西瓜视频、抖音、公众号等多种来源的自动字幕/音频提取与整理。
v1.0.3
- 优化整体流程,调整为“优先提取字幕→次选音频转录”,显著提升信息获取准确性。 - 精简并完善每一步说明,明确优先级与降级机制,减少不相关实现细节与示例。 - 更新自动分类说明与目录结构,使目录归类与生成流程更加清晰。 - 强化错误处理与去重机制说明,突出多种失败场景下的应对措施。 - 补充环境变量、Git 操作、完成通知和关键调用方式的简要配置说明。
v1.0.2
- Improved security guidance: added a dedicated "安全说明" section explaining environment variable storage and clarifying that no real secrets are published. - Enhanced description: both frontmatter and initial summary are more explicit about environment variable configuration and security practices. - Minor text clarifications to emphasize safe deployment and separation between published code and sensitive information.
v1.0.1
- Fixed the repository cloning and push commands for broader compatibility using `${GITHUB_REPO}` and `${GITHUB_BRANCH}` environment variables. - Updated environment variable documentation for clarity, including explicit placeholders for user and repository names. - No changes to core logic or user workflow.
v1.0.0
AI SkillHub — fully automated knowledge curation for Discord - Added support for one-command skill collection in Discord via "!skill 关键词 URL", requiring no manual steps. - Automatic extraction, deduplication, and classification of knowledge from YouTube, Bilibili, 微信公众号, 小红书, Zhihu, and any URL. - Skills are auto-generated, appended, or created as SKILL.md files, with an up-to-date index and fully managed GitHub integration. - Smart content deduplication and classification using LLM and platform-specific extractors. - Robust error handling ensures a seamless user experience and reliable skill updates for all supported content platforms.
元数据
Slug ai-skillhub
版本 2.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 16
常见问题

AI SkillHub 是什么?

OpenClaw AI SkillHub 核心。支持两种触发方式:①「!skill URL」自动模式,AI 自动归纳关键词和分类;②「!skill 关键词 URL」手动模式,用户指定关键词。提取内容 → 生成原始内容.md + SKILL.md → 推送 GitHub。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 222 次。

如何安装 AI SkillHub?

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

AI SkillHub 是免费的吗?

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

AI SkillHub 支持哪些平台?

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

谁开发了 AI SkillHub?

由 eeyan2025-art(@eeyan2025-art)开发并维护,当前版本 v2.1.0。

💬 留言讨论