modelscope.cn

feishu-cli

When the agent needs to call 飞书/Lark APIs locally → unified CLI (auth/tool/api/help) with progressive disclosure.

Installation

$ npx skills add https://modelscope.cn

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from modelscope.cn · top by installs.

npx skills add https://modelscope.cn

Browse all from modelscope.cn

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,230 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

feishu-cli

统一的飞书 CLI skill。通过一个运行时处理:

  • help 渐进式帮助(适配 LLM 自发现)
  • auth 授权与 token 管理
  • tool 业务动作(calendar/contact/doc/wiki/drive/sheets/mail/meeting/okr/bitable)
  • api 原始 Open API 调用

渐进式 help(推荐顺序)

# 1) 顶层命令总览
python3 skills/feishu-cli/run.py '{"action":"help"}'

# 2) 认证帮助
python3 skills/feishu-cli/run.py '{"action":"help","topic":"auth"}'

# 3) 查看全部模块
python3 skills/feishu-cli/run.py '{"action":"help","topic":"modules"}'

# 4) 查看某模块动作
python3 skills/feishu-cli/run.py '{"action":"help","topic":"module","module":"calendar"}'

# 5) 查看某动作参数与示例
python3 skills/feishu-cli/run.py '{"action":"help","topic":"action","module":"calendar","action_name":"create"}'

auth 示例

# 查看授权状态
python3 skills/feishu-cli/run.py '{"action":"auth","subcommand":"status"}'

# 获取租户 token(复用现有 lark_auth)
python3 skills/feishu-cli/run.py '{"action":"auth","subcommand":"tenant_token"}'

# 生成 OAuth URL(先做 redirect allowlist 预检)
python3 skills/feishu-cli/run.py '{"action":"auth","subcommand":"oauth_url","redirect_uri":"https://example.com/callback","scopes":["contact:user.base:readonly"]}'

tool 示例

# 创建日程
python3 skills/feishu-cli/run.py '{"action":"tool","module":"calendar","tool_action":"create","title":"周会","start":"2026-03-06 10:00","duration":"60m"}'

# 读取文档
python3 skills/feishu-cli/run.py '{"action":"tool","module":"doc","tool_action":"read","document_id":"doccnxxxx"}'

# 查询通讯录用户
python3 skills/feishu-cli/run.py '{"action":"tool","module":"contact","tool_action":"get_user","user_id":"ou_xxx"}'

api 示例

# 原始 Open API 调用(tenant)
python3 skills/feishu-cli/run.py '{"action":"api","method":"GET","path":"/contact/v3/scopes"}'

各模块动作速查

module 支持的 tool_action
calendar create, query, update, delete, list_calendars, freebusy
contact getuser, searchuser, list_departments
doc create, read, readcontent, writemarkdown, listblocks, updateblock_text
wiki listspaces, listnodes, createnode, getnode
drive list_files, upload, download
sheets create, get, list_sheets
mail listmailgroups, listmembers
meeting create, list, get, update, delete
okr listperiods, batchget, listuserokrs
bitable listtables, listfields, listrecords, createrecord, updaterecord, deleterecord
message sendmessage, history, uploadfile
task list, create, update, delete, complete, uncomplete, listsubtasks, createsubtask

别名兼容:旧名 createspreadsheetcreategetspreadsheetgetlistokrperiodslistperiodsbatchgetokrsbatchget 均已配置别名,可正常调用但文档以新名为准。

统一环境变量(建议)

  • LARKAPPID
  • LARKAPPSECRET
  • LARKTENANTTOKEN(可选,优先直用)
  • LARKOPENBASE_URL(可选)
  • LARKOAUTHREDIRECT_URI(OAuth)
  • LARKOAUTHREDIRECT_ALLOWLIST(OAuth 预检)
  • LARKOAUTHSCOPES(OAuth 默认 scope)