Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
larksuite avatar

Lark Markdown

  • 302k installs
  • 15.9k repo stars
  • Updated July 28, 2026
  • larksuite/cli

lark-markdown is a CLI tool for creating, reading, editing, and comparing Markdown files stored in Lark (Feishu) Drive.

About

Create, view, edit, and compare Markdown files in Lark Drive. Fetch remote files, apply local patches, and overwrite with full content via lark-cli markdown commands.

  • Lark (Feishu) Markdown file operations: create, fetch, edit, patch, diff, overwrite files in Drive
  • Local patch-then-overwrite workflow for partial edits without downloading full file
  • Authentication via user or bot identity with Drive folder and Wiki node token support

Lark Markdown by the numbers

  • 302,122 all-time installs (skills.sh)
  • +13,216 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #10 of 690 Office & Documents skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

lark-markdown capabilities & compatibility

Capabilities
file creation · file editing · version comparison · partial updates
npx skills add https://github.com/larksuite/cli --skill lark-markdown

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs302k
repo stars15.9k
Security audit3 / 3 scanners passed
Last updatedJuly 28, 2026
Repositorylarksuite/cli

How do you edit Lark Drive Markdown from CLI?

Manage Markdown documents in Lark Drive from the command line with fetch-local-patch-overwrite workflows.

Who is it for?

Teams using Lark and Feishu who need to manage Markdown documents from the terminal.

Skip if: Teams not on Lark/Feishu or developers who only need local-repo Markdown with no cloud Drive sync.

When should I use this skill?

User needs to create, edit, fetch, or patch Markdown files in Lark Drive.

What you get

Synced Lark Drive `.md` files, patch diffs, version comparisons, and uploaded or overwritten Markdown documents.

  • patched Lark Drive markdown
  • diff reports
  • uploaded native .md files

By the numbers

  • Exposes 5 lark-cli markdown subcommands: +create, +fetch, +patch, +overwrite, +diff
  • Skill version 1.2.0 in larksuite/cli repo

Files

SKILL.mdMarkdownGitHub ↗

markdown (v1)

CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../lark-shared/SKILL.md`](../lark-shared/SKILL.md),其中包含认证、权限处理

快速决策

  • 身份:Markdown 文件通常属于用户云空间资源,优先使用 --as user。如为自动化场景,或应用已创建并持有目标文件权限,可按场景使用 --as bot。首次以 user 身份访问前执行 lark-cli auth login
  • markdown +create / +overwrite 失败时,先判断是不是身份和权限问题:bot 更常见的是 app scope 或目标目录 ACL,user 更常见的是用户授权或用户 ACL;不要不加判断地来回切身份重试。
  • 用户要上传、创建一个原生 `.md` 文件,使用 lark-cli markdown +create
  • 用户要比较原生 `.md` 文件的历史版本差异,或比较远端 Markdown 与本地草稿,使用 lark-cli markdown +diff
  • 用户要读取 Drive 里某个 `.md` 文件内容,使用 lark-cli markdown +fetch
  • 用户要对 Markdown 文件做局部文本替换 / 正则替换,优先使用 lark-cli markdown +patch
  • 用户要覆盖更新 Drive 里某个 `.md` 文件内容,使用 lark-cli markdown +overwrite
  • 用户要先拿 Markdown 文件的历史版本号,再做比较/下载/回滚,先用 `lark-drive`lark-cli drive +version-history
  • 用户要把本地 Markdown 导入成在线新版文档(docx),不要用本 skill,改用 `lark-drive`lark-cli drive +import --type docx
  • 用户要对 Markdown 文件做rename / move / delete / 搜索 / 权限 / 评论等云空间(云盘/云存储)操作,不要留在本 skill,切到 `lark-drive`
  • markdown +create / +overwrite 命中 missing scopepermission deniednot foundversion limit 时,默认停止重试并按报错 hint 处理;只有 rate limit 或临时网络错误才做有限重试。

核心边界

  • 本 skill 处理的是 Drive 中作为普通文件存储的 Markdown,不是 docx 文档
  • --name 和本地 --file 文件名都必须显式带 .md 后缀;不满足时 shortcut 会直接报错
  • --content 支持:
  • 直接传字符串
  • @file 从本地文件读取内容
  • - 从 stdin 读取内容
  • markdown +patch 的内部语义是:先完整下载 Markdown,再本地替换,再整文件覆盖上传
  • markdown +patch 不是服务端原子 patch;它是 CLI 侧编排出来的局部更新能力
  • markdown +patch 当前只支持单组 --pattern / --content
  • markdown +patch 替换后的最终内容不能为空;CLI 会拒绝上传空文件,因为 Drive 不支持零字节 Markdown,且空文件通常是误操作
  • --file 只接受本地 .md 文件路径

正则替换时要特别注意 --pattern 的转义:

# BAD: 未转义正则特殊字符,可能匹配到错误位置
lark-cli markdown +patch --file-token boxcnxxxx --regex --pattern "version (1.0)" --content "version (2.0)"

# GOOD: 显式转义括号和点号
lark-cli markdown +patch --file-token boxcnxxxx --regex --pattern "version \\(1\\.0\\)" --content "version (2.0)"

Shortcuts(推荐优先使用)

Shortcut 是对常用操作的高级封装(lark-cli markdown +<verb> [flags])。有 Shortcut 的操作优先使用。

Shortcut说明
`+create`Create a Markdown file in Drive
`+diff`Compare two remote Markdown versions, or compare remote Markdown against a local file
`+fetch`Fetch a Markdown file from Drive
`+patch`Patch a Markdown file in Drive via fetch-local-replace-overwrite
`+overwrite`Overwrite an existing Markdown file in Drive

参考

  • lark-shared — 认证和全局参数
  • lark-drive — Drive 文件管理、导入 docx、move/delete/search 等

Related skills

How it compares

Pick lark-markdown over generic Markdown skills when the source of truth is a native `.md` object in Lark Drive, not a Git-tracked file.

FAQ

What commands does lark-markdown use?

lark-markdown maps tasks to `lark-cli markdown` subcommands: `+create` for new Drive files, `+fetch` to read, `+patch` for targeted edits, `+overwrite` for full replacement, and `+diff` for version or draft comparison.

What must run before lark-markdown?

lark-markdown requires the `lark-cli` binary and instructs agents to read `lark-shared/SKILL.md` first for Lark authentication, identity switching, and permission handling before any Markdown operation.

Is Lark Markdown safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.