
feishu-cli-schema
飞书 OpenAPI 方法本地浏览 + 通用 API 透传调用。schema service.resource.method 三段式查路径/参数/scope(无需联网); feishu-cli api 直接调任意端点(v1.29+,覆盖 2500+ 未封装 API)。 当用户请求"飞书有没有 XX API"、"X API 的参数是什么"、"X 方法需要什么 scope"、 "OpenAPI 方法浏览"、"看 SDK 怎么调用"、"调一个没封装的飞书 API"时使用。 不适用:查在线最新 schema(请用 OpenAPI Explorer,本地元数据可能落后于飞书开放平台)。
- Installs
- 156
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/riba2534/feishu-cli --skill feishu-cli-schema- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads feishu-cli-schema automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
飞书 OpenAPI 浏览 + 调用技能
两个命令的组合拳:
feishu-cli schema—— 本地查询 OpenAPI 方法的 path/动词/参数/scope/文档链接(纯本地,无需 Token / 无需网络)feishu-cli api—— 直接调用任意飞书 OpenAPI 端点(v1.29+,自动鉴权 + 错误码翻译,覆盖未封装的 2500+ 端点)
典型工作流:schema list 发现 → schema get 看参数 + scope → feishu-cli auth check/login 补 scope → feishu-cli api 调用。
feishu-cli:如尚未安装,请前往 riba2534/feishu-cli 获取安装方式。
核心概念
路径格式:<service>.<resource>.<method>
| 段 | 含义 | 示例 |
|---|---|---|
| service | 业务域 | im / docs / drive / bitable / calendar / vc / mail / wiki / approval / sheets / slides / task / attendance / minutes |
| resource | 资源(可含 .,按最长前缀匹配) | messages / events / records / chat.members |
| method | 动作 | create / get / list / update / delete / patch |
按路径深度自动分发:
schema无参数 → 列出所有 serviceschema <service>→ 列出该 service 下所有 resource.methodschema <service>.<resource>→ 列出 resource 下的所有 methodschema <service>.<resource>.<method>→ method 详情(含 path / 参数 / scope / docUrl)
数据来源
编译期 embed 的 internal/registry/meta_data.json(约 690KB),与 auth check 等模块共用同一份元数据。当前覆盖 12 个 service:approval / attendance / calendar / drive / im / mail / minutes / sheets / slides / task / vc / wiki。
命令速查
1. 列出所有 service
feishu-cli schema
# 等价:
feishu-cli schema list
输出表格:name | version | resources 数 | title。
2. 列出某个 service 的所有方法
feishu-cli schema im # 列出 im 域全部 resource.method
feishu-cli schema list --service im # 等价(推荐用 list,语义更清楚)
feishu-cli schema list --service im --format json
pretty 输出按 resource 分组、列 HTTP verb + method 名 + description;json 输出扁平 {service, resource, method, path, httpMethod, description} 列表,方便 AI Agent 二次处理。
3. 列出 resource 下的方法
feishu-cli schema im.messages # messages 资源下所有 method
feishu-cli schema im.chat.members # 含点号的 resource(最长前缀匹配)
4. 查具体 method 详情
feishu-cli schema im.messages.delete
feishu-cli schema im.messages.delete --format json
pretty 输出包含:
- HTTP verb + 完整 URL path(
/open-apis/im/v1/messages/{message_id}) - 方法描述
- Parameters(含
path/query/required标记 + 类型 + 描述 + example) - Request Body(POST/PUT/PATCH/DELETE 才显示,含嵌套字段)
- Response Body
- Identity:
tenant (bot)/user(指明支持哪种 Token) - Scopes:调用所需权限点
- Docs:飞书开放平台官方文档链接
关键 flag
| flag | 作用 | 适用 |
|---|---|---|
--format pretty(默认) | 人类可读,表格 + 缩进字段树 | 终端阅读 |
--format json | 原始 JSON(不转义 HTML) | AI Agent 解析、脚本拼装 |
--service <name> | 仅 schema list 子命令,过滤 service | 等价 schema <service> |
常见用例
1. 找飞书有没有某个 API
feishu-cli schema list --service drive | grep -i comment
2. 拼调用前查参数
feishu-cli schema im.chats.create
# 然后用 feishu-cli api 或 feishu-cli chat create 调用
3. AI Agent 拿 JSON 推断调用
feishu-cli schema sheets.spreadsheets.create --format json
4. 确认某方法的 scope 要求
feishu-cli schema vc.meeting.get
# 看 Identity / Scopes 行即可
🔥 黄金搭档:schema 查 → api 调(v1.29+)
feishu-cli api <method> <path> 是 v1.29+ 的通用 OpenAPI 透传命令,配合 schema 形成完整闭环。
完整工作流
# Step 1: schema 查 path + scope + token 类型
feishu-cli schema im.chats.create
# 输出: POST /open-apis/im/v1/chats
# Identity: tenant (bot)
# Scopes: im:chat
# Step 2: scope 不够时补
feishu-cli auth check --scope "im:chat"
feishu-cli auth login --scope "im:chat" # 缺则补
# Step 3: 直接调(无需写代码 / 无需 curl)
feishu-cli api POST /open-apis/im/v1/chats \
--data '{"name":"测试群","description":"by feishu-cli api"}' \
--as bot
feishu-cli api 关键 flag
| Flag | 用途 |
|---|---|
--params '<json>' | Query 参数 |
--data '<json>' | Body(POST/PUT/PATCH) |
--data-file <path> | Body 从文件读(- 表示 stdin) |
--as bot|user|auto | 强制身份;auto = user 优先回退 bot |
--dry-run | 仅打印请求,不实际调 |
--format json|pretty|table|ndjson|csv | 响应渲染格式(指定后走内置渲染,覆盖默认 pretty) |
--jq '<expr>' | 内置 gojq 过滤响应(无需外部 jq) |
--raw | 原样输出(默认 pretty JSON) |
--include-headers | stderr 打印响应头 |
--output <file> / -o | 写入文件而非 stdout(-o 二进制下载与 --format/--jq 互斥,见 feishu-cli-api skill) |
--timeout <seconds> | 自定义超时(默认 30s) |
内置错误码翻译(v1.29+)
feishu-cli api 收到飞书业务错误时会自动打印中文解决方案,覆盖:
- 99991661/99991663/99991668/99991672/99991679/99991677 → Token 失效或权限不足
- 99991400 → 限流
- 230001/230002/230020 → scope 不足,提示
auth check --scope - 232033 → 外部群权限不足(提示切对外共享 App)
- 232011 → Bot/用户不在群
- 232006 → chat_id 无效
- 232025 → App 未启用 Bot 能力
URL 智能处理
- 自动剥
https://open.feishu.cn/larksuite.com/larkoffice.com前缀 - 自动补
/open-apis/前缀 - 自动拆 URL 里内嵌的
?query=string到 query 参数 - 自动忽略
#fragment
# 这几种等价:
feishu-cli api GET /open-apis/authen/v1/user_info --as user
feishu-cli api GET /authen/v1/user_info --as user
feishu-cli api GET https://open.feishu.cn/open-apis/authen/v1/user_info --as user
feishu-cli api GET 'https://xxx.feishu.cn/open-apis/authen/v1/user_info?foo=bar#hash' --as user
与 feishu-cli-shared skill 的关系
如要让其他工具(curl/Python)复用 token 而不通过本命令,用 feishu-cli auth token --as user/bot 导出 token 字符串(见 feishu-cli-auth skill)。
踩坑
- 路径过深会报错:
schema im.messages.delete.foo→路径过深: ...(多余片段: foo)。多写一层不会被静默吞掉。 - 路径不存在分级提示:未知 service / resource / method 都会列出该层的所有可用候选名,便于纠正。
- resource 含点号用最长前缀匹配:
im.chat.members.create会匹配 resource =chat.members、method =create,不必担心拆错。 - 只读不调 API:本命令永远不发起 HTTP 请求,不消耗任何配额,没有 token 过期顾虑。要真正调用见下方"何时转其他技能"。
- 覆盖范围 = 12 service:当前覆盖 approval / attendance / calendar / drive / im / mail / minutes / sheets / slides / task / vc / wiki;未含 docx / bitable(base) / contact / authen / board / okr / tenant / application 等业务域;如果
schema list里没列出,说明本地元数据未收录,请去飞书 OpenAPI Explorer 查在线最新版(或本项目对应的专用feishu-cli <模块>命令通常都已封装好)。 - JSON 输出不转义 HTML:
</>/&保留原样,便于直接吞进 jq / yq 管道。
何时转其他技能
| 需求 | 该用什么 |
|---|---|
| 调 API 而且本项目有对应业务命令 | feishu-cli <模块> 对应命令(msg / doc / bitable / drive…)—— 体验更好 |
| 调 API 但没对应业务命令 / 想直接走 OpenAPI | 本 skill 介绍的 feishu-cli api <method> <path>(v1.29+) |
| 给 curl/Python 拿 token | feishu-cli auth token --as user/bot(详见 feishu-cli-auth skill) |
| 查在线最新 schema、本地没收录 | 飞书 OpenAPI Explorer |
| 调"埋藏 API"(飞书文档站未收录) | 见 feishu-cli-toolkit/references/embedded-api-discovery.md,已知 6 个埋藏 API |
| 申请 scope / 登录拿 User Token | /feishu-cli-auth(auth check --scope 预检、auth login --domain --recommend 按业务域申请) |
| 发消息/文档/卡片等具体业务 | /feishu-cli-msg / /feishu-cli-read / /feishu-cli-card 等专用技能 |
FAQ
What does the feishu-cli-schema skill do?
飞书 OpenAPI 方法本地浏览 + 通用 API 透传调用。schema service.resource.method 三段式查路径/参数/scope(无需联网); feishu-cli api 直接调任意端点(v1.29+,覆盖 2500+ 未封装 API)。 当用户请求"飞书有没有 XX API"、"X API 的参数是什么"、"X 方法需要什么 scope"、 "OpenAPI 方法浏览"、"看 SDK 怎么调用"、"调一个没封装的飞书 API"时使用。 不适用:查在线最新 schema(请用 OpenAPI Explorer,本地元数据可能落后于飞书开放平台)。
How do I install feishu-cli-schema?
Run npx skills add https://github.com/riba2534/feishu-cli --skill feishu-cli-schema in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/feishu-cli-schema/ (personal) or .claude/skills/feishu-cli-schema/ (project).
Which AI agents can use feishu-cli-schema?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is feishu-cli-schema safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains feishu-cli-schema?
It is published by riba2534 in riba2534/feishu-cli. It has 156 recorded installs.
More from riba2534/feishu-cli
feishu-cli-toolkit
riba2534/feishu-cli
飞书轻量工具箱与分诊入口。仅在没有更专用 skill 时使用,主要覆盖普通电子表格、 日历/日程、任务/任务清单、基础文件/素材/评论、知识库、用户和部门查询、审批查询。 文档读写导入导出、云盘增强、多维表格、画板、消息/群聊、邮箱、搜索、权限、OAuth、 视频会议/妙记均优先使用对应 feishu-cli- 专用技能。 sheet filter-view/dropdown 优先用 feishu-cli-sheet;calendar suggestion/room-find/rsvp 优先用 feishu-cli-calendar。
feishu-cli-read
riba2534/feishu-cli
只读操作,不修改文档内容。读取飞书云文档、知识库内容或电子表格,分析文档结构。 支持普通 docx、普通 sheet、知识库 docx 和知识库 sheet。当用户请求"查看"、"阅读"、"分析"、"读取"、 "打开"、"read"、"view" 飞书文档、知识库或电子表格时使用。支持通过文档 ID、知识库 Token 或 URL 读取。 Markdown 仅作为分析中间态存放在 /tmp(不主动落地为用户文件);如需主动导出到本地路径请用 feishu-cli-export, 写入请用 feishu-cli-write。
feishu-cli-msg
riba2534/feishu-cli
飞书消息发送。发送消息(text/post/interactive 卡片等 10 种类型:text/post/image/file/audio/media/sticker/interactive/sharechat/shareuser;system 分割线 CLI 暂未直接支持,需用 feishu-cli api 透传)、回复消息、 转发/合并转发、消息加急、消息书签(flag 收藏/list/cancel)、下载消息资源(图片/文件)。 发送/回复/转发/加急默认 App Token(Bot 身份);msg flag 收藏/书签必需 User Token(im:feed.flag:read/write); msg resource-download 已登录时优先 User Token,未登录回落 App Token。 当用户明确请求通过飞书即时消息/Bot 消息发送、回复、转发、合并转发、加急、消息收藏/书签、 下载消息图片或文件时使用。邮件走 feishu-cli-mail;文档评论/共享权限走对应 skill。 注意:Reaction/Pin/获取消息详情/批量获取消息/话题回复/消息历史/搜索群聊/群聊管理, 以及消息删除(默认 App Token 用于 Bot 自撤回,可选 User Token 让管理员撤回他人) 请使用 feishu-cli-chat 技能。 发送 interactive 卡片时,先用 feishu-cli-card 构造 v2 JSON, 再回到本技能用 --msg-type interactive --content-file 发送。
feishu-cli-write
riba2534/feishu-cli
向飞书文档写入内容、创建新文档、新建空白文档。支持 doc import 从 Markdown 创建、 doc content-update 精准追加/覆盖/替换/插入/删除,doc add/update/delete 低层块操作, 以及图片/文件插入。当用户请求创建文档、写文档、更新文档、替换章节、插入章节、 删除章节、追加内容、覆盖文档、插入图片或文件时使用。
feishu-cli-export
riba2534/feishu-cli
将飞书文档、知识库文档或电子表格导出到本地。支持 docx/wiki/sheet 导出 Markdown, doc export 内嵌电子表格自动展开,图片/画板素材下载,以及 doc export-file 异步导出 PDF/Word/Excel。当用户请求导出文档、保存为 Markdown、导出 PDF/Word/Excel、下载文档图片、 导出表格或表格转 Markdown 时使用。本地导入请用 feishu-cli-import 或 feishu-cli-drive。
feishu-cli-import
riba2534/feishu-cli
从 Markdown 文件导入创建飞书文档。支持嵌套列表、Mermaid/PlantUML 图表自动转画板、 大表格智能处理(超过 9 行用 inserttablerow API 追加保持单 block,超过 9 列拆分保留首列)、公式、Callout 高亮块。 内置飞书侧渲染规范(references/doc-guide.md + references/mermaid-spec.md), 覆盖图表花括号/par 等语法限制、表格 9 行/列阈值、Callout 6 种颜色映射等飞书兼容性规则。 当用户请求"导入 Markdown"、"从 md 创建文档"、"从 md 文件创建文档"、"把 Markdown 转换到飞书"、 "上传 Markdown"、"Markdown 转飞书"、"md 导入"、"批量导入",或排查"飞书 Mermaid 渲染失败"、 "Callout 颜色不对"、"飞书表格被拆"、"飞书文档导入兼容性"等问题时使用。 注意:仅支持 Markdown 源文件导入为飞书文档。Markdown 表格创建电子表格请用 feishu-cli-toolkit 的 sheet import-md; DOCX/XLSX 导入为云文档请使用 feishu-cli-drive 的 drive import。
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。