home / skills / zephyrwang6 / myskill / feishu-wiki

feishu-wiki skill

/feishu-wiki

This skill helps you manage Feishu wiki by viewing directory structures, saving Markdown documents, and reading multi-dimensional table content.

npx playbooks add skill zephyrwang6/myskill --skill feishu-wiki

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
2.5 KB
---
name: feishu-wiki
description: 飞书知识库文档管理工具。支持查看知识库目录结构、创建和保存文档、读取多维表格内容。当用户说"保存到飞书"、"写入飞书知识库"、"发布到飞书"、"查看飞书目录"、"读取飞书表格"时触发。适用于将 Obsidian 文档同步到飞书知识库,或读取飞书多维表格数据。
---

# 飞书知识库管理

将 Markdown 文档保存到飞书知识库,支持查看目录结构、指定保存位置、读取多维表格内容。

## 快速开始

### 查看目录结构

```bash
python scripts/list_wiki.py
```

输出示例:
```
📁 草稿箱 (YylJw806IinEJmkwOWVcv8HInph)
  📄 文章标题 (R6wxwODL7iCoQyknQsdcJleanFh)
  📁 分类文件夹 (ZXigwaUIViNr20k9KOKcEKgVnrg)
    📄 子文档 (GdaewKgtEicJcak37QmcgFsMnJc)
```

### 保存文档

保存 Markdown 文件到默认位置(草稿箱):
```bash
python scripts/save_to_wiki.py --file /path/to/document.md
```

保存到指定父节点:
```bash
python scripts/save_to_wiki.py --file /path/to/document.md --parent TOKEN
```

直接指定标题和内容:
```bash
python scripts/save_to_wiki.py --title "文档标题" --content "文档内容"
```

## 工作流程

当用户请求保存文档到飞书时:

1. **先查看目录结构**
   - 运行 `list_wiki.py` 获取当前知识库目录
   - 向用户展示可选的保存位置

2. **确定保存位置**
   - 如果用户指定了位置(如"保存到 xxx 下"),使用对应的 token
   - 如果未指定,默认保存到草稿箱

3. **执行保存**
   - 运行 `save_to_wiki.py` 保存文档
   - 返回文档链接给用户

## 支持的 Markdown 格式

| 格式 | 转换结果 |
|------|---------|
| `# 标题` | 一级标题 |
| `## 标题` | 二级标题 |
| `### 标题` | 三级标题 |
| `#### 标题` | 四级标题 |
| 普通段落 | 文本块 |
| `- 项目` | 无序列表 |
| `1. 项目` | 有序列表 |

粗体、斜体、链接等格式会转换为纯文本。

## 知识库配置

当前配置的知识库:
- 根节点: 草稿箱 (`YylJw806IinEJmkwOWVcv8HInph`)
- Space ID: `7591325128043121630`

如需修改配置,编辑脚本中的常量。

## 常见用法示例

用户说 | 操作
------|-----
"保存到飞书" | 保存当前文档到草稿箱
"保存到飞书的 xxx 目录下" | 先查目录获取 token,再保存到指定位置
"查看飞书知识库目录" | 运行 list_wiki.py 展示目录结构
"把这篇文章发布到飞书" | 保存指定文档到飞书

Overview

This skill manages Feishu Wiki documents and multi-dimensional tables from a simple command interface. It helps you view the knowledge base directory, choose or specify a save location, save Markdown content as Wiki pages, and read table data for integration or analysis. It is ideal for syncing Obsidian or other Markdown notes into Feishu and for programmatic reads of multi-dimensional tables.

How this skill works

The skill inspects the current Feishu knowledge base structure and returns a navigable directory with node tokens. To save a document it either uploads a Markdown file or accepts title/content directly, selects a parent node token (user-specified or default to Drafts), and creates the Wiki page, then returns the page link. For tables it reads multi-dimensional table contents and returns rows or structured data for downstream processing.

When to use it

  • Sync local Markdown or Obsidian notes to Feishu Wiki.
  • Publish a single document quickly to a chosen folder in the knowledge base.
  • Explore the Feishu Wiki directory to decide where to store new content.
  • Read multi-dimensional table data stored in Feishu for reporting or import.
  • Automate saving repeated exports or notes into a central Feishu space.

Best practices

  • List the knowledge base directory first to obtain correct parent node tokens before saving.
  • Use explicit parent tokens when you need a specific folder to avoid misplacement in Drafts.
  • Keep source Markdown headings and simple lists; complex formatting may convert to plain text.
  • Include a clear title and summary in content to improve discoverability in the Wiki.
  • Confirm returned page link after saving so you can verify the document and adjust formatting if needed.

Example use cases

  • From Obsidian: push a finalized note into the team Feishu Wiki Drafts or a topic folder.
  • Save meeting notes or SOPs directly to a designated knowledge base folder via a script command.
  • Run a directory listing to show available categories and select a save location interactively.
  • Read a Feishu multi-dimensional table containing project status and export rows into a CSV for analysis.
  • Automate daily report uploads: generate Markdown, then save to a project-specific node and share the link.

FAQ

What happens if I don't specify a folder when saving?

The skill saves the document to the configured Drafts root by default, so list the directory and provide a parent token if you need a different location.

Which Markdown features are preserved?

Headings, paragraphs, ordered and unordered lists are preserved; complex styles like bold/italic and anchors are converted to plain text or simplified formatting.

How do I find the token for a specific folder?

Run the directory listing to obtain node names and their tokens, then use that token with the save command to target the folder.