Idea Vault (Public)
A lightweight capture → organize → retrieve workflow.
Goal
Turn messy chat drops (links + rough notes + timestamps) into structured markdown entries and a searchable index.
One-time setup (required)
Run this once after cloning the skill so OpenClaw can execute it reliably:
CODEBLOCK0
Environment setup (recommended):
CODEBLOCK1
Notes:
- - Python 3 is required.
- INLINECODE0 from
requirements.txt is required. - INLINECODE2 is strongly recommended for reliable YouTube transcripts.
- INLINECODE3 is optional fallback for some videos/environments.
Privacy and network behavior
This skill can make outbound network calls to:
- -
youtube.com (video/transcript fallback paths) - INLINECODE5 (when
IDEA_VAULT_TRANSCRIPTAPI_KEY is set) - source/asset URLs included in captured messages
Security notes:
- - The helper uses
subprocess.run([...], shell=False) for yt-dlp (no shell string execution). - Do not use this skill with sensitive private chat content unless you are comfortable with these external calls.
- Keep API keys in environment variables only; never commit secrets.
Inputs supported
- - YouTube links + notes + optional timestamps
- Web links + notes
- Note-only captures (no link)
Recommended path setup (portable)
Use an environment variable or local default path:
CODEBLOCK2
Core flow (triggered by /vault or vault)
1) Read recent messages in the current chat.
2) Extract the newest capture block.
3) If source is YouTube, fetch transcript + optional clips around timestamps.
4) Write summary/elaboration/tags/associations.
5) Upsert into vault (append addendum on duplicate URL/video).
Commands
Extract capture
CODEBLOCK3
Fetch transcript (YouTube only)
Preferred source is TranscriptAPI via IDEA_VAULT_TRANSCRIPTAPI_KEY.
CODEBLOCK4
Save / upsert entry
CODEBLOCK5
Query vault
CODEBLOCK6
Annotate latest entry
CODEBLOCK7
save_request.json shape
CODEBLOCK8
Output layout
Under VAULT_DIR:
- - INLINECODE13
- INLINECODE14 (YouTube only)
- INLINECODE15 (optional attachments)
- INLINECODE16
- INLINECODE17
Agent response style after save
Reply with:
- - title + link
- 3–6 concise bullets
- relevant clips for flagged timestamps (if present)
- saved file path
Idea Vault (公开版)
一个轻量级的 捕获 → 整理 → 检索 工作流。
目标
将杂乱的聊天记录(链接 + 粗略笔记 + 时间戳)转化为结构化的 Markdown 条目和可搜索的索引。
一次性设置(必需)
克隆技能后运行一次,以便 OpenClaw 能够可靠地执行:
bash
cd ~/.openclaw/skills/idea-vault
python3 --version
python3 -m pip install -r requirements.txt
环境设置(推荐):
bash
cp .env.example .env
然后在你的 shell/环境管理器中设置 IDEAVAULTTRANSCRIPTAPIKEY 和 IDEAVAULT_DIR
注意:
- - 需要 Python 3。
- 需要 requirements.txt 中的 requests。
- 强烈建议设置 IDEAVAULTTRANSCRIPTAPI_KEY 以获取可靠的 YouTube 字幕。
- yt-dlp 是某些视频/环境下的可选备用方案。
隐私与网络行为
此技能可能对外发起网络请求,目标包括:
- - youtube.com(视频/字幕备用路径)
- transcriptapi.com(当设置了 IDEAVAULTTRANSCRIPTAPI_KEY 时)
- 捕获消息中包含的源/资源 URL
安全说明:
- - 辅助脚本使用 subprocess.run([...], shell=False) 调用 yt-dlp(无 shell 字符串执行)。
- 除非你接受这些外部调用,否则不要将此技能用于敏感的私密聊天内容。
- 仅将 API 密钥保存在环境变量中;切勿提交密钥。
支持的输入
- - YouTube 链接 + 笔记 + 可选时间戳
- 网页链接 + 笔记
- 纯笔记捕获(无链接)
推荐路径设置(可移植)
使用环境变量或本地默认路径:
bash
VAULTDIR=${IDEAVAULT_DIR:-$HOME/workspace/idea-vault}
CACHEDIR=$VAULTDIR/_cache
核心流程(由 /vault 或 vault 触发)
1) 读取当前聊天中的最近消息。
2) 提取最新的捕获块。
3) 如果来源是 YouTube,获取字幕 + 时间戳附近的可选片段。
4) 写入摘要/阐述/标签/关联。
5) 更新到 vault(重复 URL/视频时追加补充内容)。
命令
提取捕获
bash
python3 ./scripts/idea_vault.py extract --user-id --fallback-messages 30 < messages.json > capture.json
获取字幕(仅限 YouTube)
首选来源是通过 IDEAVAULTTRANSCRIPTAPI_KEY 的 TranscriptAPI。
bash
python3 ./scripts/ideavault.py fetch --cache-dir $CACHEDIR < capture.json > youtube.json
保存 / 更新条目
bash
python3 ./scripts/ideavault.py upsert --vault-dir $VAULTDIR < save_request.json > saved.json
查询 vault
bash
python3 ./scripts/ideavault.py query --vault-dir $VAULTDIR --limit 50
python3 ./scripts/ideavault.py query --vault-dir $VAULTDIR --since 2026-03-01
python3 ./scripts/ideavault.py query --vault-dir $VAULTDIR --channel podcast --text pricing
注释最新条目
bash
python3 ./scripts/ideavault.py annotate --vault-dir $VAULTDIR --last --star true --priority high --add-tag actionable
save_request.json 格式
json
{
capture: {...: 来自提取结果},
source: {
kind: youtube|web|note,
url: https://...(可选),
title: 字符串(可选),
author: 字符串(可选),
id: 字符串(可选),
transcript_txt: /path/to/transcript.txt(仅 YouTube,可选),
transcript_json: /path/to/raw.json(仅 YouTube,可选),
clips: [{centersec: 123, windowsec: 60, text: ...}]
},
summary: 字符串,
elaboration: 字符串,
tags: [标签],
associations: [{timestamp_sec: 1461, note: ...}]
}
输出结构
位于 VAULT_DIR 下:
- - entries/YYYY/YYYY-MM-DD[].md
- transcripts/YYYY/.transcript.txt(仅 YouTube)
- assets/YYYY/MM/*(可选附件)
- index.json
- _cache/
保存后的代理回复风格
回复内容应包括:
- - 标题 + 链接
- 3–6 条简洁要点
- 标记时间戳的相关片段(如有)
- 保存的文件路径