PluginBench
Skill
Fail
Audit score 45

feishu-cli-toolkit

riba2534/feishu-cli

Lightweight Feishu CLI toolkit for spreadsheets, calendar, tasks, files, wiki, and user queries.

What is feishu-cli-toolkit?

A fallback skill covering general Feishu operations: spreadsheets, calendar events, tasks, file management, wiki, comments, approvals, and user/department lookups. Use specialized feishu-cli-* skills (read, write, drive, bitable, board, msg, card, chat, mail, vc, search, perm, auth) when available for their specific domains.

  • Read, write, import, and export spreadsheet data with Markdown support
  • Create and manage calendar events, search events, and check availability
  • Create tasks, subtasks, and task lists with member and reminder management
  • Upload, download, and manage files and media with automatic large-file handling
  • Query and manage wiki spaces, nodes, and members
  • Add, list, and resolve comments on documents

How to install feishu-cli-toolkit

npx skills add https://github.com/riba2534/feishu-cli --skill feishu-cli-toolkit
Prerequisites
  • Node.js and npm installed
  • Feishu app credentials (App ID and App Secret) or user authentication via `feishu-cli auth login`
  • Appropriate Feishu API scopes enabled for your app
Claude Code
Cursor
Windsurf
Cline

How to use feishu-cli-toolkit

  1. 1.Run `feishu-cli auth login` to authenticate with your Feishu account (optional; App Token used as fallback)
  2. 2.Identify the module you need using the triage table (sheet, calendar, task, file, wiki, comment, approval, user, dept)
  3. 3.Execute the corresponding command with required parameters (e.g., `feishu-cli sheet read <token> "A1:C10"`).
  4. 4.For complex operations, consult the detailed reference files (references/sheet-commands.md, references/calendar-commands.md, references/task-commands.md)
  5. 5.Use `--user-access-token` flag explicitly when User Token is required (approval task query, calendar rsvp, my_tasks)

Use cases

Good for
  • Bulk import spreadsheet data from Markdown or export tables for reporting
  • Schedule meetings and check calendar availability across team members
  • Create and track project tasks with subtasks and team assignments
  • Upload and download files programmatically with automatic chunking for large files
  • Organize knowledge base content across wiki spaces and nodes
Who it's for
  • Automation engineers building Feishu workflows
  • Project managers tracking tasks and calendars
  • Knowledge managers organizing wiki content
  • Developers integrating Feishu into CLI pipelines
  • Team leads querying organizational data

feishu-cli-toolkit FAQ

When should I use feishu-cli-toolkit vs. specialized skills?

Use toolkit as a fallback for general operations. Prefer specialized skills: feishu-cli-read/write for document I/O, feishu-cli-drive for cloud storage and large files, feishu-cli-bitable for multi-dimensional tables, feishu-cli-board for whiteboards, feishu-cli-msg/card/chat for messaging, and feishu-cli-auth for authentication details.

What's the difference between App Token and User Token?

App Token (Bot identity) is used by default for write operations and when not logged in. User Token is required for approval task queries, calendar RSVP, and personal document access. Run `feishu-cli auth login` to enable User Token, or pass `--user-access-token` explicitly.

How does file download handle large files?

When logged in, `feishu-cli file download` automatically uses User Token and HTTP Range requests to chunk downloads for files over 100MB, matching the behavior of feishu-cli-drive.

Why do I get a 'forbidden' error when accessing comments?

Personal cloud documents (owned by users) require User Token. Either run `feishu-cli auth login` first or pass `--user-access-token "u-xxxxx"`. App-owned documents need the app to be a collaborator.

Can I use toolkit for rich-text comments and wiki URL parsing?

No; use feishu-cli-drive for rich-text comments, wiki URL auto-resolution, and partial comments. Toolkit supports plain-text comments only.

Full instructions (SKILL.md)

Source of truth, from riba2534/feishu-cli.


