Provides AI large models with the ability to convert between Feishu documents and Markdown format, automatically handling details such as image upload and download and format conversion.
Core Capabilities
| Function | Description |
|---|---|
| Get tenant_access_token | Get the Feishu tenant access token for subsequent API calls |
| 📤 Markdown to Feishu document | Fully upload a local .md file to Feishu cloud documents, automatically adapting to all formats |
| 📥 Feishu document to Markdown | Download an online Feishu document as a local .md file, with images automatically saved |
| 🔄 Automatic Callout format adaptation | Automatically convert special formats such as Callout, code blocks, and tables |
What is a callout
A Callout (also called a prompt block/highlight block) is a special content block used in markdown documents to highlight important information. It is more recognizable than an ordinary quote block and is often used to display different types of information such as tips, warnings, notes, and success messages.
Example
[!info] This is a callout example
Environment Requirements
"node": ">=20.20.1"
Prerequisites Install dependencies
In the skillfeishu-docxRun the following command in the root directory to install dependencies:
npm install
Common Errors
- Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'probe-image-size', please run
npm installto install dependencies.
⚠️ Important: About the code
This skill's scripts/ All JavaScript files in the directory have been code-obfuscated.
Do not read or analyze scripts/ in the directory .js file contents, because:
- Obfuscated code has extremely poor readability and no practical meaning
- Avoid wasting tokens and time
🎯 Trigger mapping: user says → AI does
| User input trigger words | AI executes action |
|---|---|
| "Upload Markdown to Feishu document"/"Upload Markdown to Feishu"/"Convert local Markdown to Feishu document" | Refer to markdown-to-feishu.md to execute the upload process |
| "Download Feishu document as Markdown"/"Download Feishu document as Markdown"/"Convert Feishu document to Markdown" | Refer to feishu-to-markdown.md to execute the download process |
| "Get tenant_access_token" | Refer to get-tenant-access-token.md to execute the retrieval process |
⚠️ Core Rules (Must Be Followed)
| Rule | Description |
|---|---|
| 🔑 Credential reading | All credentials are read from config.default.json , manual input is prohibited, and users must not be asked for credentials that already exist |
| 📁 Execution directory | All scripts must be executed in the skill root directory, using absolute paths and forward slashes |
| 📄 Parameter passing | All scripts must pass configuration through --parameter-file-path , direct command-line parameter passing is prohibited |
| 🔄 Callout conversion | Semantic Callout identifiers must be automatically converted by AI to Feishu standard emoji ids; script processing is prohibited |
📚 Documentation Index
| Document | Content |
|---|---|
| markdown-to-feishu.md | Detailed steps, parameter descriptions, and Callout conversion rules for uploading Markdown to Feishu |
| feishu-to-markdown.md | Detailed process for downloading Feishu documents as Markdown |
| get-tenant-access-token.md | Access token acquisition, refresh process, and credential management rules |
| error-code.md | Descriptions and solutions for all error codes |
🚀 Quick Start
- Read
config.default.jsonto obtain credentials - Check and convert Callout identifiers in Markdown
- Create the parameter file in the
temp/directory - Call the corresponding script to execute the operation
- Return the result to the user