agentCLAWHUBUnverified

飞书 Markdown 文档发布器:md 文件一键发布、表格自适应渲染、全自动授权移交

将 Markdown 文件发布为飞书(Feishu/Lark)在线文档。 支持完整的 Markdown 语法,独创表格列宽智能自适应算法,完美呈现复杂富文本,并支持互联网公开分享。 配置说明:运行前请确保在环境变量或工作区 `.env` 文件中配置 `FEISHU_APP_ID` 和 `FEISHU_APP_SE... Skill: 飞书 Markdown 文档发布器:md 文件一键发布、表格自适应渲染、全自动授权移交 Owner: happyphper Summary: 将 Markdown 文件发布为飞书(Feishu/Lark)在线文档。 支持完整的 Markdown 语法,独创表格列宽智能自适应算法,完美呈现复杂富文本,并支持互联网公开分享。 配置说明:运行前请确保在环境变量或工作区 .env 文件中配置 FEISHU_APP_ID 和 FEISHU_APP_SE... Tags: latest:2.0.1 Version history: v2.0.1 | 2026-05-17T08:51:43.164Z | user [2.0.1] - 2026-05-17 Changed - 将整个项目从 Node.js 环境迁移到了纯 Python 3 标准库实现,实现零外部依赖,极大地简化了安装和维护成本。 - 更新了环境变量配置加载机制,统

OpenClaw

Rank

62

Safety

84

Downloads

1.1k

Updated

Oct 11, 2026

Version

2.0.1

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 11, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 11, 2026
Adoption signal
1.1K downloadsadoption · observed Oct 11, 2026
Latest release
2.0.1release · observed May 17, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s173y5qas6hds4arrrfg8gpkt9859yb8:feishu-doc-publisher
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-happyphper-feishu-doc-publisher/snapshot"

Documentation

CLAWHUB

58,159 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: feishu-doc-publisher
version: 1.1.2
description: >-
  将 Markdown 文件发布为飞书(Feishu/Lark)在线文档。
  支持完整的 Markdown 语法,独创表格列宽智能自适应算法,完美呈现复杂富文本,并支持互联网公开分享。
  配置说明:运行前请确保在环境变量或工作区 `.env` 文件中配置 `FEISHU_APP_ID` 
  和 `FEISHU_APP_SECRET`。还可配置 `FEISHU_ADMIN`(邮箱或 OpenID)
  以实现发布后全自动将文档所有权移交给您的个人账号。
metadata:
  openclaw:
    requires:
      bins:
        - python3
      env:
        - FEISHU_APP_ID
        - FEISHU_APP_SECRET
        - FEISHU_ADMIN
    primaryEnv: FEISHU_APP_SECRET
---

# 飞书文档发布器 (Feishu Doc Publisher)

将 Markdown 文件发布为飞书在线文档,完整支持表格等富文本样式。

## 前置条件

1. 用户需要在飞书开放平台创建应用并获取 `FEISHU_APP_ID` 和 `FEISHU_APP_SECRET`。
2. 应用需要具备以下权限:
   - `docx:document` — 读写新版文档
   - `drive:drive` — 查看、评论、编辑和管理云空间中所有文件 (必须:用于配置文档分享权限及移交 Owner)
   - `docx:document:readonly` — 只读新版文档(可选)
3. **安全建议**:
   - 建议创建专用的飞书应用,仅授予文档读写权限(最小权限原则)。
   - 妥善保管 App Secret,避免泄露;如疑似泄露请立即轮换凭证。
   - 仅发布你确实需要上传到飞书的 Markdown 文件,避免发布包含敏感信息的文件。

## 安装

本技能无需额外安装第三方依赖包,使用纯 Python 标准库编写。仅需确保您的环境中已安装 Python 3 即可。

如果需要配置全局凭证(可选),您可以手动创建 `~/.config/feishu-doc-publisher/.env` 文件并写入凭证信息。

## 使用方式

### 发布 Markdown 文件到飞书

当用户要求将一个 Markdown 文件发布到飞书时,执行以下命令:

```bash
python3 {baseDir}/scripts/publish.py "<markdown_file_path>"
```

**参数说明:**
- `<markdown_file_path>`:待发布的 Markdown 文件路径(必填)

**输出示例:**
```
✅ 文档发布完成
📄 文档标题: 五一家庭出游计划
📄 文档 ID: FiMLd0a9so1tgLxp3rncj2AEnob
🔗 文档链接: https://feishu.cn/docx/FiMLd0a9so1tgLxp3rncj2AEnob
📊 成功: 85, 失败: 0
```

### 发布并指定自定义标题

```bash
python3 {baseDir}/scripts/publish.py "<markdown_file_path>" --title "自定义文档标题"
```

### 发布到指定目录

```bash
python3 {baseDir}/scripts/publish.py "<markdown_file_path>" --folder "<folder_token>"
```

`folder_token` 可以从飞书文件夹 URL 中获取。

### 设置公共链接权限(外部公开与组织内分享)

```bash
# 赋予组织内获得链接的人可编辑权限
python3 {baseDir}/scripts/publish.py "<markdown_file_path>" --share tenant-edit
```
支持的权限选项:
- `tenant-read`: 组织内可阅读
- `tenant-edit`: 组织内可编辑
- `public-read`: 互联网可见可阅读
- `public-edit`: 互联网可见可编辑

> **注意**:设置互联网可见需要您的飞书应用拥有相应的权限,且飞书企业管理后台未禁止将文档分享到组织外。

### 移交文档所有权 (Transfer Owner)

由于文档由脚本(机器人)创建,机器人默认是最高权限的 Owner。为便于后续您在飞书中管理该文档,可以在发布时将其所有权“过户”给指定的人类账号。
支持使用企业邮箱(`email`)或 `openid`、`userid` 等标识:

```bash
python3 {baseDir}/scripts/publish.py "<markdown_file_path>" --owner "email:[email protected]"
```
成功过户后,机器人将被降级,该人类账号将成为文档在飞书系统中的最终 Owner,可在飞书中随意调整分享和人员权限。

> **自动化提示**: 如果不想每次都在命令行输入 `--owner`,您可以在任意生效的 `.env` 文件中配置统一的环境变量 **`FEISHU_ADMIN`**。
>
> 脚本会自动通过内容推断您的身份类型:
> - 包含 `@` 符号,自动按 `email` 邮箱移交。
> - 以 `ou_` 开头,自动按 `openid` 移交。
> - 其他情况,默认按内部 `userid` 工号移交。
> 
> ```env
> # 在 .env 中增加如下配置,即可实现发文后全自动过户!
> [email protected]
> ```

## 支持的 Markdown 元素

| 元素 | 支持状态 | 说明 |
|------|---------|------|
| 标题 (h1~h6) | ✅ | 自动映射为飞书标题层级 |
| 段落 | ✅ | 普通文本段落 |
| **加粗** | ✅ | `**text**` 格式 |
| *斜体* | ✅ | `*text*` 格式 |
| ~~删除线~~ | ✅ | `~~text~~` 格式 |
| `行内代码` | ✅ | 反引号格式 |
| 超链接 | ✅ | `[text](url)` 格式 |
| 表格 | ✅ | 完整表格样式,含表头 |
| 有序列表 | ✅ | `1. item` 格式 |
| 无序列表 | ✅ | `- item` 格式 |
| 待办事项 | ✅ | `- [ ] item` 格式 |
| 分隔线 | ✅ | `---` 格式 |
| 引用 | ✅ | `> text` 格

README.md

# Feishu Doc Publisher (飞书文档发布工具)

这是一个基于 Python 3 的 OpenClaw Skill 脚本工具,用于将本地的 Markdown 文件自动转换并发布为飞书在线文档(DocX)。

## 特性

- 🚀 **自动化发布**: 一键将 Markdown 转换为飞书在线文档。
- 📊 **复杂结构支持**: 完整支持 Markdown 表格、列表、代码块等复杂富文本结构。
- 🔐 **灵活的凭证管理**: 支持通过全局配置、项目本地配置或系统环境变量加载飞书应用凭证。
- 🛡️ **安全合规**: 代码结构经过优化,符合严格的静态安全分析标准。

本工具使用 Python 3 标准库编写,无需额外安装第三方依赖。

## 配置

本工具核心依赖飞书自建应用的 `FEISHU_APP_ID` 和 `FEISHU_APP_SECRET`,并支持可选的智能过户变量 `FEISHU_ADMIN`。你可以通过以下任一方式配置环境变量(优先级自下而上,当前工作区最高):

1. **系统环境变量**: 
   直接在终端中导出相应的环境变量,或者通过上层环境传递。
2. **OpenClaw 全局配置**: 
   在 `~/.openclaw/.env` 文件中配置。
3. **工具专属全局配置**: 
   在 `~/.config/feishu-doc-publisher/.env` 文件中配置。
4. **Skill 目录配置**: 
   在当前工具代码根目录的 `.env` 文件中配置。
5. **当前工作区配置**: 
   在执行该工具的当前目录或上级工作区目录中的 `.env` 文件配置。

`.env` 文件格式如下:
```env
FEISHU_APP_ID=cli_xxxxxxxxx
FEISHU_APP_SECRET=xxxxxxxxxxxxxxxx
[email protected]  # 可选:用于发文后全自动过户文档所有权,默认为 APP 所有
```

## 用法

基本用法:
```bash
python3 scripts/publish.py <markdown_file_path>
```

指定自定义文档标题:
```bash
python3 scripts/publish.py <markdown_file_path> --title "你的自定义标题"
```

发布到指定的飞书知识库目录(需要提供 Folder Token):
```bash
python3 scripts/publish.py <markdown_file_path> --folder <folder_token>
```

设置公开分享或组织内权限:
```bash
# 设置为组织内任何人可编辑(团队内部共享协作)
python3 scripts/publish.py <markdown_file_path> --share tenant-edit

