← 返回 Skills 市场
kari-code

ri

作者 KaRi-code · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
290
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ka
功能描述
Feishu document read/write operations. Activate when user mentions Feishu docs, cloud docs, or docx links.
使用说明 (SKILL.md)

Feishu Document Tool

Single tool feishu_doc with action parameter for all document operations, including table creation for Docx.

Token Extraction

From URL https://xxx.feishu.cn/docx/ABC123defdoc_token = ABC123def

Actions

Read Document

{ "action": "read", "doc_token": "ABC123def" }

Returns: title, plain text content, block statistics. Check hint field - if present, structured content (tables, images) exists that requires list_blocks.

Write Document (Replace All)

{ "action": "write", "doc_token": "ABC123def", "content": "# Title\
\
Markdown content..." }

Replaces entire document with markdown content. Supports: headings, lists, code blocks, quotes, links, images (![](url) auto-uploaded), bold/italic/strikethrough.

Limitation: Markdown tables are NOT supported.

Append Content

{ "action": "append", "doc_token": "ABC123def", "content": "Additional content" }

Appends markdown to end of document.

Create Document

{ "action": "create", "title": "New Document", "owner_open_id": "ou_xxx" }

With folder:

{
  "action": "create",
  "title": "New Document",
  "folder_token": "fldcnXXX",
  "owner_open_id": "ou_xxx"
}

Important: Always pass owner_open_id with the requesting user's open_id (from inbound metadata sender_id) so the user automatically gets full_access permission on the created document. Without this, only the bot app has access.

List Blocks

{ "action": "list_blocks", "doc_token": "ABC123def" }

Returns full block data including tables, images. Use this to read structured content.

Get Single Block

{ "action": "get_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }

Update Block Text

{
  "action": "update_block",
  "doc_token": "ABC123def",
  "block_id": "doxcnXXX",
  "content": "New text"
}

Delete Block

{ "action": "delete_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }

Create Table (Docx Table Block)

{
  "action": "create_table",
  "doc_token": "ABC123def",
  "row_size": 2,
  "column_size": 2,
  "column_width": [200, 200]
}

Optional: parent_block_id to insert under a specific block.

Write Table Cells

{
  "action": "write_table_cells",
  "doc_token": "ABC123def",
  "table_block_id": "doxcnTABLE",
  "values": [
    ["A1", "B1"],
    ["A2", "B2"]
  ]
}

Create Table With Values (One-step)

{
  "action": "create_table_with_values",
  "doc_token": "ABC123def",
  "row_size": 2,
  "column_size": 2,
  "column_width": [200, 200],
  "values": [
    ["A1", "B1"],
    ["A2", "B2"]
  ]
}

Optional: parent_block_id to insert under a specific block.

Upload Image to Docx (from URL or local file)

{
  "action": "upload_image",
  "doc_token": "ABC123def",
  "url": "https://example.com/image.png"
}

Or local path with position control:

{
  "action": "upload_image",
  "doc_token": "ABC123def",
  "file_path": "/tmp/image.png",
  "parent_block_id": "doxcnParent",
  "index": 5
}

Optional index (0-based) inserts the image at a specific position among sibling blocks. Omit to append at end.

Note: Image display size is determined by the uploaded image's pixel dimensions. For small images (e.g. 480x270 GIFs), scale to 800px+ width before uploading to ensure proper display.

Upload File Attachment to Docx (from URL or local file)

{
  "action": "upload_file",
  "doc_token": "ABC123def",
  "url": "https://example.com/report.pdf"
}

Or local path:

{
  "action": "upload_file",
  "doc_token": "ABC123def",
  "file_path": "/tmp/report.pdf",
  "filename": "Q1-report.pdf"
}

Rules:

  • exactly one of url / file_path
  • optional filename override
  • optional parent_block_id

Reading Workflow

  1. Start with action: "read" - get plain text + statistics
  2. Check block_types in response for Table, Image, Code, etc.
  3. If structured content exists, use action: "list_blocks" for full data

Configuration

channels:
  feishu:
    tools:
      doc: true # default: true

Note: feishu_wiki depends on this tool - wiki page content is read/written via feishu_doc.

Permissions

Required: docx:document, docx:document:readonly, docx:document.block:convert, drive:drive

安全使用建议
This instruction-only Feishu document tool is generally coherent, but verify a few things before installing: 1) Clarify how the skill authenticates to Feishu (what token or platform-provided credential will be used) and ensure the required Feishu app scopes are appropriate. 2) Ask the publisher to explain the contradiction about table creation — the reference file says tables cannot be created via the API while the SKILL.md provides create_table actions. 3) Confirm whether the agent will be granted access to local files you might upload (e.g., /tmp/image.png) and that you’re comfortable exposing those files. 4) Test on non-sensitive documents first. If the publisher cannot explain the table-creation discrepancy or the auth model, treat the skill as untrusted.
功能分析
Type: OpenClaw Skill Name: ka Version: 1.0.0 The feishu-doc skill provides comprehensive document management capabilities, but it includes high-risk actions in SKILL.md such as 'upload_file' and 'upload_image' that accept a 'file_path' parameter. This allows the agent to read arbitrary local files and upload them to the Feishu platform, creating a potential vector for data exfiltration if the agent is manipulated via prompt injection. While these features are plausibly needed for the stated purpose, the lack of path restrictions or sanitization is a significant security risk.
能力评估
Purpose & Capability
The name/description and instructions focus on Feishu doc read/write operations and the included block-types reference supports that. However, the SKILL.md advertises actions to 'create_table' and 'create_table_with_values' while the references/block-types.md explicitly states table blocks cannot be created via the API (error 1770029). That is a direct capability contradiction and should be clarified.
Instruction Scope
Instructions remain within the scope of manipulating Feishu documents (read, list blocks, update, upload images/files). They do assume access to inbound metadata (sender_id → owner_open_id) and to local filesystem paths (e.g., /tmp/image.png) for uploads; those are not declared but are reasonable platform assumptions — still, they should be documented (how the agent obtains auth and file access).
Install Mechanism
Instruction-only skill with no install spec, no binaries, and no code files — lowest install risk.
Credentials
No environment variables or credentials are declared, but the SKILL.md lists required Feishu scopes (docx:document, docx:document:readonly, docx:document.block:convert, drive:drive). The skill does not document how authentication tokens are supplied (app token, user token, or platform-provided context), which is important to confirm. It also expects access to inbound metadata (sender_id).
Persistence & Privilege
Skill is not forced-always, and does not request persistent system-level privileges. Autonomous invocation is enabled by default (normal).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ka
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ka 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Feishu Document Tool with full document and block API coverage: - Supports reading, writing, appending, and creating Feishu Docx documents by doc token. - Enables detailed block operations: list, get, update, delete. - Provides full table manipulation: create (with/without values), and write to table cells. - Allows image and file uploads to documents via URL or local file, including position control. - Reading workflow includes easy detection and retrieval of structured content (tables, images, code). - Designed for seamless integration with Feishu doc links, with user permission management and channel configuration options.
元数据
Slug ka
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

ri 是什么?

Feishu document read/write operations. Activate when user mentions Feishu docs, cloud docs, or docx links. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 290 次。

如何安装 ri?

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

ri 是免费的吗?

是的,ri 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ri 支持哪些平台?

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

谁开发了 ri?

由 KaRi-code(@kari-code)开发并维护,当前版本 v1.0.0。

💬 留言讨论