← 返回 Skills 市场
ink-kai

Feishu Sync Obsidian Local

作者 kai · GitHub ↗ · v1.2.1 · MIT-0
cross-platform ⚠ suspicious
116
总下载
0
收藏
1
当前安装
4
版本数
在 OpenClaw 中安装
/install feishu-sync-obsidian-local
功能描述
将飞书 Wiki 文档同步到 Obsidian PARA 知识库。 触发:当用户说"同步飞书"或"同步文档"时使用。 遵循 Pipeline 模式,4 步顺序执行,带硬检查点。 必需文件:vault 根目录必须有 SYNC-RULES.md。
使用说明 (SKILL.md)

Feishu → Obsidian PARA Sync

模式:Pipeline | 数据源和目标路径从 SYNC-RULES.md 读取


核心设计

内容获取由 Agent 的 feishu_fetch_doc 工具完成,Python 脚本只做路径构建和文件写入。 这样无需在脚本里管理 Access Token,也不需要在 clawhub 发布时携带敏感权限。


硬性规则

禁止跳过步骤。禁止在用户确认前进入下一步。


Step 1 — 前置检查 + 获取 Wiki 节点(并行遍历)

触发:用户要求同步飞书文档

1a. 前置检查

  1. 检查 vault 根目录是否存在 SYNC-RULES.md
    • 不存在 → 触发初始化流程
  2. 读取 SYNC-RULES.md 中的「数据源」表格

1b. 获取 Wiki 根节点

使用 feishu_wiki_space_node 工具获取每个 Wiki 的根节点。

1c. 并行遍历子节点

对于 has_child: true 的节点,并行获取子节点:

  • 每个 has_child 节点分配一个并行任务
  • 各分支同时请求,不等待串行
  • 递归直到所有分支都没有子节点
个人成长 (root)
├── 2026-03 (has_child) ──────┐
│   └── 7个子节点              │ 并行遍历
├── 软考笔记 (has_child) ──────┼
│   └── 4个课程文件夹          │ 并行遍历
├── Obsidian 整理报告
└── 辞职决策记录

openclaw知识库 (root)
├── 11个文档节点(部分有子节点)  并行遍历

1d. 生成同步计划

将完整节点列表传给 sync.py --plan,获取待写入文件清单:

echo '[节点JSON]' | python3 sync.py --stdin --plan

输出

  • need_fetch:需要 Agent fetch 内容的 docx 文档
  • no_fetch_needed:只写占位符的非 docx 类型

Gate:显示节点总数、来源 Wiki、待写入文件数,问用户确认是否继续。


Step 2 — 确认同步路径

触发:Step 1 确认后

执行sync.py --plan 已输出每个文件的 relative_pathfilename,显示路径映射表。

Gate:显示写入路径映射表,确认是否继续。


Step 3 — 获取文档内容并写入 Obsidian

触发:Step 2 确认后

3a. Agent fetch 内容

need_fetch 中的每个文档,调用 feishu_fetch_doc 获取正文。

3b. 批量写入

将「文档信息 + fetch 到的内容」传给 sync.py --write

echo '[{"title":"...","obj_token":"...","content":"...",...}]' \
  | python3 sync.py --stdin --write [--dry-run]

frontmatter 生成规则

  • 基础字段:datelastmoddraftcategoriestags
  • 飞书扩展字段:无条件追加feishu_doc_tokenfeishu_wikifeishu_node_token
  • feishu_doc_token 用于去重,已存在则跳过

目录自动创建

relative_path 目录不存在时,自动创建。

Gate:显示将写入的文件列表,确认后执行。


Step 4 — 质量检查

触发:Step 3 执行完成后

执行

  1. 加载 references/review-checklist.md
  2. 对照检查清单验证同步结果
  3. 报告检查结果

输出格式

【同步报告】
- 写入:X 个文档
- 跳过:X 个(已存在)
- 失败:X 个(错误信息)

初始化流程

触发:vault 缺少 SYNC-RULES.md

执行

  1. 向用户说明缺少文件
  2. 生成默认版本(SYNC-RULES.md 模板)
  3. 展示给用户确认
  4. 用户确认后写入 vault 根目录
  5. 继续 Step 1

模板文件assets/sync-rules-template.md


参考文件

文件 作用
scripts/sync.py 纯路径构建 + 写入工具,双模式(--plan / --write)
assets/sync-rules-template.md SYNC-RULES.md 生成模板
assets/agents-template-additions.md AGENTS.md 补充章节
references/review-checklist.md 同步质量检查清单

已知限制

  • 电子表格(sheet)、多维表格(bitable)、思维导图(mindnote)只写链接占位符,不拉内容
  • 并行遍历依赖 subagent 能力,每个 has_child 分支可同时请求
  • Space ID 和目标路径从 SYNC-RULES.md 读取,修改配置后重新同步即可生效
