markdown-larkdoc-sync

markdown-larkdoc-sync is a skill for Codex from Piasy/lark-skills. It costs 52 tokens per session (1,351 once invoked), scanned A, original, MIT.

A controlled workflow for manually synchronising one Markdown file with its linked Feishu document, a collaborative document in Lark’s productivity suite.

In plain words
What is it for?
Use it to fetch the linked document, compare and transfer Markdown content, convert Mermaid diagrams into Feishu text drawings, resolve comments, and create a dedicated sync commit.
Why use it?
It keeps the two versions aligned while checking Git history, resolving comments, and verifying the written-back content.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions subagents.

Good fit Use it to fetch the linked document, compare and transfer Markdown content, convert Mermaid diagrams into Feishu text drawings, resolve comments, and create a dedicated sync commit.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/piasy/lark-skills/markdown-larkdoc-sync
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Piasy/lark-skills --skill markdown-larkdoc-sync
Clone the repo
git clone --depth 1 https://github.com/Piasy/lark-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for markdown-larkdoc-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/piasy/lark-skills/markdown-larkdoc-sync.svg)](https://agentmods.dev/skills/piasy/lark-skills/markdown-larkdoc-sync)
Your own site
<a href="https://agentmods.dev/skills/piasy/lark-skills/markdown-larkdoc-sync"><img src="https://agentmods.dev/badge/skills/piasy/lark-skills/markdown-larkdoc-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,351 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.01351
Opus 5 $0.00026 $0.00675
Sonnet 5 $0.00010 $0.00270
Haiku 4.5 $0.00005 $0.00135

Measured 8d ago against content hash 3c0331b3a742, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

