← 返回 Skills 市场
feishu-doc-long-content
作者
Josephyb97
· GitHub ↗
· v1.0.0
711
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install feishu-doc-long-content
功能描述
Create Feishu Docs by first creating an empty doc, then write content in chunks under 800 bytes to avoid truncation or errors.
使用说明 (SKILL.md)
feishu-doc-long-content
飞书文档长内容写入实战经验,解决 content 超长截断问题
问题背景
飞书文档工具 feishu_doc 的 write / create action 对单次 content 长度有限制(约 1KB),超出后会:
- 直接返回 400 错误
- 或部分写入后截断(显示空白)
核心要点
1. create 只是创建空白文档
{
"action": "create",
"title": "新文档"
}
返回 doc_id,但文档内容是空的。
2. 必须用 write 写入内容
{
"action": "write",
"doc_token": "ABC123",
"content": "# 标题\
内容..."
}
3. content 必须控制在 1KB 以内
经验值:
- \x3C 800 字节:安全写入
- 800-1500 字节:可能失败
- > 1500 字节:基本失败
4. 长内容解决方案
方案A:拆分章节 将内容拆成多个小文档,每个 \x3C 800 字节:
文档1:第1-2章
文档2:第3-4章
文档3:第5-6章
文档4:第7-8章
方案B:多次 append 创建文档后,分多次 append(但 append 也有累积限制)
方案C:先存本地文件 将内容写入本地 md 文件,让用户自己查看或转换
正确流程
// 1. 创建文档
{ "action": "create", "title": "笔记 Ch1" }
// → { "doc_id": "ABC123", "url": "..." }
// 2. 写入内容(控制 \x3C 800 字节)
{ "action": "write", "doc_token": "ABC123", "content": "精简版内容..." }
// 3. 验证
{ "action": "read", "doc_token": "ABC123" }
常见错误
| 错误表现 | 原因 | 解决方案 |
|---|---|---|
| 文档创建后空白 | create 后没写 content | 用 write 写入 |
| write 返回成功但内容截断 | content 超过 1KB | 拆分内容 |
| write 返回 400 错误 | content 过长 | 精简内容或拆分 |
判断内容长度
在写入前估算:
- 纯文本:约 1 字符 = 1 字节
- Markdown:约 1 字符 = 1 字节(含格式符)
- 经验:800 字符约等于 800 字节(中文英文混合时略大)
最佳实践
- 先在本地写 md 文件,确认内容完整
- 写入飞书前精简,移除冗余格式和重复内容
- 分章节输出,每章一个文档
- 写入后立即验证,用 read 检查 block_count
经验来源:2026-02-25 初级会计实务笔记输出实战
安全使用建议
This skill is a plain text guide — it won't install software or automatically use your credentials. If you plan to follow it to actually write to Feishu, you or the integrating agent will need to supply valid Feishu doc tokens/credentials at runtime; only provide those to trusted code or manual prompts. Test with small content first, avoid pasting secrets into the content, and prefer manual confirmation before allowing any agent to use your Feishu credentials.
功能分析
Type: OpenClaw Skill
Name: feishu-doc-long-content
Version: 1.0.0
The skill bundle provides instructions for an AI agent on how to handle long content when interacting with the Feishu document tool, specifically addressing content length limitations. The `SKILL.md` file, which serves as the agent's instructions, is purely informational and problem-solving. It suggests strategies like splitting content or saving to a local markdown file as a workaround, which are legitimate actions within the scope of an agent assisting a user. There is no evidence of prompt injection attempts, data exfiltration, malicious execution, or any other harmful intent across any of the files.
能力评估
Purpose & Capability
Name and description match the SKILL.md guidance: it explains create/write/read flows and strategies for splitting content to avoid Feishu's per-call size limits. The package.json is metadata-only and consistent with an instruction-only skill.
Instruction Scope
SKILL.md stays on-topic (how to create a blank doc, then write content in <800-byte chunks, and verify). It references doc_id/doc_token values the caller must supply, but it does not instruct reading unrelated files or exfiltrating data. Note: it suggests saving local markdown files as a best practice, which implies local file I/O by the user/agent if implemented, but the instructions do not automatically perform that I/O.
Install Mechanism
No install spec or code is provided (instruction-only). No downloads, no binaries, no archives — lowest install risk.
Credentials
The skill declares no required environment variables or credentials. The SKILL.md examples use doc_token/doc_id parameters (expected for Feishu API calls), so a real integration would require valid Feishu credentials supplied at runtime by the user or agent. This absence is coherent for an instruction-only guide but means the skill itself will not automatically access secrets.
Persistence & Privilege
always is false and there is no code that requests persistent privileges or modifies agent/system configuration. No elevated presence is requested.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install feishu-doc-long-content - 安装完成后,直接呼叫该 Skill 的名称或使用
/feishu-doc-long-content触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release describing solutions for Feishu Doc content length limitations.
- Explains the <1KB content constraint for write/create actions and common failure modes.
- Details recommended practices: content splitting, incremental write, and local file fallback.
- Provides workflow and error troubleshooting table for document creation and content insertion.
- Offers tips for estimating safe content size and maintaining document integrity.
元数据
常见问题
feishu-doc-long-content 是什么?
Create Feishu Docs by first creating an empty doc, then write content in chunks under 800 bytes to avoid truncation or errors. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 711 次。
如何安装 feishu-doc-long-content?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-doc-long-content」即可一键安装,无需额外配置。
feishu-doc-long-content 是免费的吗?
是的,feishu-doc-long-content 完全免费(开源免费),可自由下载、安装和使用。
feishu-doc-long-content 支持哪些平台?
feishu-doc-long-content 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 feishu-doc-long-content?
由 Josephyb97(@josephyb97)开发并维护,当前版本 v1.0.0。
推荐 Skills