lark-sheets▌
larksuite/cli · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
CRITICAL — 开始前 MUST 先用 Read 工具读取 ../lark-shared/SKILL.md,其中包含认证、权限处理
sheets (v3)
CRITICAL — 开始前 MUST 先用 Read 工具读取 ../lark-shared/SKILL.md,其中包含认证、权限处理
快速决策
- 按标题或关键词找云空间里的表格文件,先用
lark-cli docs +search。 docs +search会直接返回SHEET结果,不要把它误解成只能搜文档 / Wiki。- 已知 spreadsheet URL / token 后,再进入
sheets +info、sheets +read、sheets +find等对象内部操作。
核心概念
文档类型与 Token
飞书开放平台中,不同类型的文档有不同的 URL 格式和 Token 处理方式。在进行文档操作(如添加评论、下载文件等)时,必须先获取正确的 file_token。
文档 URL 格式与 Token 处理
| URL 格式 | 示例 | Token 类型 | 处理方式 |
|---|---|---|---|
/docx/ |
https://example.larksuite.com/docx/doxcnxxxxxxxxx |
file_token |
URL 路径中的 token 直接作为 file_token 使用 |
/doc/ |
https://example.larksuite.com/doc/doccnxxxxxxxxx |
file_token |
URL 路径中的 token 直接作为 file_token 使用 |
/wiki/ |
https://example.larksuite.com/wiki/wikcnxxxxxxxxx |
wiki_token |
⚠️ 不能直接使用,需要先查询获取真实的 obj_token |
/sheets/ |
https://example.larksuite.com/sheets/shtcnxxxxxxxxx |
file_token |
URL 路径中的 token 直接作为 file_token 使用 |
/drive/folder/ |
https://example.larksuite.com/drive/folder/fldcnxxxx |
folder_token |
URL 路径中的 token 作为文件夹 token 使用 |
Wiki 链接特殊处理(关键!)
知识库链接(/wiki/TOKEN)背后可能是云文档、电子表格、多维表格等不同类型的文档。不能直接假设 URL 中的 token 就是 file_token,必须先查询实际类型和真实 token。
处理流程
-
使用
wiki.spaces.get_node查询节点信息lark-cli wiki spaces get_node --params '{"token":"wiki_token"}' -
从返回结果中提取关键信息
node.obj_type:文档类型(docx/doc/sheet/bitable/slides/file/mindnote)node.obj_token:真实的文档 token(用于后续操作)node.title:文档标题
-
根据
obj_type使用对应的 APIobj_type 说明 使用的 API docx新版云文档 drive file.comments.*、docx.*doc旧版云文档 drive file.comments.*sheet电子表格 sheets.*bitable多维表格 bitable.*slides幻灯片 drive.*file文件 drive.*mindnote思维导图 drive.*
查询示例
# 查询 wiki 节点
lark-cli wiki spaces get_node --params '{"token":"wiki_token"}'
返回结果示例:
{
"node": {
"obj_type": "docx",
"obj_token": "xxxx",
"title": "标题",
"node_type": "origin",
"space_id": "12345678910"
}
}
资源关系
Wiki Space (知识空间)
└── Wiki Node (知识库节点)
├── obj_type: docx (新版文档)
│ └── obj_token (真实文档 token)
├── obj_type: doc (旧版文档)
│ └── obj_token (真实文档 token)
├── obj_type: sheet (电子表格)
│ └── obj_token (真实文档 token)
├── obj_type: bitable (多维表格)
│ └── obj_token (真实文档 token)
└── obj_type: file/slides/mindnote
└── obj_token (真实文档 token)
Drive Folder (云空间文件夹)
└── File (文件/文档)
└── file_token (直接使用)
操作流程(重要):
-
create — 创建筛选
- 用于首次创建筛选
- ⚠️ range 必须覆盖所有需要筛选的列(如 B1:E200)
- 如果已有筛选存在,再用 create 会覆盖整个筛选
-
update — 更新筛选
- 用于在已有筛选上添加/更新指定列的条件
- 只需指定 col 和 condition,不需要 range
-
delete — 删除筛选
-
get — 获取筛选状态
多列筛选示例:
创建媒体名称(B列)和情感分析(E列)的双重筛选:
# 1. 删除现有筛选(如有)
lark-cli sheets spreadsheet.sheet.filters delete \
--params '{"spreadsheet_token":"<spreadsheet_token>","sheet_id":"<sheet_id>"}'
# 2. 创建第一个筛选,range 覆盖所有要筛选的列
lark-cli sheets spreadsheet.sheet.filters create \
--params '{"spreadsheet_token":"<spreadsheet_token>","sheet_id":"<sheet_id>"}' \
--data '{"col":"B","condition":{"expected":["xx"],"filter_type":"multiValue"},"range":"<sheet_id>!B1:E200"}'
# 3. 添加第二个筛选条件
lark-cli sheets spreadsheet.sheet.filters update \
--params '{"spreadsheet_token":"<spreadsheet_token>","sheet_id":"<sheet_id>"}' \
--data '{"col":"E","condition":{"expected":["xx"],"filter_type":"multiValue"}}'
常见错误:
Wrong Filter Value:筛选已存在,需要先 delete 再 createExcess Limit:update 时重复添加同一列条件
Shortcuts(推荐优先使用)
Shortcut 是对常用操作的高级封装(lark-cli sheets +<verb> [flags])。有 Shortcut 的操作优先使用。
| Shortcut | 说明 |
|---|---|
+info |
View spreadsheet and sheet information |
+read |
Read spreadsheet cell values |
+write |
Write to spreadsheet cells (overwrite mode) |
+append |
Append rows to a spreadsheet |
+find |
Find cells in a spreadsheet |
+create |
Create a spreadsheet (optional header row and initial data) |
+export |
Export a spreadsheet (async task polling + optional download) |
API Resources
lark-cli schema sheets.<resource>.<method> # 调用 API 前必须先查看参数结构
lark-cli sheets <resource> <method> [flags] # 调用 API
重要:使用原生 API 时,必须先运行
schema查看--data/--params参数结构,不要猜测字段格式。
spreadsheets
create— 创建电子表格get— 获取电子表格信息patch— 修改电子表格属性
spreadsheet.sheet.filters
create— 创建筛选delete— 删除筛选get— 获取筛选update— 更新筛选
spreadsheet.sheets
find— 查找单元格
权限表
| 方法 | 所需 scope |
|---|---|
spreadsheets.create |
sheets:spreadsheet:create |
spreadsheets.get |
sheets:spreadsheet.meta:read |
spreadsheets.patch |
sheets:spreadsheet.meta:write_only |
spreadsheet.sheet.filters.create |
sheets:spreadsheet:write_only |
spreadsheet.sheet.filters.delete |
sheets:spreadsheet:write_only |
spreadsheet.sheet.filters.get |
sheets:spreadsheet:read |
spreadsheet.sheet.filters.update |
sheets:spreadsheet:write_only |
spreadsheet.sheets.find |
sheets:spreadsheet:read |
How to use lark-sheets on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add lark-sheets
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches lark-sheets from GitHub repository larksuite/cli and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate lark-sheets. Access the skill through slash commands (e.g., /lark-sheets) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.7★★★★★74 reviews- ★★★★★Ishan Shah· Dec 20, 2024
Keeps context tight: lark-sheets is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Dhruvi Jain· Dec 16, 2024
lark-sheets reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Nia Mensah· Dec 16, 2024
I recommend lark-sheets for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Carlos Menon· Dec 16, 2024
lark-sheets reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Min Rahman· Dec 12, 2024
lark-sheets fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Kabir Anderson· Dec 8, 2024
lark-sheets has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★James Taylor· Dec 4, 2024
lark-sheets has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Nia Kim· Nov 11, 2024
Solid pick for teams standardizing on skills: lark-sheets is focused, and the summary matches what you get after install.
- ★★★★★Ishan Desai· Nov 11, 2024
We added lark-sheets from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Oshnikdeep· Nov 7, 2024
I recommend lark-sheets for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 74