SkillsGrove
SkillsGrove/생산성/wulaosiji/skills/feishu-block-adder

feishu-block-adder

설치

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

요약

원문 설명 · MIT知识库块添加子技能 / Feishu wiki block adder sub-skill. 将解析后的块数据添加到飞书知识库文档,分批处理以避免 API 限制,支持表格和普通块。 Use when: "添加知识库块", "add wiki blocks", "批量添加知识库块", "batch add wiki blocks", "知识库表格创建", "wiki table creation", "块写入知识库", "block write to wiki". 内部组件,由 feishu-wiki-orchestrator 编排调用,每批最多 20 个块,表格单独处理。Cross-references: feishu-wiki-orchestrator, feishu-md-parser, feishu-doc-verifier. Built by UniqueClub 🌐 https://uniqueclub.ai
아래 SKILL.md는 wulaosiji/skills(커밋 d733e13)에서 MIT 라이선스에 따라 게시한 것입니다. 본문은 변경하지 않았으며, 파일 상단의 메타데이터만 생략하고 이미지는 링크로 표시하며 매우 긴 파일은 일부만 표시합니다. Copyright 2025 Feishu Document Creation Skill. 라이선스: feishu-wiki-orchestrator/LICENSE. 지침 파일만 표시되며 스크립트 등은 원본 저장소를 참고하세요.

Feishu Wiki Block Adder (Sub-skill)

将解析后的块数据分批添加到飞书知识库文档,支持表格和普通块。内部组件,由父技能编排调用。

When to Use

Use this skill when:

  • 需要将 feishu-md-parser 生成的块数据写入知识库文档时
  • 需要分批添加大量块以避免 API 限制时
  • 需要在知识库文档中创建表格块时

Do NOT use this skill if:

  • 需要独立创建知识库文档 → use feishu-wiki-orchestrator (parent) instead
  • 需要解析 Markdown → use feishu-md-parser instead
  • 需要向云盘文档添加块 → use feishu-doc-orchestrator/feishu-block-adder instead

Typical triggers:

  • 「添加块到知识库文档」「批量写入知识库块」
  • "add blocks to wiki doc", "batch wiki block insertion"

Workflow

  1. 探查 (Probe) 从 blocks.json 加载解析后的块数据,从 doc_info.json 加载知识库文档 ID。

  2. 约束 (Constrain) 每批最多 20 个块,表格单独处理,普通块批量添加。不支持的块类型跳过并记录。

  3. 执行 (Execute) 分批调用飞书 API 添加块到知识库文档:

python scripts/block_adder.py workflow/step1_parse/blocks.json workflow/step2_create/doc_info.json output
  1. 验证 (Verify) 检查 API 返回结果,确认所有块添加成功,统计成功/失败数量。

  2. 交付 (Deliver) 保存添加结果到 output/add_result.json。

Output

{
  "success": true,
  "document_id": "U2wNd2rMkot6fzxr67ScN7hJn7c",
  "total_blocks": 290,
  "tables_created": 10,
  "regular_blocks": 280,
  "batches": 15,
  "duration_seconds": 5.2
}

Guardrails

Anti-patterns

  • NEVER 一次性添加超过 20 个块(API 限制)
  • Do NOT 将表格块与普通块混合在同一批中
  • Do NOT 独立使用本子技能——应由父技能 feishu-wiki-orchestrator 编排

Constraints

  • 当前支持 13 种块类型:text, heading1-6, bullet, ordered, code, quote, divider, table
  • Callout 块(block_type: 19)颜色字段必须直接放在 callout 对象下,不能嵌套在 style 中
  • 知识库文档的块添加 API 与云盘文档相同,但文档 token 类型不同

Related Skills

  • feishu-wiki-orchestrator (parent) — 主编排技能,调用本子技能
  • feishu-md-parser — 上游:解析 Markdown 为块数据
  • feishu-doc-verifier — 下游:验证知识库文档内容

About UniqueClub

Part of the UniqueClub toolkit. 🌐 https://uniqueclub.ai

라이선스 전문 보기(MIT)
MIT License

Copyright (c) 2025 Feishu Document Creation Skill

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.