创建或更新飞书云文档,通过 Markdown 作为中间格式。支持 Mermaid/PlantUML 图表自动转飞书画板。
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionfeishu-cli-writeExecute the skills CLI command in your project's root directory to begin installation:
Fetches feishu-cli-write from riba2534/feishu-cli and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate feishu-cli-write. Access via /feishu-cli-write in your agent's command palette.
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 environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
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
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
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
1
total installs
1
this week
797
GitHub stars
0
upvotes
Run in your terminal
1
installs
1
this week
797
stars
创建或更新飞书云文档,通过 Markdown 作为中间格式。支持 Mermaid/PlantUML 图表自动转飞书画板。
feishu-cli:如尚未安装,请前往 riba2534/feishu-cli 获取安装方式。
前置条件:使用 App Token(应用身份),只需配置
FEISHU_APP_ID和FEISHU_APP_SECRET(环境变量或 config.yaml),无需auth login。
最简方式创建一个新的飞书云文档:
feishu-cli doc create --title "文档标题" --output json
创建后必须立即:
full_access 权限:
feishu-cli perm add <document_id> --doc-type docx --member-type email --member-id [email protected] --perm full_access --notification
feishu-cli perm transfer-owner <document_id> --doc-type docx --member-type email --member-id [email protected] --notification
Markdown 作为中间态:本地文档与飞书云文档之间通过 Markdown 格式进行转换,中间文件存储在 /tmp 目录中。
CRITICAL: 禁止对已有文档全量覆盖
绝对禁止对已有文档使用
doc import --document-id <id>全量覆盖!这会:
- 丢失所有划词评论(inline comments)
- 破坏画板/白板引用(变成空占位块)
- 丢失用户手动编辑的格式和内容
更新已有文档必须使用增量方式:
doc add(追加)、doc update(修改块)、doc delete(删除块)。doc import --document-id仅允许在用户明确要求全量替换时使用。
# 创建新文档
/feishu-write "文档标题"
# 更新已有文档
/feishu-write <document_id>
收集内容
生成 Markdown
/tmp/feishu_write_<timestamp>.md 创建 Markdown 文件python3 -c "d=open('<file.md>','rb').read(); assert b'\\xef\\xbf\\xbd' not in d, 'U+FFFD found'; d.decode('utf-8')" 同时检查 U+FFFD 替换字符和非法 UTF-8 字节。如果报错,必须修复后再导入飞书导入到飞书
feishu-cli doc import /tmp/feishu_write_<timestamp>.md --title "文档标题"
添加权限(可选,给指定用户添加 full_access)
full_access 是最高权限,包含:管理协作者、编辑内容、管理文档设置(复制/移动/删除)、查看历史版本、导出等全部能力。
feishu-cli perm add <document_id> --doc-type docx --member-type email --member-id [email protected] --perm full_access
通知用户
原则:只修改需要变更的部分,保留其余内容不动。优先使用 content-update 命令,一条命令精准定位并替换。
CRITICAL: 修改文档时禁止使用 append 模式
当用户要求"修改"、"更新"、"替换"、"编辑"文档中某段内容时,必须使用
replace_range或replace_all模式,精准定位并替换目标内容。禁止将整个文档内容重新 Append 到末尾!这会导致文档内容重复。
append模式仅在用户明确要求"追加新内容"、"在末尾加一段"时使用。
| 用户意图 | 推荐命令 | 说明 |
|---|---|---|
| 替换/修改/更新某个章节 | content-update --mode replace_range |
最常用,按标题定位后原地替换 |
| 在某个章节前/后插入新内容 | content-update --mode insert_before/insert_after |
精准插入,不影响已有内容 |
| 全文查找替换所有匹配 | content-update --mode replace_all |
批量替换 |
| 删除某个章节 | content-update --mode delete_range |
精准删除 |
| 在文档末尾追加新内容 | content-update --mode append |
仅追加新内容时使用 |
| 完全重写文档 | content-update --mode overwrite |
慎用,会丢失评论和画板 |
关键规则:
replace_range,禁止用 appendappendinsert_before 或 insert_afterdelete_range# 按标题定位并替换(从 H2 标题到下一个 H2,一条命令完成)
feishu-cli doc content-update <document_id> --mode replace_range \
--selection-by-title "## 旧章节标题" \
--markdown-file /tmp/feishu_new_section.md
# 也可以直接传 markdown 内容
feishu-cli doc content-update <document_id> --mode replace_range \
--selection-by-title "## 旧章节标题" \
--markdown "## 新章节标题\n\n更新后的内容"
# 在"目标章节"后面插入新内容
feishu-cli doc content-update <document_id> --mode insert_after \
--selection-by-title "## 目标章节" \
--markdown-file /tmp/feishu_insert.md
# 在"目标章节"前面插入新内容
feishu-cli doc content-update <document_id> --mode insert_before \
--selection-by-title "## 目标章节" \
--markdown "## 新增章节\n\n插入的内容"
仅在确实需要追加新内容到末尾时使用:
cat > /tmp/feishu_append.md << 'EOF'
## 新增章节标题
新增的内容...
EOF
feishu-cli doc content-update <document_id> --mode append \
--markdown-file /tmp/feishu_append.md
# 按标题定位并删除整个章节
feishu-cli doc content-update <document_id> --mode delete_range \
--selection-by-title "## 废弃章节"
# 按内容范围定位并删除
feishu-cli doc content-update <document_id> --mode delete_range \
--selection-with-ellipsis "开始段落...结束段落"
# 替换所有匹配的块
feishu-cli doc content-update <document_id> --mode replace_all \
--selection-with-ellipsis "旧文本" \
--markdown "新文本"
仅在需要精确控制单个块时使用:
# 1. 获取文档块结构,找到要修改的 block_id
feishu-cli doc blocks <document_id>
# 2. 更新指定块
feishu-cli doc update <document_id> <block_id> \
--content '{"update_text_elements":{"elements":[{"text_run":{"content":"更新后的文本"}}]}}'
何时允许全量覆盖:仅当用户明确说"重写整个文档"、"全量替换"时,才可使用
content-update --mode overwrite或doc import --document-id <id>。默认必须增量更新。
| 语法 | 飞书块类型 | 说明 |
|---|---|---|
# 标题 |
Heading1-6 | |
普通文本 |
Text | |
- 列表项 |
Bullet | 支持缩进嵌套 |
1. 有序项 |
Ordered | 支持缩进嵌套 |
- [ ] 任务 |
Todo | |
```code``` |
Code | |
```mermaid``` |
Board(画板) | 推荐使用 |
```plantuml``` / ```puml``` |
Board(画板) | PlantUML 图表 |
> 引用 |
QuoteContainer | 支持嵌套引用 |
> [!NOTE] 等 |
Callout(高亮块) | 6 种类型 |
--- |
Divider | |
**粗体** |
粗体样式 | |
*斜体* |
斜体样式 | |
~~删除线~~ |
删除线样式 | |
<u>下划线</u> |
下划线样式 | |
`行内代码` |
行内代码样式 | |
$公式$ |
行内公式 | 支持一段多个公式 |
$$公式$$ |
块级公式 | 独立公式行 |
[链接](url) |
链接 | |
| ` | 表格 | ` |
在文档中画图时,推荐使用 Mermaid(也支持 PlantUML),会自动转换为飞书画板。
支持的 Mermaid 图表类型:
Mermaid 限制(必须遵守,否则导入失败):
{} 花括号(如 {version}),会触发解析错误par...and...end 语法,飞书解析器完全不支持par 替代方案:改用 Note over X: 并行执行...示例:
```mermaid
flowchart TD
A[开始] --> B{判断}
B -->|是| C[处理]
B -->|否| D[结束]
```
```plantuml
@startuml
Alice -> Bob: Hello
Bob --> Alice: Hi
@enduml
```
在文档中使用 Callout 语法创建飞书高亮块:
> [!NOTE]
> 提示信息。
> [!WARNING]
> 警告信息。
> [!TIP]
> 技巧提示。
> [!CAUTION]
> 警示信息。
> [!IMPORTANT]
> 重要信息。
> [!SUCCESS]
> 成功信息。
Callout 内支持多行文本和子块(列表等)。
行内公式:圆面积 $S = \pi r^2$,周长 $C = 2\pi r$。
块级公式:
$$\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}$$
向文档添加空白画板:
# 在文档末尾添加画板
feishu-cli doc add-board <document_id>
# 在指定位置添加画板
feishu-cli doc add-board <document_id> --parent-id <block_id> --index 0
向文档添加高亮块:
# 添加信息类型 Callout
feishu-cli doc add-callout <document_id> "提示内容" --callout-type info
# 添加警告类型 Callout
feishu-cli doc add-callout <document_id> "警告内容" --callout-type warning
# 指定位置添加
feishu-cli doc add-callout <document_id> "内容" --callout-type error --parent-id <block_id> --index 0
Callout 类型与颜色映射:
飞书 Callout 共 6 种颜色。Markdown 导入(doc import)使用 [!TYPE] 语法支持全部 6 种,CLI 命令(doc add-callout --callout-type)支持其中 4 种:
| 颜色 | 背景色值 | Markdown 语法 | CLI --callout-type |
|---|---|---|---|
| 蓝色 | 6 | [!NOTE] |
info |
| 红色 | 2 | [!WARNING] |
error |
| 橙色 | 3 | [!CAUTION] |
— |
| 黄色 | 4 | [!TIP] |
warning |
| 绿色 | 5 | [!SUCCESS] |
success |
| 紫色 | 7 | [!IMPORTANT] |
— |
需要橙色(CAUTION)或紫色(IMPORTANT)时,请使用 Markdown 导入方式(
doc import或doc add --content-type markdown)。
批量更新文档中的块内容:
# 从 JSON 文件批量更新
feishu-cli doc batch-update <document_id> --source-type content --file updates.json
JSON 格式示例:
[
{
"block_id": "block_xxx",
"block_type": 2,
"content": "更新后的文本内容"
}
]
创建/更新完成后报告:
https://feishu.cn/docx/Make data-driven prioritization decisions faster
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
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ 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.
mattpocock/skills
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
pproenca/dot-skills
We added feishu-cli-write from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Registry listing for feishu-cli-write matched our evaluation — installs cleanly and behaves as described in the markdown.
feishu-cli-write fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Solid pick for teams standardizing on skills: feishu-cli-write is focused, and the summary matches what you get after install.
Registry listing for feishu-cli-write matched our evaluation — installs cleanly and behaves as described in the markdown.
We added feishu-cli-write from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
feishu-cli-write is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Keeps context tight: feishu-cli-write is the kind of skill you can hand to a new teammate without a long onboarding doc.
feishu-cli-write has been reliable in day-to-day use. Documentation quality is above average for community skills.
Useful defaults in feishu-cli-write — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
showing 1-10 of 25