← 返回 Skills 市场
deadblue22

Feishu Md2blocks

作者 deadblue · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
302
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install feishu-md2blocks
功能描述
Insert rich Markdown content (including tables) into Feishu documents. Use when feishu_doc write/append fails with tables, or when inserting complex formatte...
使用说明 (SKILL.md)

Feishu Markdown to Blocks

Insert Markdown content—including tables—into Feishu documents via the block convert + descendant API.

When to Use

  • feishu_doc write replaces the entire document; use this to insert content at a position
  • feishu_doc create_table_with_values has limitations for larger tables
  • You need to insert tables, code blocks, or complex nested content into an existing doc

Usage

# Insert from file (appends to document end)
python3 \x3Cskill_dir>/scripts/md2blocks.py \x3Cdoc_token> content.md

# Insert from stdin
echo "| A | B |\
|---|---|\
| 1 | 2 |" | python3 \x3Cskill_dir>/scripts/md2blocks.py \x3Cdoc_token> -

# Insert after a specific block
python3 \x3Cskill_dir>/scripts/md2blocks.py \x3Cdoc_token> content.md --after \x3Cblock_id>

# Replace all content
python3 \x3Cskill_dir>/scripts/md2blocks.py \x3Cdoc_token> content.md --replace

How It Works

  1. Calls POST /docx/v1/documents/blocks/convert to convert Markdown → block structures
  2. Removes merge_info from table blocks (read-only field that causes insertion errors)
  3. Calls POST /docx/v1/documents/{doc}/blocks/{parent}/descendant to insert blocks

The descendant API handles nested structures (tables with cells containing text) that the simpler /children API cannot.

Position Control

The --after \x3Cblock_id> option inserts content right after the specified block. The script finds the block's index automatically.

Key detail: The /descendant API's index parameter must be in the request body, not as a URL query parameter. Passing ?index=N in the URL is silently ignored (content appends to end). The script handles this correctly.

Supported Markdown

Text, headings (h1-h9), bullet lists, ordered lists, code blocks, quotes, tables, todo items, dividers.

Limitations

  • Images in Markdown are not automatically uploaded; they require separate upload + patch steps
  • Max 1000 blocks per insert call; split large documents if needed
  • Requires docx:document.block:convert permission on the Feishu app
  • Document edit rate limit: 3 ops/sec per document

Reference

For complete block-level API reference, see the feishu-block-ops skill which covers:

  • All block APIs (create/read/update/delete/batch)
  • Block type reference, text element types
  • Table operation patterns (batch edit, merge cells)
  • Common patterns and gotchas
安全使用建议
Inspect the script and your environment before using. Specifically: - The script reads Feishu app credentials from ~/.openclaw/openclaw.json (appId and appSecret) to obtain a tenant_access_token; this is not declared in the SKILL.md or registry metadata. Verify that file and its contents are what you expect. - If you do not want the skill to read your local config, either (a) run it in an isolated account/container where ~/.openclaw/openclaw.json is absent or contains a dedicated test app, or (b) modify the script to accept credentials via explicit environment variables/arguments and document that requirement. - Limit the Feishu app permissions to the minimum required (docx:document.block:convert and document edit scopes) and rotate credentials if you test with production tokens. - Confirm network targets: the script only calls official open.feishu.cn endpoints. If you see any different endpoints after your inspection, do not run the script. - Prefer explicit documentation: ask the publisher to update SKILL.md and registry metadata to declare the credential/config-file dependency so the requirement is transparent.
功能分析
Type: OpenClaw Skill Name: feishu-md2blocks Version: 1.0.0 The skill `feishu-md2blocks` is designed to insert Markdown content into Feishu documents. The `SKILL.md` provides clear instructions and usage examples without any prompt injection attempts. The Python script `scripts/md2blocks.py` legitimately interacts with the Feishu API (`open.feishu.cn`) for authentication and document manipulation, reading credentials from `~/.openclaw/openclaw.json` as expected for an OpenClaw skill. While it can delete document content via the `--replace` argument, this is an explicit, user-controlled action aligned with the stated purpose. There is no evidence of data exfiltration, unauthorized command execution, persistence mechanisms, or other malicious intent.
能力评估
Purpose & Capability
Skill name, description, and runtime behavior (convert Markdown → Feishu blocks and insert via block APIs) are coherent. The included script calls Feishu block conversion and descendant APIs as described.
Instruction Scope
SKILL.md does not mention that the runtime script will read Feishu app credentials from a local file (~/.openclaw/openclaw.json). The script requires access to this user config to request a tenant token — this is additional I/O and credential access not declared in the skill metadata or usage docs.
Install Mechanism
No install spec; skill is instruction-only with a Python script. Nothing is downloaded or installed by the registry. Risk from installation is low, but the included script will execute network calls at runtime.
Credentials
No required env vars or credentials are declared in the registry metadata, yet the script reads appId/appSecret from ~/.openclaw/openclaw.json to obtain a tenant_access_token. Accessing local config/credentials is sensitive and should be declared or made optional.
Persistence & Privilege
Skill does not request always:true or any special persistent privileges and does not modify other skills or system-wide settings. It only reads a user config file and calls Feishu APIs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-md2blocks
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-md2blocks 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of feishu-md2blocks: Insert rich Markdown (including tables, code blocks, and nested lists) into Feishu documents at specific positions. - Supports converting Markdown to Feishu blocks, removing problematic merge info from tables, and precise positioning using the descendant API. - Offers command line usage to append, insert after a block, or fully replace document content. - Handles complex content that feishu_doc write/append cannot, with support for most standard Markdown features. - Documents key API details, limitations, and prerequisites for use.
元数据
Slug feishu-md2blocks
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Feishu Md2blocks 是什么?

Insert rich Markdown content (including tables) into Feishu documents. Use when feishu_doc write/append fails with tables, or when inserting complex formatte... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 302 次。

如何安装 Feishu Md2blocks?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-md2blocks」即可一键安装,无需额外配置。

Feishu Md2blocks 是免费的吗?

是的,Feishu Md2blocks 完全免费(开源免费),可自由下载、安装和使用。

Feishu Md2blocks 支持哪些平台?

Feishu Md2blocks 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Feishu Md2blocks?

由 deadblue(@deadblue22)开发并维护,当前版本 v1.0.0。

💬 留言讨论