skills/lark-docs/SKILL.md
Feishu/Lark document operations via lark-cli. Read, upload, import, export, and manage Feishu docs. Keywords: '飞书文档', '上传文档', '读飞书文档', 'lark cli', '导入文档', '导出文档', 'upload to feishu', 'feishu doc', 'lark doc', 'lark-cli', 'feishu.cn', '读文档'.
npx skillsauth add hs3180/disclaude lark-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
通过 lark-cli 操作飞书文档。所有命令使用 --as bot,token 由环境自动注入。
docs +fetch 读取| 操作 | 命令 |
|------|------|
| 读取文档 | docs +fetch --doc "$URL_OR_TOKEN" --as bot |
| 导入 MD | drive +import --file ./file.md --type docx --as bot |
| 上传文件 | drive +upload --file ./file.png --as bot |
| 导出文档 | drive +export --token $TOKEN --doc-type docx --file-extension pdf --as bot |
| 创建文件夹 | drive +create-folder --name "名称" --as bot |
| 通用 API | api GET /open-apis/xxx --params '{}' --as bot |
通用规则: --file 必须是相对路径(先 cd 到文件目录)。
bot 创建的文档用户无法访问,导入后必须授权:
lark-cli drive permission.members create \
--params '{"token":"'$DOC_TOKEN'","type":"docx","need_notification":false}' \
--data '{"member_type":"openid","member_id":"'$USER_OPEN_ID'","perm":"full_access"}' \
--as bot --yes
用 full_access 而非 transfer_owner:bot 保持 owner 保留全部权限,用户获得完整操作权限。
用户写自然 Markdown,Skill 自动处理图片插入。
Step 1: 解析 MD,提取本地图片路径,替换为文本标记
import re, os, json
md = open('report.md').read()
images = []
def replace(m):
alt, path = m.group(1), m.group(2)
if path.startswith(('http', 'data:')): return m.group(0)
abs_path = os.path.normpath(os.path.join(os.path.dirname('report.md'), path))
images.append({'path': abs_path, 'rel': path})
return f'\n\n[IMG:{path}]\n\n' # 路径本身作为标记,精准且自描述
md = re.sub(r'!\[([^\]]*)\]\(([^)]+)\)', replace, md)
md = re.sub(r'\n{3,}', '\n\n', md)
open('report_clean.md', 'w').write(md)
# images 列表后续用于逐张插入
Step 2: 导入转换后的 MD(不含图片语法,只有 [IMG:路径] 文本标记)
lark-cli docs +create --title "标题" --markdown @report_clean.md --as bot
# → 得到 DOC_ID
Step 3: 逐张插入图片并删除标记
# 对每张图片执行 2 步:插入 + 删除标记
lark-cli docs +media-insert --doc "$DOC_ID" \
--file ./charts/chart.png --type image \
--caption "图表说明" \
--selection-with-ellipsis "[IMG:./charts/chart.png]" \
--align center --as bot --before
lark-cli docs +update --doc "$DOC_ID" \
--mode delete_range \
--selection-with-ellipsis "[IMG:./charts/chart.png]" \
--as bot
Step 4: 授权用户(见上方授权模板)
[IMG:./charts/chart.png] 使用本地路径作为标记文本,精准且自描述--selection-with-ellipsis 精准匹配(路径不会与正文重复)--before 在标记前插入图片 → delete_range 删除标记 → 图片留在正确位置delete_range,否则标记文本残留在文档中--file 必须是相对路径,先 cd 到文件目录docs +fetch --scope outline 确认标记文本存在| 错误 | 原因 | 解决 |
|------|------|------|
| unsafe file path | --file 用了绝对路径 | cd 到目录后用 ./filename |
| permission denied | bot 文档用户无权限 | 调用 permission.members create |
| 1063001 (transfer_owner) | --data 字段嵌套了 | member_type/member_id 必须顶层 |
| --as bot not supported | 部分 search 命令仅支持 user | 改用 api 通用调用 |
--file 参数docs +fetch --as bot 直接导入期望图片出现 — 会变空白占位符,必须先替换为文本标记再插入delete_range 删除标记 — 标记文本会残留在文档中tools
--- name: issue-solver description: Issue Solver - creates a scheduled task to scan a GitHub repo for open issues, pick the best candidate, and submit a fix PR. Use when user wants to set up automated issue resolution. Keywords: "Issue Solver", "自动修 Bug", "solve issues", "issue solver", "issue solver 安装". allowed-tools: Read, Write, Edit, Bash, Glob, Grep --- # Issue Solver — Schedule 安装器 为指定 GitHub 仓库创建 Issue 扫描定时任务。将 schedule 模板实例化为可执行的 SCHEDULE.md。 **适用于**: 安装/配置 Issue Solver 定时任务 | **不适用于
testing
Dissolve a Feishu group chat and clean up associated resources. Use when a PR is merged/closed, a discussion is finished, or a group needs to be removed. Keywords: "解散群", "dissolve group", "删除群", "close group", "清理群".
data-ai
手气不错 — disclaude dogfooding skill. Randomly selects a real use case from disclaude's feature set, simulates a natural user interaction, and reports observations. Use when user says keywords like "手气不错", "随机测试", "feeling lucky", "dogfooding", "自我体验", "feeling-lucky".
tools
macOS screen/keyboard/mouse control via Accessibility API and CGEvent. Use when user wants to control desktop applications, automate UI interactions, take screenshots, click elements, type text (including Chinese), or manage windows on macOS. Triggers on keywords like 'Mac控制', '屏幕控制', '桌面自动化', 'Mac automation', 'screen control', 'click element', 'type text'.