agentleFS
RoboZephyrRoboZephyr/lark-skills/skills/lark-doc-personal/SKILL.md

lark-doc-personal

Skill1 starsChanged 4 months agoMITView on GitHub

飞书个人版文档创建。接收 markdown 文件和标题,用 user 身份一步到位创建到你的个人云空间根目录。当任务面向飞书个人版账号(非企业版)发布文档时使用。

The file

Files
SKILL.md

Lark Doc Personal

通用能力 Skill:用 --as user 在飞书个人版直接创建文档,归属当前登录用户的个人云空间。 不做权限转移、不做消息投递、不依赖企业 bot —— 与企业版的 lark-doc-deliver 互不重叠。

为什么独立成一个 Skill

lark-doc-deliver 走的是 企业版 bot 流程:bot 创建 → transfer_owner 给员工 → bot 群发消息。 个人版没有"组织内员工"概念,bot 创建的文档会落在 app 云空间(用户 UI 不可见), 且 stay_put=true 后跨空间 move API(drive +move)会报 1061002 params error。 最干净的方案就是 --as user 一步到位,所以这里独立一个最小 Skill。

Prerequisites

依赖验证命令期望
lark-clilark-cli --version已安装
配置已初始化lark-cli auth status返回 appId
已 OAuth 登录lark-cli auth status 输出含 userOpenId个人账号已授权

如未登录,跑:

lark-cli auth login --domain docs,drive --no-wait --json
# 把返回的 verification_url 给用户,用户在浏览器输入 code 完成授权后:
lark-cli auth login --device-code <从上一步拿到的 device_code>

Input

参数说明示例
markdown_file要创建为飞书文档的本地 markdown 路径/Users/zephyr/Downloads/audit.md
title飞书文档标题作品集审查报告 (2026-05-19)
folder_token(可选)指定目标文件夹 token,缺省 = 个人云空间根目录nodcnHv5fk6WFgJHnAMiq78ewuS

Execution Flow

Step 1: 检查登录状态

lark-cli auth status

确认输出含 userOpenId。如无,按 Prerequisites 引导用户走 OAuth。

Step 2: 复制到工作目录(@file 仅支持相对路径)

cp <markdown_file> /tmp/lark_personal_temp.md
cd /tmp

Step 3: 创建文档

lark-cli docs +create \
  --title "<title>" \
  --content @lark_personal_temp.md \
  --doc-format markdown \
  --as user

如果调用方提供了 folder_token,在创建命令中同时加入 --parent-token "<folder_token>",直接创建到目标文件夹。

从输出 JSON 提取:

  • doc_url(优先路径:.data.document.url;兼容路径:.data.doc_url / .data.url)
  • document_id(优先路径:.data.document.document_id;兼容路径:.data.doc_id / .data.document_id)

Step 4: 清理

rm -f /tmp/lark_personal_temp.md

Step 5: 输出结果

doc_url: <doc_url>
document_id: <document_id>
owner: <userOpenId from auth status>

URL 形式可能是 www.feishu.cn/docx/...,实际也可用 my.feishu.cn/docx/... 打开(个人版默认 UI 域名)。 两个域名打开的是同一份文档。


Key Rules

  1. 始终用 --as user —— 个人版用 bot 创建会进 app 云空间(用户不可见),且 transfer + 跨空间 move 都不可行
  2. @file 仅支持相对路径 —— 一定要 cp 到 /tmp 后 cd /tmp 再调用
  3. 不要套用 lark-doc-deliver 的 transfer_owner 流程 —— 个人版 user 创建的文档默认就在用户云空间,无需转移
  4. 不发消息 —— 个人版 user_access_token 没有 bot 的 im:message 群发能力;如需通知用户,直接把 URL 给他

Troubleshooting

现象排查
missing required scope重跑 lark-cli auth login --domain docs,drive --no-wait --json 走 OAuth 加 scope
创建成功但用户 UI 看不到大概率是误用了 --as bot,文档落在 app 云空间。重新用 --as user 创建即可,老文档用 --as bot --yes 删
1061002 params error(move 时)文档在 app 云空间,跨空间 move 不支持。改为 --as user 重建
域名困惑www.feishu.cn 和 my.feishu.cn 都能打开同一份文档,飞书个人版 UI 默认走 my.feishu.cn

与 lark-doc-deliver 的差异

维度lark-doc-deliver(企业版)lark-doc-personal(个人版)
创建身份bot (tenant_access_token)user (user_access_token)
权限转移转给 doc_owner_open_ids 中的员工无需,user 创建即归属
消息投递bot 在群里/私聊发 markdown无(个人版不支持)
适用场景团队周报、技术评审等组织内分发个人文档归档、面向单一用户的交付
config 复杂度高(bot openid、成员列表、群 id)低(仅 app_id/secret + OAuth)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.