Knowledge Organizer
This skill turns article links, drafts, and notes into structured Markdown with duplicate checks, tags, summaries, related-note suggestions, image downloads, and optional sync targets for Obsidian, Feishu, and Tencent IMA.
Use Cases
- - Store content in a knowledge base
- Organize articles
- Apply tags
- Archive notes
- Generate summaries
- Suggest related notes
Capabilities
- - Generate Obsidian-ready notes with YAML frontmatter, wikilinks, embeds, and block IDs
- If
draft.images is present, download images into assets/ and keep relative references in the note body; common fields like src, data_src, data-original, data-lazy-src, srcset, url, image_url, and original are supported - Run duplicate detection before writing, covering URL, hash, alias, and similarity checks
- Treat duplicate hits as normal control flow; the CLI returns a structured decision result
- Recommend directly linkable related notes
- Validate tags against the knowledge-base tag contract
- Sync to Feishu through the official OpenClaw
openclaw-lark plugin - Sync to Tencent IMA through the direct import_doc OpenAPI flow
- Orchestrate
destination=obsidian|feishu|ima with INLINECODE12
Usage
- - For Obsidian, set
destination=obsidian, provide vault_root, and let the runtime write directly to local markdown files. - For Feishu, set
destination=feishu and make sure the OpenClaw openclaw-lark plugin is available for feishu_create_doc and feishu_update_doc. - For Feishu placement, set one of
FEISHU_WIKI_NODE, FEISHU_WIKI_SPACE / FEISHU_KB_ID, or FEISHU_FOLDER_TOKEN / FEISHU_FOLDER_ID when your OpenClaw host needs an explicit target location. - The bare
python3 -m scripts.knowledge_sync CLI cannot inject an OpenClaw transport on its own; use it for validation or dry-run, and run real Feishu imports through an OpenClaw host/plugin transport. - INLINECODE25 is only for explicit custom transport setups; do not set it unless you intentionally want to override the default OpenClaw plugin path.
- For Tencent IMA, set
destination=ima and configure IMA_OPENAPI_CLIENTID and IMA_OPENAPI_APIKEY before syncing. - Use
mode=once for a single import run, or mode=sync to skip items whose content hash has not changed. - The shared sync orchestrator lives in
scripts/knowledge_sync.py, and can be used with --markdown-path, --folder-path, or --link.
Usage Examples
- - Obsidian: INLINECODE35
- Feishu validation / dry-run: INLINECODE36
- Feishu real import: run the same draft through an OpenClaw host that exposes
openclaw-lark / feishu_create_doc / INLINECODE39 - Tencent IMA: INLINECODE40
- Disable one or more destinations: add
--disable obsidian,feishu to skip the selected targets when invoking the sync orchestrator.
Workflow
- 1. Get content: use a browser for public-account links, prefer
xiaohongshu-mcp for Xiaohongshu links, use web_fetch for other web pages, and process user-provided content directly - Normalize the source: use
scripts/import_sources.py, scripts/import_normalizer.py, and scripts/import_models.py to build a shared INLINECODE47 - Check duplicates before final write: prefer URL + title + similarity checks, and treat duplicate hits as normal control flow
- Choose a destination:
scripts/knowledge_sync.py dispatches to obsidian, feishu, or INLINECODE51 - Render or import:
scripts/obsidian_note.py generates the content and destination path, while scripts/feishu_kb.py and scripts/ima_kb.py build the sync payloads - Write or sync: runtime writes directly to
destination_path for Obsidian, or stores SyncStateRecord for Feishu/IMA
For WeChat public-account imports, read references/wechat-import.md before doing browser extraction, image handling, or final write.
Execution Rules
- - After reading this skill, follow its workflow before improvising your own path
- Do not skip duplicate checks on import tasks
- If a browser/evaluate call fails twice because of parameter misuse, stop blind retries and re-read the workflow / reference
- Prefer reusing bundled scripts over hand-writing a parallel pipeline when the scripts already cover the task
- For article imports, separate the pipeline into: fetch/normalize → duplicate-check → render → write, instead of mixing all steps together
- Before running script-based import flows, prefer checking
scripts/check_runtime.py to confirm Python and knowledge-base paths are available - For Feishu import, prefer the official OpenClaw
openclaw-lark plugin (feishu_create_doc / feishu_update_doc) and use Lark Markdown with <image url="..."/> / INLINECODE63 - For IMA import, use the direct OpenAPI
import_doc flow with IMA_OPENAPI_CLIENTID and INLINECODE66
Contract
- - Input: structured draft, title aliases, source metadata, summary, bullets, excerpts, images, related notes, and vault root
- Output:
RenderedNote(content, destination_path) for Obsidian, or a SyncStateRecord-backed import result for Feishu/IMA - Frontmatter must include
title, aliases, tags, source_type, source_url, published, created, updated, importance, status, and INLINECODE79 - Before writing tags, require at least 1 domain tag and 1 type tag, with a total of 5-10 tags
- Vault root must be a non-empty absolute path
- Vault root should come from
OPENCLAW_KB_ROOT when available - This contract covers frontmatter / wikilink / embed / block id rules
- Feishu payloads use
title + markdown + placement fields (folder_token / wiki_node / wiki_space) - IMA payloads use
content_format=1, content, and optional INLINECODE88
WeChat Notes
- - WeChat article links (
mp.weixin.qq.com) are a special case: default to browser, not INLINECODE91 - Prefer the container order documented in
references/wechat-import.md when extracting正文 - For image extraction, prefer
data-src, then src, then data-original / data_src / INLINECODE97 - Preserve or add
from=appmsg on WeChat image URLs when needed - Normalize image fields before conversion when possible (treat resolved
data-src as the final src) - Strip common tail noise (scan prompts, 授权提示, 阅读原文引导) before final render
- INLINECODE101 with evaluation must include
fn; missing fn is a caller error, not a reason to improvise blindly
Xiaohongshu Notes
- - Xiaohongshu links are a special case: default to
xiaohongshu-mcp, not generic INLINECODE105 - Prefer checking MCP status first when the workflow depends on local login/session
- Prefer
detail for complete note content; use search → detail only when direct note identifiers are missing - Treat Xiaohongshu as a structured content source, not just a webpage snapshot
- Preserve source metadata such as author, publish time, tags, images, and engagement when available
draft.images Example
CODEBLOCK0
INLINECODE110 is for local files. src / data_src / data-original / data-lazy-src / original etc. are used for remote images; srcset prefers the highest-value candidate.
Compatibility
- - OpenClaw 兼容
- Codex 兼容
- Obsidian vault 工作流
OpenClaw 2026.3.22 Notes
- - Install this repository as a directory skill so OpenClaw can discover
SKILL.md, scripts/, references/, and tests/ together - Prefer
openclaw skills install / openclaw skills update for native skill management, or install through ClawHub / bundle flows when packaging this repository for distribution - Keep the skill name as
knowledge-organizer so bundle-to-skill mapping stays stable across OpenClaw and Codex environments - Obsidian flows need a valid absolute vault root; prefer
OPENCLAW_KB_ROOT when it is available - Feishu sync depends on the official
openclaw-lark plugin being installed and configured, with feishu_create_doc / feishu_update_doc available in the OpenClaw host - Feishu placement envs such as
FEISHU_WIKI_SPACE, FEISHU_FOLDER_TOKEN, FEISHU_WIKI_NODE, FEISHU_KB_ID, and FEISHU_FOLDER_ID are optional routing hints, not always-required secrets - Feishu sync from CLI examples requires an OpenClaw host/plugin transport; the bare Python entrypoint only validates the flow and reports missing transport clearly
- Xiaohongshu imports depend on
xiaohongshu-mcp being available before the workflow reaches structured note extraction - Tencent IMA sync depends on
IMA_OPENAPI_CLIENTID and INLINECODE135 - This skill does not depend on legacy Chrome relay settings, deprecated
CLAWDBOT_* / MOLTBOT_* env names, or removed OpenClaw plugin SDK shims
Project Links
Output Template
CODEBLOCK1
知识整理器
该技能可将文章链接、草稿和笔记转化为结构化Markdown,具备去重检查、标签、摘要、相关笔记建议、图片下载功能,并支持同步至Obsidian、飞书和腾讯IMA。
使用场景
- - 将内容存入知识库
- 整理文章
- 应用标签
- 归档笔记
- 生成摘要
- 推荐相关笔记
功能特性
- - 生成可直接用于Obsidian的笔记,包含YAML前置元数据、Wiki链接、嵌入内容和块ID
- 若draft.images存在,将图片下载至assets/目录,并在笔记正文中保留相对引用;支持src、datasrc、data-original、data-lazy-src、srcset、url、imageurl和original等常见字段
- 写入前执行去重检测,涵盖URL、哈希值、别名和相似度检查
- 将重复命中视为正常控制流程;CLI返回结构化决策结果
- 推荐可直接链接的相关笔记
- 根据知识库标签合约验证标签
- 通过官方OpenClaw插件openclaw-lark同步至飞书
- 通过直接导入文档的OpenAPI流程同步至腾讯IMA
- 编排destination=obsidian|feishu|ima与mode=once|sync的组合
使用方法
- - 对于Obsidian,设置destination=obsidian,提供vaultroot,运行时将直接写入本地Markdown文件
- 对于飞书,设置destination=feishu,并确保OpenClaw的openclaw-lark插件可用于feishucreatedoc和feishuupdatedoc
- 对于飞书放置位置,当OpenClaw主机需要明确的目标位置时,设置FEISHUWIKINODE、FEISHUWIKISPACE/FEISHUKBID或FEISHUFOLDERTOKEN/FEISHUFOLDERID之一
- 裸python3 -m scripts.knowledgesync CLI无法自行注入OpenClaw传输层;请将其用于验证或试运行,并通过OpenClaw主机/插件传输层执行实际的飞书导入
- FEISHUIMPORTENDPOINT仅用于显式自定义传输设置;除非有意覆盖默认的OpenClaw插件路径,否则不要设置
- 对于腾讯IMA,设置destination=ima,并在同步前配置IMAOPENAPICLIENTID和IMAOPENAPIAPIKEY
- 使用mode=once进行单次导入运行,或使用mode=sync跳过内容哈希值未变化的项目
- 共享同步编排器位于scripts/knowledge_sync.py,可与--markdown-path、--folder-path或--link配合使用
使用示例
- - Obsidian:python3 -m scripts.knowledgesync --destination obsidian --mode once --state .sync-state.json --vault-root /path/to/vault --markdown-path draft.md
- 飞书验证/试运行:python3 -m scripts.knowledgesync --destination feishu --mode once --state .sync-state.json --markdown-path draft.md --dry-run
- 飞书实际导入:通过暴露openclaw-lark/feishucreatedoc/feishuupdatedoc的OpenClaw主机运行同一草稿
- 腾讯IMA:python3 -m scripts.knowledge_sync --destination ima --mode sync --state .sync-state.json --folder-path drafts/
- 禁用一个或多个目标:在调用同步编排器时添加--disable obsidian,feishu以跳过选定的目标
工作流程
- 1. 获取内容:公众号链接使用浏览器,小红书链接优先使用xiaohongshu-mcp,其他网页使用webfetch,用户提供的内容直接处理
- 规范化来源:使用scripts/importsources.py、scripts/importnormalizer.py和scripts/importmodels.py构建共享的ImportDraft
- 最终写入前检查重复:优先使用URL+标题+相似度检查,将重复命中视为正常控制流程
- 选择目标:scripts/knowledgesync.py分发至obsidian、feishu或ima
- 渲染或导入:scripts/obsidiannote.py生成内容和目标路径,scripts/feishukb.py和scripts/imakb.py构建同步负载
- 写入或同步:对于Obsidian,运行时直接写入destination_path;对于飞书/IMA,存储SyncStateRecord
对于微信公众号导入,在进行浏览器提取、图片处理或最终写入前,请阅读references/wechat-import.md。
执行规则
- - 阅读本技能后,先遵循其工作流程,再自行发挥
- 导入任务中不得跳过去重检查
- 若浏览器/evaluate调用因参数使用不当失败两次,停止盲目重试,重新阅读工作流程/参考文档
- 当现有脚本已覆盖任务时,优先复用捆绑脚本而非手动编写并行管道
- 对于文章导入,将管道分离为:获取/规范化→去重检查→渲染→写入,而非将所有步骤混在一起
- 在运行基于脚本的导入流程前,优先检查scripts/checkruntime.py以确认Python和知识库路径可用
- 对于飞书导入,优先使用官方OpenClaw的openclaw-lark插件(feishucreatedoc/feishuupdatedoc),并使用包含/的Lark Markdown
- 对于IMA导入,使用直接的OpenAPI importdoc流程,配合IMAOPENAPICLIENTID和IMAOPENAPIAPIKEY
合约
- - 输入:结构化草稿、标题别名、来源元数据、摘要、要点、摘录、图片、相关笔记和知识库根路径
- 输出:对于Obsidian为RenderedNote(content, destinationpath),对于飞书/IMA为基于SyncStateRecord的导入结果
- 前置元数据必须包含title、aliases、tags、sourcetype、sourceurl、published、created、updated、importance、status和canonicalhash
- 写入标签前,要求至少1个领域标签和1个类型标签,标签总数5-10个
- 知识库根路径必须是非空绝对路径
- 知识库根路径应优先来自OPENCLAWKBROOT
- 本合约涵盖前置元数据/Wiki链接/嵌入内容/块ID规则
- 飞书负载使用title+markdown+放置字段(foldertoken/wikinode/wikispace)
- IMA负载使用contentformat=1、content和可选的folder_id
微信笔记
- - 微信公众号文章链接(mp.weixin.qq.com)是特殊情况:默认使用browser,而非webfetch
- 提取正文时,优先使用references/wechat-import.md中记录的容器顺序
- 图片提取时,优先使用data-src,其次src,再其次data-original/datasrc/original
- 必要时在微信图片URL上保留或添加from=appmsg
- 尽可能在转换前规范化图片字段(将解析后的data-src视为最终src)
- 最终渲染前去除常见尾部噪音(扫描提示、授权提示、阅读原文引导)
- browser act配合evaluation时必须包含fn;缺少fn是调用方错误,而非盲目自行发挥的理由
小红书笔记
- - 小红书链接是特殊情况:默认使用xiaohongshu-mcp,而非通用web_fetch
- 当工作流程依赖本地登录/会话时,优先先检查MCP状态
- 完整笔记内容优先使用detail;仅在缺少直接笔记标识符时使用search→detail
- 将小红书视为结构化内容源,而非单纯的网页快照
- 尽可能保留来源元数据,如作者、发布时间、标签、图片和互动数据
draft.images示例
yaml
images:
- path: /absolute/path/to/local.png
alt: 本地图片
- src: https://example.com/cover.png
alt: 远程图片
- srcset: https://example.com/cover-1x.png 1x, https://example.com/cover-2x.png 2x
alt: 响应式图片
path用于本地文件。src/data_s