安全使用建议
What to check before installing: - Inspect the Feishu-fetching agent tool (feishu_fetch_doc / feishu_wiki_space_node) that this skill expects: confirm it uses least-privilege credentials and that tokens are stored/used safely. The sync script does not perform API calls itself. - Search the skill files for any hard-coded tokens/IDs (references/archive/para-mapping-legacy.md contains an app_token and table_id). Treat those as potentially sensitive; verify whether they are valid and rotate/revoke if they are real and you don't control them. - Consider the privacy of storing feishu_doc_token and feishu_node_token in Obsidian frontmatter: if your vault is synced to cloud services or shared, these identifiers/tokens could be exposed. If that is a concern, modify the frontmatter policy or strip tokens after de-duplication. - Note SKILL.md/assets claim automatic actions (appending to AGENTS.md, weekly systemd timer). The provided code does not implement automatic install or timers — do not assume auto-scheduling will be set up without an explicit install step you review. - Test in dry-run mode on a disposable vault (use --dry-run or a test VAULT_DIR) to confirm behavior and that file paths/duplicates are handled as expected. - Backup your vault before first run and review /tmp/feishu-sync-obsidian/sync_state.json for any retained state; clear sensitive state if needed. Given these inconsistencies and the presence of embedded tokens in reference files, proceed only after verifying the agent fetch tool and removing or verifying any hard-coded tokens.
功能分析
Type: OpenClaw Skill Name: feishu-sync-obsidian-local Version: 1.2.1 The skill bundle is a legitimate tool for synchronizing Feishu (Lark) Wiki documents to an Obsidian vault. The Python script `scripts/sync.py` handles path construction and file writing using data provided via stdin, while delegating sensitive API calls and authentication to the agent's native tools. It includes appropriate safeguards such as filename sanitization, deduplication based on document tokens, and a multi-step 'pipeline' process in `SKILL.md` that requires user confirmation before execution. No evidence of data exfiltration, persistence, or malicious prompt injection was found.
能力标签
requires-oauth-token
能力评估
Purpose & Capability
The name/description match the included code: scripts/sync.py performs path construction and file writing, while content fetch is delegated to agent tools (feishu_fetch_doc / feishu_wiki_space_node). No external credentials or binaries are declared — which is consistent with the design that the agent tool (not this skill) holds Feishu API access. However, some bundled reference files embed an app_token/table_id (see references/archive/para-mapping-legacy.md), which is unexpected for a local sync tool and not used by the script.
Instruction Scope
SKILL.md directs the agent to read vault/SYNC-RULES.md, call agent fetch tools, and then call sync.py --plan/--write. Those instructions stay within the stated sync scope. Concerns: (1) SKILL.md and assets claim the skill will append a section to vault/AGENTS.md and set up an automatic weekly systemd timer, but there is no install step or code that performs those actions — this is an inconsistency and could mislead users about automatic behavior; (2) the frontmatter unconditionally includes feishu_doc_token and feishu_node_token — storing these tokens in vault files may expose them if the vault is synced publicly or to third-party services.
Install Mechanism
No install spec (instruction-only) and the Python script is included in the bundle. No downloads or archive extraction are performed. This is low-risk from an installer perspective.
Credentials
The skill declares no required env vars or credentials and the script only optionally reads VAULT_DIR. That is coherent because content fetch is delegated to agent tools. Nevertheless, the package includes an apparent Feishu app_token and table_id inside references (not used by the script) — this is unexpected and may be sensitive. Also, persisting feishu_doc_token into frontmatter means Feishu tokens/IDs will be stored in the vault; if that vault is backed up or synced externally, tokens/identifiers may be exposed.
Persistence & Privilege
always is false and autonomous invocation is allowed (platform default). The skill will create files and directories inside the user's vault and uses /tmp for sync_state — expected for its purpose. The earlier claim about automatic weekly systemd timer is not implemented in provided code; if the agent or user config sets up scheduled runs, that increases how often tokens/data may be accessed, so confirm scheduling behavior before enabling automation.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-sync-obsidian-local
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-sync-obsidian-local 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.1
修复路径前缀bug:relative_path现在包含完整目标路径(02WIKI/00原料池/飞书文档/...),之前只包含wiki内相对路径
v1.2.0
移除API调用依赖:内容获取全由Agent feishu_fetch_doc完成,Python脚本退化为纯路径构建+写入工具,双模式(--plan/--write)
v1.1.0
目录结构保留、lark-table修复、软考笔记冲突修复、.trash排除
v1.0.0
feishu-sync-obsidian-local 1.0.0 - 首发版本:支持将飞书 Wiki 文档同步到 Obsidian PARA 知识库。 - 采用 4 步 Pipeline 流程,设有硬性用户确认检查点。 - 支持匹配 PARA 路由规则并自动归类到指定目录。 - 文档同步包含 frontmatter 生成与内容去重。 - Sheet/bitable 类型仅写入链接占位符,不拉取内容。 - 提供同步后质量自检及问题报告。
元数据
Slug feishu-sync-obsidian-local
版本 1.2.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 4
常见问题

Feishu Sync Obsidian Local 是什么?

将飞书 Wiki 文档同步到 Obsidian PARA 知识库。 触发:当用户说"同步飞书"或"同步文档"时使用。 遵循 Pipeline 模式,4 步顺序执行,带硬检查点。 必需文件:vault 根目录必须有 SYNC-RULES.md。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 116 次。

如何安装 Feishu Sync Obsidian Local?

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

Feishu Sync Obsidian Local 是免费的吗?

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

Feishu Sync Obsidian Local 支持哪些平台?

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

谁开发了 Feishu Sync Obsidian Local?

由 kai(@ink-kai)开发并维护,当前版本 v1.2.1。

💬 留言讨论