name: feishu-cli-toolkit description: >- 飞书轻量工具箱与分诊入口。仅在没有更专用 skill 时使用,主要覆盖普通电子表格、 日历/日程、任务/任务清单、基础文件/素材/评论、知识库、用户和部门查询、审批查询。 文档读写导入导出、云盘增强、多维表格、画板、消息/群聊、邮箱、搜索、权限、OAuth、 视频会议/妙记均优先使用对应 feishu-cli-* 专用技能。 sheet filter-view/dropdown 优先用 feishu-cli-sheet;calendar suggestion/room-find/rsvp 优先用 feishu-cli-calendar。 argument-hint: <module> <command> [args] user-invocable: true allowed-tools: Bash(feishu-cli auth:), Bash(feishu-cli sheet:), Bash(feishu-cli calendar:), Bash(feishu-cli task:), Bash(feishu-cli tasklist:), Bash(feishu-cli file:), Bash(feishu-cli media:), Bash(feishu-cli comment:), Bash(feishu-cli wiki:), Bash(feishu-cli user:), Bash(feishu-cli dept:), Bash(feishu-cli approval:), Read, Write

飞书轻量工具箱

本技能是 fallback,不和专用技能抢职责。先分诊,再执行对应命令。

Token 策略(仅本 skill 涵盖范围)

类型行为
读类 + sheet 全家桶(sheet 所有读写命令、calendar list/get/event-search/freebusy/attendee list、task get/list/comment list/subtask list/tasklist get/list/tasks、file meta/stats/list/version list/get、download、wiki nodes/spaces 等)已 auth login 自动用 User Token,未登录回落 App Token(resolveOptionalUserTokenWithFallback)
写类(calendar create-event/update/delete/event-reply/attendee add、task create/update/delete/comment add/reminder add/...、tasklist create/delete/add-task/remove-task、wiki member add/remove)默认 App Token(Bot 身份),仅显式 --user-access-token 时切到 User(resolveOptionalUserToken)
必需 User Token(approval task query/approve/reject/transfer + instance get/cancel/cc、my_tasks、calendar rsvp)未登录直接报错(resolveRequiredUserToken / requireUserToken)

完整跨 skill 规则(含 search / chat / msg flag 等本 skill 范围外的命令)见 feishu-cli-auth 技能的"Token 解析策略"章节。

分诊

用户意图使用技能
读文档 / 导出 Markdownfeishu-cli-read / feishu-cli-export
创建、编辑、导入 Markdownfeishu-cli-write / feishu-cli-import
大文件上传、云盘异步导入导出、富文本评论、drive searchfeishu-cli-drive
多维表格 base/v3feishu-cli-bitable
画板、Mermaid/PlantUML 直接落板、SVG 管道feishu-cli-board
发送消息、卡片、群聊历史feishu-cli-msg / feishu-cli-card / feishu-cli-chat
邮件、会议/妙记、搜索、权限、认证对应 mail / vc / search / perm / auth skill

模块速查

模块常用命令详细参考
电子表格 Sheetsheet create/get/read/write/append/import-md/export、V3 富文本references/sheet-commands.md
日历日程calendar list/get/primary/create-event/list-events/get-event/update-event/delete-event/event-search/freebusyreferences/calendar-commands.md
任务 / 清单task create/complete/delete、task subtask/member/reminder/comment、tasklistreferences/task-commands.md
基础群创建chat create/linkreferences/chat-commands.md
基础文件file list/mkdir/move/copy/delete/download/upload/version/meta/stats本文件
素材media upload/download本文件
评论comment list/add/delete/resolve/unresolve、comment reply本文件
知识库wiki get/update/export/spaces/nodes/space-get/member本文件
审批approval get、approval task query(User Token 必需)本文件
用户/部门user info/search/list、dept get/children本文件

Sheet

普通电子表格读写和 Markdown 表格导入/导出:

feishu-cli sheet create --title "数据表"
feishu-cli sheet read <token> "A1:C10" --sheet-id <sheet_id>
feishu-cli sheet write <token> "A1:B2" --sheet-id <sheet_id> --data '[["姓名","分数"],["张三",95]]'
feishu-cli sheet import-md report.md --title "报表"
feishu-cli sheet export <token_or_url> --format markdown -o report.md

富文本、样式、图片、保护范围等细节见 references/sheet-commands.md。注意 sheet export 支持 /sheets/<token> URL。

Calendar

feishu-cli calendar list
feishu-cli calendar primary
feishu-cli calendar create-event --calendar-id <id> --summary "会议" \
  --start "2024-01-21T14:00:00+08:00" --end "2024-01-21T15:00:00+08:00"