markdown-larkdoc-sync scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 20 executable files (bin/create_bootstrap_doc.py, bin/create_sync_commit.py, bin/extract_markdown_body.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/markdown-larkdoc-sync/SKILL.md · 67 lines

What it actually says

markdown-larkdoc-sync

开始前先确认:

  • 只支持一个手动触发的同步工作流。
  • 每次只处理一篇明确指定的 Markdown 文件。
  • frontmatter 是受限子集,绑定读写必须走脚本。
  • 一致性审校必须由独立 sub-agent 执行,且 sub-agent 使用与父 agent 相同的模型配置。
  • 成功收尾时要解决全部未解决评论,并创建专用 sync commit。
  • Mermaid 特殊约束:飞书正文中必须落地为“文本绘图 add-on(codeChart)”,不能保留 whiteboard 块。

执行约束:

  • 确定性结构化步骤优先调用仓库脚本,不要在 prompt 中手写 Git 或 Lark 解析逻辑。
  • bin/resolve_doc_key.pybin/find_last_sync_commit.pybin/extract_markdown_body.pybin/fetch_open_comments.pybin/fetch_remote_markdown.pybin/write_back_and_verify.pybin/resolve_all_comments.pybin/create_sync_commit.pybin/create_bootstrap_doc.py 都应被视为工作流标准入口。
  • 调用 bin/find_last_sync_commit.py 时,第二个参数 doc_key 必须直接使用 bin/resolve_doc_key.py 输出中的 doc_key 原值。
  • doc_key 格式固定为 <file_type>:<resolved_doc_token>(示例:docx:KlpudvT7so6kfwxyzZsl0L9ogbg),不得手工改写成 docx/KlpudvT7so6kfwxyzZsl0L9ogbg 这类 / 分隔格式。
  • profile 必须使用本机可用的 lark-cli profile(通常为 appId),不要硬编码 default。可用值通过 lark-cli auth listlark-cli config show 确认。
  • 调用 bin/create_bootstrap_doc.py 时可以不传 --profile 让脚本自动选择;若传入的 --profile 不可用,脚本会按 active profile 或单 profile 自动回退,并在输出中标记 profile_resolution / profile_warning
  • 读取 frontmatter 绑定必须调用 bin/read_frontmatter_binding.py
  • 修改 frontmatter 绑定必须调用 bin/write_frontmatter_binding.py
  • 读取远端正文用于合并或落盘时,必须调用 bin/fetch_remote_markdown.py --canonical,禁止直接使用 docs +fetch 原始文本参与比较。
  • 回写飞书必须调用 bin/write_back_and_verify.py,并使用脚本内置的 overwrite 策略。
  • bin/write_back_and_verify.py 会先写占位符,再通过 raw docx block API 把 mermaid 占位符替换为文本绘图 add-on(block_type=40view=codeChart)。
  • 当本地包含 mermaid 代码块时,若回读仍出现 <whiteboard .../>,视为写回验证失败并中止 sync。
  • agent 不得手改 frontmatter。
  • agent 不得自行解析 frontmatter。
  • sync commit message 与 Markdown-Path trailer 中的 markdown_path 必须是相对于 git repo root 的相对路径,不得写入绝对路径或基于当前目录的非归一化路径。
  • 任何低置信合并、评论冲突、一致性审校失败、remote 漂移或写回验证失败,都要中止整次 sync。

执行顺序:

  1. 调用 bin/read_frontmatter_binding.py 读取绑定与正文。
  2. 调用 bin/resolve_doc_key.py
  3. 调用 bin/find_last_sync_commit.py,并直接复用上一步产出的 doc_key 参数。
  4. 调用 bin/fetch_remote_markdown.py --canonical 获取远端正文,并调用 bin/fetch_open_comments.py 获取当前全部未解决评论。
  5. 做正文三方合并。
  6. 把评论转成 review patch。
  7. 调用 sub-agent 做一致性审校。
  8. 调用 bin/write_back_and_verify.py 回写飞书并验证(含 mermaid->文本绘图 add-on 替换和 canonical 回读比对)。
  9. 调用 bin/resolve_all_comments.py,解决当前文档全部未解决评论。
  10. 调用 bin/create_sync_commit.py

首版建链(本地已有 Markdown,远端还没有文档)必须流程:

  1. 调用 bin/create_bootstrap_doc.py <markdown_path> --title <title> --identity <user|bot> [--profile <appId>] 创建初版飞书文档,并在脚本输出中确认 auto_normalized=truenormalized_verified=true
  2. 从输出中获取 doc_id / doc_url,并调用 bin/write_frontmatter_binding.py 写回 frontmatter 绑定;--profile 必须使用输出中的 effective_profile(不要继续写入无效 profile)。
  3. create_bootstrap_doc.py 返回非零或 normalized_verified=false,必须中止本次 sync,不得进入收尾步骤。
  4. 完成后按常规流程进入 bin/create_sync_commit.py 收尾。

收尾成功条件:

  • 飞书 canonical 正文与最终候选正文一致。
  • Mermaid 代码块在飞书中已落地为文本绘图 add-on(codeChart)。
  • 当前文档全部未解决评论均已解决。
  • 已创建专用 sync commit。

参考文档:

  • frontmatter 受限子集:references/frontmatter-subset.md
  • 安装与前置说明:references/installation.md
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 67 lines · 52 tokens per session scan A 3c0331b3a742

Subscribe to this mod's changes

markdown-larkdoc-sync is a skill published in the GitHub repository Piasy/lark-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 52 tokens to every session and 1,351 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

orbit-notion

Open Orbit briefing skill — selected by the Orbit pipeline when Notion is the user's only connected connector, or when the user explicitly scopes their daily digest to Notion. Pulls the past 24 hours of document edits, comments, mentions, and database row changes from the user's authenticated Notion connection and…

nexu-io/open-design · 117 tokens

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

baoyu-youtube-transcript

A tool for downloading the written captions, subtitles, chapter information, speaker labels, and cover image from a YouTube video using its URL or ID.

JimLiu/baoyu-skills · 107 tokens

feishu

Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.

Hmbown/CodeWhale · 33 tokens

read

Reads URLs and PDFs by fetching source content, defaulting to concise summaries for plain read requests and clean Markdown when asked to convert, save, quote, cite, or feed downstream work. Use when users ask in any language to read, fetch, check, summarize, quote, cite, convert, or save a URL or PDF. Not for local…

tw93/Waza · 78 tokens

overleaf-sync

A two-way connection between a local paper folder and Overleaf, a web-based LaTeX editor for writing research papers. It lets you move changes between the local files and the shared Overleaf project.

wanshuiyin/Auto-claude-code-research-in-sleep · 97 tokens