Knowledge Organizer
Use when importing articles, organizing notes, or syncing a knowledge base across Obsidian, Feishu, and Tencent IMA with OpenClaw or Codex.
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.imagesis present, download images intoassets/and keep relative references in the note body; common fields likesrc,data_src,data-original,data-lazy-src,srcset,url,image_url, andoriginalare 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-larkplugin - Sync to Tencent IMA through the direct import_doc OpenAPI flow
- Orchestrate
destination=obsidian|feishu|imawithmode=once|sync
Usage
- For Obsidian, set
destination=obsidian, providevault_root, and let the runtime write directly to local markdown files. - For Feishu, set
destination=feishuand make sure the OpenClawopenclaw-larkplugin is available forfeishu_create_docandfeishu_update_doc. - For Feishu placement, set one of
FEISHU_WIKI_NODE,FEISHU_WIKI_SPACE/FEISHU_KB_ID, orFEISHU_FOLDER_TOKEN/FEISHU_FOLDER_IDwhen your OpenClaw host needs an explicit target location. - The bare
python3 -m scripts.knowledge_syncCLI 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. FEISHU_IMPORT_ENDPOINTis 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=imaand configureIMA_OPENAPI_CLIENTIDandIMA_OPENAPI_APIKEYbefore syncing. - Use
mode=oncefor a single import run, ormode=syncto 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:
python3 -m scripts.knowledge_sync --destination obsidian --mode once --state .sync-state.json --vault-root /path/to/vault --markdown-path draft.md - Feishu validation / dry-run:
python3 -m scripts.knowledge_sync --destination feishu --mode once --state .sync-state.json --markdown-path draft.md --dry-run - Feishu real import: run the same draft through an OpenClaw host that exposes
openclaw-lark/feishu_create_doc/feishu_update_doc - Tencent IMA:
python3 -m scripts.knowledge_sync --destination ima --mode sync --state .sync-state.json --folder-path drafts/ - Disable one or more destinations: add
--disable obsidian,feishuto skip the selected targets when invoking the sync orchestrator.
Workflow
- Get content: use a browser for public-account links, prefer
xiaohongshu-mcpfor Xiaohongshu links, useweb_fetchfor other web pages, and process user-provided content directly - Normalize the source: use
scripts/import_sources.py,scripts/import_normalizer.py, andscripts/import_models.pyto build a sharedImportDraft - Check duplicates before final write: prefer URL + title + similarity checks, and treat duplicate hits as normal control flow
- Choose a destination:
scripts/knowledge_sync.pydispatches toobsidian,feishu, orima - Render or import:
scripts/obsidian_note.pygenerates the content and destination path, whilescripts/feishu_kb.pyandscripts/ima_kb.pybuild the sync payloads - Write or sync: runtime writes directly to
destination_pathfor Obsidian, or storesSyncStateRecordfor 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.pyto confirm Python and knowledge-base paths are available - For Feishu import, prefer the official OpenClaw
openclaw-larkplugin (feishu_create_doc/feishu_update_doc) and use Lark Markdown with<image url="..."/>/<file url="..." name="..."/> - For IMA import, use the direct OpenAPI
import_docflow withIMA_OPENAPI_CLIENTIDandIMA_OPENAPI_APIKEY
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 aSyncStateRecord-backed import result for Feishu/IMA - Frontmatter must include
title,aliases,tags,source_type,source_url,published,created,updated,importance,status, andcanonical_hash - 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_ROOTwhen 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 optionalfolder_id
WeChat Notes
- WeChat article links (
mp.weixin.qq.com) are a special case: default tobrowser, notweb_fetch - Prefer the container order documented in
references/wechat-import.mdwhen extracting正文 - For image extraction, prefer
data-src, thensrc, thendata-original/data_src/original - Preserve or add
from=appmsgon WeChat image URLs when needed - Normalize image fields before conversion when possible (treat resolved
data-srcas the finalsrc) - Strip common tail noise (scan prompts, 授权提示, 阅读原文引导) before final render
browser actwith evaluation must includefn; missingfnis a caller error, not a reason to improvise blindly
Xiaohongshu Notes
- Xiaohongshu links are a special case: default to
xiaohongshu-mcp, not genericweb_fetch - Prefer checking MCP status first when the workflow depends on local login/session
- Prefer
detailfor complete note content; usesearch→detailonly 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
images:
- path: /absolute/path/to/local.png
alt: Local image
- src: https://example.com/cover.png
alt: Remote image
- srcset: https://example.com/cover-1x.png 1x, https://example.com/cover-2x.png 2x
alt: Responsive image
path 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/, andtests/together - Prefer
openclaw skills install/openclaw skills updatefor native skill management, or install through ClawHub / bundle flows when packaging this repository for distribution - Keep the skill name as
knowledge-organizerso bundle-to-skill mapping stays stable across OpenClaw and Codex environments - Obsidian flows need a valid absolute vault root; prefer
OPENCLAW_KB_ROOTwhen it is available - Feishu sync depends on the official
openclaw-larkplugin being installed and configured, withfeishu_create_doc/feishu_update_docavailable in the OpenClaw host - Feishu placement envs such as
FEISHU_WIKI_SPACE,FEISHU_FOLDER_TOKEN,FEISHU_WIKI_NODE,FEISHU_KB_ID, andFEISHU_FOLDER_IDare 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-mcpbeing available before the workflow reaches structured note extraction - Tencent IMA sync depends on
IMA_OPENAPI_CLIENTIDandIMA_OPENAPI_APIKEY - This skill does not depend on legacy Chrome relay settings, deprecated
CLAWDBOT_*/MOLTBOT_*env names, or removed OpenClaw plugin SDK shims
Project Links
- GitHub repository: https://github.com/cjke84/knowledge-organizer
Output Template
✅ Stored in knowledge base
📁 Location: knowledge-base/xxx.md
🏷️ Tags: tag1, tag2, tag3
📋 Summary: one-sentence summary
⭐ Importance: core
🔗 Related notes: xxx, yyy
Related skills
- Downloads
- 1.1kAll time
- Security audit
- Review
- Last updated
- 6mo ago
- Current version
- v0.1.2
- License
- MIT-0
