SkillsGrove
SkillsGrove/생산성/cklxx/elephant.ai/feishu-cli

feishu-cli

설치

$npx skills add https://github.com/cklxx/elephant.ai --skill feishu-cli
$git clone --depth 1 https://github.com/cklxx/elephant.ai.git /tmp/elephant.ai && mkdir -p ~/.claude/skills && cp -r /tmp/elephant.ai/skills/feishu-cli ~/.claude/skills/feishu-cli
이 Agent Skill을 설치해 주세요: https://github.com/cklxx/elephant.ai/tree/bc94628f41b7daba20825b86069ae8e0fa83dc5e/skills/feishu-cli — 먼저 SKILL.md와 스크립트를 읽고, 안전하다고 확인한 뒤에만 제 skills 폴더에 설치해 주세요.

요약

원문 설명 · MITWhen the agent needs to call 飞书/Lark APIs locally → unified CLI (auth/tool/api/help) with progressive disclosure.
아래 SKILL.md는 cklxx/elephant.ai(커밋 bc94628)에서 MIT 라이선스에 따라 게시한 것입니다. 본문은 변경하지 않았으며, 파일 상단의 메타데이터만 생략하고 이미지는 링크로 표시하며 매우 긴 파일은 일부만 표시합니다. Copyright 2025 cklxx. 라이선스: LICENSE. 지침 파일만 표시되며 스크립트 등은 원본 저장소를 참고하세요.

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 get_user, search_user, list_departments
doc create, read, read_content, write_markdown, list_blocks, update_block_text
wiki list_spaces, list_nodes, create_node, get_node
drive list_files, upload, download
sheets create, get, list_sheets
mail list_mailgroups, list_members
meeting create, list, get, update, delete
okr list_periods, batch_get, list_user_okrs
bitable list_tables, list_fields, list_records, create_record, update_record, delete_record
message send_message, history, upload_file
task list, create, update, delete, complete, uncomplete, list_subtasks, create_subtask

别名兼容:旧名 create_spreadsheet→create,get_spreadsheet→get,list_okr_periods→list_periods,batch_get_okrs→batch_get 均已配置别名,可正常调用但文档以新名为准。

统一环境变量(建议)

  • LARK_APP_ID
  • LARK_APP_SECRET
  • LARK_TENANT_TOKEN(可选,优先直用)
  • LARK_OPEN_BASE_URL(可选)
  • LARK_OAUTH_REDIRECT_URI(OAuth)
  • LARK_OAUTH_REDIRECT_ALLOWLIST(OAuth 预检)
  • LARK_OAUTH_SCOPES(OAuth 默认 scope)
라이선스 전문 보기(MIT)
MIT License

Copyright (c) 2025 cklxx

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.