feishu-cli calendar list-events <calendar_id> --start-time "2024-01-01T00:00:00+08:00"
feishu-cli calendar get-event <calendar_id> <event_id>
feishu-cli calendar update-event <calendar_id> <event_id> --summary "新标题"
feishu-cli calendar delete-event <calendar_id> <event_id>
feishu-cli calendar event-search --calendar-id <id> --query "周会"

更多参数见 references/calendar-commands.md。

Task / Tasklist

feishu-cli task create --summary "任务标题"
feishu-cli task complete <task_guid>
feishu-cli task subtask create <task_guid> --summary "子任务"
feishu-cli task member add <task_guid> --members ou_xxx --role assignee
feishu-cli tasklist create --name "项目清单"
feishu-cli tasklist tasks <tasklist_guid>

完整任务、成员、提醒、评论命令见 references/task-commands.md。

File / Media

基础文件和素材命令适合简单 App Token 场景;上传 resume、云盘 diff 用 feishu-cli-drive。

feishu-cli file list <folder_token>
feishu-cli file upload ./report.pdf --parent fldxxx
feishu-cli file download <file_token> -o ./report.pdf
feishu-cli file download <file_token> -o large.zip --timeout 30m       # 大文件可调超时
feishu-cli file mkdir "新文件夹" --parent fldxxx
feishu-cli media upload image.png --parent-type docx_image --parent-node <document_id>
feishu-cli media download <file_token> -o ./image.png

file download 已登录自动用 User Token(resolveOptionalUserTokenWithFallback,也可显式 --user-access-token)。用户身份下载走 raw HTTP,遇飞书大文件限制(100MB+)会自动用 HTTP Range 分片下载并合并——和 drive download 一致,因此 toolkit 即可处理用户态大文件,不必再绕 feishu-cli-drive。

Comment / Wiki

feishu-cli comment list <file_token> --type docx
feishu-cli comment add <file_token> --type docx --text "评论内容"
feishu-cli comment resolve <file_token> <comment_id> --type docx

feishu-cli wiki spaces
feishu-cli wiki nodes <space_id>
feishu-cli wiki get <node_token>
feishu-cli wiki update <node_token> --title "新标题"              # 改节点标题(仅 doc/docx/快捷方式;需 wiki:node:update)
feishu-cli wiki space-get <space_id>                              # 知识库基础信息(名称/类型/可见性/分享状态)
feishu-cli wiki member list <space_id>

# 高危:删除整个知识库(需 --yes 才会真删,缺 --yes 直接拒绝)
feishu-cli wiki delete-space <space_id> --yes                     # 自动轮询异步任务直至完成 / 超时

# v1.29+ 新增 ⭐
feishu-cli wiki space-create --name "新知识库" [--description "..."]      # 创建知识库
feishu-cli wiki space-list [--page-all] [--page-limit N] [-o json]         # 列出所有可见 space(默认仅第一页)
feishu-cli wiki node-copy --space-id <src> --node-token <node> \
  --target-space-id <dst> [--title "副本标题"]                              # 复制节点(也可用 --target-parent-node-token)

Comment 避坑

  • 报 1069302/1069303 forbidden = 当前 token 看不到这个文档的评论。
    • 个人云文档(owner 是 user)必须用 User Token:feishu-cli comment list <token> --type docx --user-access-token "u-xxxxx" 或先 feishu-cli auth login
    • 应用云文档(owner 是 App)可用 tenant token,但 App 必须是协作者
    • 外部群里的文档可能 232033(见 feishu-cli-chat/references/external-chat.md)
  • --user-access-token 是 comment 子命令的全局 flag(list/add/get/reply/resolve/unresolve 都支持),传入后所有 comment 操作走用户身份。

需要富文本评论、wiki URL 自动解析、局部评论时使用 feishu-cli-drive。

Approval / User / Dept

feishu-cli approval get <approval_code>
feishu-cli approval task query --topic todo -o json

feishu-cli user info ou_xxx
feishu-cli user search --email user@example.com
feishu-cli user list --department-id od_xxx
feishu-cli dept get <department_id>
feishu-cli dept children <department_id>

approval task query 需要 User Token;执行前可用 feishu-cli-auth 做 scope 预检。

执行前检查

  1. 不确定模块时先看上方分诊表。
  2. 涉及 User Token 的命令先运行 feishu-cli auth check --scope "<scope>"。
  3. 需要复杂参数时读取对应 references/*.md,不要把二级 reference 当成默认上下文。