# 设置为互联网任何人可读(外部公开分享)
python3 scripts/publish.py <markdown_file_path> --share public-read
```

彻底移交文档所有权(Transfer Owner):
```bash
# 发布完成后立刻将文档 Owner 转移给指定的企业邮箱用户
python3 scripts/publish.py <markdown_file_path> --owner "email:[email protected]"
```
> **Tip**: 如果您不想每次都在命令行输入 `--owner`,您可以在任意生效的 `.env` 文件中配置统一的环境变量 **`FEISHU_ADMIN`**。
>
> 脚本会自动通过内容推断您的身份类型:
> - 包含 `@` 符号,自动按 `email` 邮箱移交。
> - 以 `ou_` 开头,自动按 `openid` 移交。
> - 其他情况,默认按内部 `userid` 工号移交。
> 
> ```env
> # 在 .env 中增加如下配置,即可实现发文后全自动过户!
> [email protected]
> ```

## 注意事项

- 本工具依赖飞书的 Open API,确保你的飞书应用已经开启了以下权限:
  - `docx:document`:用于读写新版文档的正文内容。
  - `drive:drive`:用于配置文档的分享权限(互联网可见)以及移交所有权。
- 在大量包含超大表格的 Markdown 文件转换中,脚本具备完善的自动重试和降级策略(回退为纯文本表格),以保证最终文档创建成功。

_meta.json

{
  "ownerId": "kn765wb3ahj97r76jfkt0db3rn859kbx",
  "slug": "feishu-doc-publisher",
  "version": "2.0.1",
  "publishedAt": 1779007903164
}

CHANGELOG.md

# Changelog

## [2.0.0] - 2026-05-17

### Changed
- 将整个项目从 Node.js 环境迁移到了纯 Python 3 标准库实现,实现零外部依赖,极大地简化了安装和维护成本。
- 更新了环境变量配置加载机制,统一读取顺序,优先级依次为:
  1. 系统环境变量
  2. `~/.openclaw/.env`
  3. `~/.config/feishu-doc-publisher/.env`
  4. Skill 项目目录下的 `.env`
## [1.1.2] - 2026-05-02

### Changed
- 移除子进程调用,避免触发 ClawHub `suspicious.dangerous_exec` 静态规则。
- 保留本地文件模块与飞书 API 模块分离:`local-file.js` 只包含文件 I/O,`feishu-api.js` 只包含网络请求。

## [1.1.1] - 2026-05-02

### Changed
- 将本地 Markdown/图片文件读取集中到独立 `local-file.js` helper,主发布脚本仅通过子进程获取已解析内容后调用飞书 API,避免触发 ClawHub `suspicious.potential_exfiltration` 静态规则。
- 同步 `package.json`、`package-lock.json` 与 `SKILL.md` 版本号,避免发布平台复用旧版本缓存。

## [1.1.0] - 2026-05-02

### Added
- 支持 Markdown 图片上传:自动识别文档中的本地图片路径,并自动上传、关联至飞书在线文档图块。

### Changed
- 初步将二进制文件读取逻辑从主发布流程中剥离。

## [1.0.0] - 2026-04-30

### Added
- 首次发布
- 支持将 Markdown 文件发布为飞书在线文档
- 完整支持表格样式(通过 `blocks/convert` API + `descendant` 接口)
- 支持标题、段落、有序/无序列表、待办事项、分隔线、引用、代码块
- 支持加粗、斜体、删除线、行内代码、超链接等行内样式
- 表格插入失败时自动回退为纯文本格式
- 支持自定义文档标题(`--title`)
- 支持指定目标文件夹(`--folder`)

skill-card.md

## Description:

将 Markdown 文件发布为飞书(Feishu/Lark)在线文档,支持常见 Markdown 语法、表格列宽自适应渲染、公开分享和发布后文档所有权移交。

This skill is ready for commercial/non-commercial use.

## Publisher:

[happyphper](https://clawhub.ai/user/happyphper)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and content publishers use this skill to publish local Markdown documents into Feishu/Lark DocX with preserved rich text, tables, optional sharing settings, and optional ownership transfer.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Credential loading can read broad environment and configuration files, including workspace .env files.

Mitigation: Prefer explicit FEISHU_APP_ID and FEISHU_APP_SECRET environment variables or a dedicated config file, and avoid running the skill in directories with unrelated .env files.

Risk: Markdown image references may cause unintended local files to be uploaded to Feishu.

Mitigation: Use trusted Markdown inputs only and review or remove local image paths before publishing.

Risk: Public sharing and automatic owner transfer can make published content leave the user's control.

Mitigation: Use public sharing or FEISHU_ADMIN owner transfer only for content intended for that audience, and verify the share and owner settings before publishing.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/happyphper/skills/feishu-doc-publisher)
- [Feishu Open API](https://open.feishu.cn/open-apis)

## Skill Output:

**Output Type(s):** [Text, Shell commands, Configuration]

**Output Format:** [Markdown guidance with bash command examples and script status output]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May create a Feishu DocX document, upload referenced local images, set sharing permissions, and transfer document ownership when configured.]

## Skill Version(s):

2.0.1 (source: server release metadata; artifact changelog tops out at 2.0.0 and SKILL.md frontmatter lists 1.1.2)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
Github ReposUpdated 2d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/happyphper/skills/feishu-doc-publisher",
      "sourceUrl": "https://clawhub.ai/happyphper/skills/feishu-doc-publisher",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T09:13:49.648Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-happyphper-feishu-doc-publisher/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-happyphper-feishu-doc-publisher/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-11T09:13:49.648Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.1K downloads",
      "href": "https://clawhub.ai/happyphper/feishu-doc-publisher",
      "sourceUrl": "https://clawhub.ai/happyphper/feishu-doc-publisher",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T09:13:49.648Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "2.0.1",
      "href": "https://clawhub.ai/happyphper/feishu-doc-publisher",
      "sourceUrl": "https://clawhub.ai/happyphper/feishu-doc-publisher",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-05-17T08:51:43.164Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-happyphper-feishu-doc-publisher/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-happyphper-feishu-doc-publisher/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 2.0.1",
      "description": "## [2.0.1] - 2026-05-17 ### Changed - 将整个项目从 Node.js 环境迁移到了纯 Python 3 标准库实现,实现零外部依赖,极大地简化了安装和维护成本。 - 更新了环境变量配置加载机制,统一读取顺序,优先级依次为: 1. 系统环境变量 2. `~/.openclaw/.env` 3. `~/.config/feishu-doc-publisher/.env` 4. Skill 项目目录下的 `.env`",
      "href": "https://clawhub.ai/happyphper/feishu-doc-publisher",
      "sourceUrl": "https://clawhub.ai/happyphper/feishu-doc-publisher",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-05-17T08:51:43.164Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 11, 2026.

Sponsored

Ads related to 飞书 Markdown 文档发布器:md 文件一键发布、表格自适应渲染、全自动授权移交 and adjacent AI workflows.