TopRank Skills

Home / Claw Skills / Git / GitHub / Feishu Upload Skill
Official OpenClaw rules 36%

Feishu Upload Skill

Feishu Upload Skill

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 Feishu Upload Skill 技能。 若已安装,则直接安装 Feishu Upload Skill 技能。

Overview

Skill Key
deewooo/feishu-upload-skill
Author
deewooo
Source Repo
openclaw/skills
Version
-
Source Path
skills/deewooo/feishu-upload-skill
Latest Commit SHA
d2c388af4880e3a005976d75ea6097ffe77119fd

Extracted Content

SKILL.md excerpt

# Feishu Upload Skill

飞书文件上传技能 - 直接上传文件到飞书并发送到聊天

## 功能特性

✅ **文件上传**:上传本地文件到飞书云盘
✅ **消息发送**:发送文件消息到指定聊天
✅ **自动令牌管理**:自动获取和刷新访问令牌
✅ **大小限制检查**:自动检查30MB文件大小限制
✅ **多格式支持**:支持各种文件类型(文本、图片、压缩包等)
✅ **纯Node.js实现**:无需额外依赖,使用Node.js 18+原生功能

## 快速开始

### 1. 上传文件并发送到聊天
```bash
node feishu_complete_upload.js <文件路径> <聊天ID>
```

示例:
```bash
node feishu_complete_upload.js document.txt oc_dd899cb1a7846915cdd2d6850bd1dafa
```

### 2. 仅上传文件(获取文件Key)
```bash
node feishu_complete_upload.js <文件路径>
```

### 3. 使用简化脚本
```bash
# 简单上传
node native_feishu_upload.js <文件路径>

# 获取访问令牌
./get_feishu_token.sh
```

## 文件说明

### 核心文件
- `feishu_complete_upload.js` - 完整的上传和发送工具(推荐)
- `native_feishu_upload.js` - 使用原生FormData的简单上传工具
- `get_feishu_token.sh` - 获取和刷新访问令牌的脚本

### 辅助文件
- `feishu_upload_simple.sh` - Bash实现的简单上传脚本
- `feishu_upload_fixed.sh` - 修复版Bash上传脚本
- `simple_feishu_upload.js` - 简化版Node.js上传工具

### 配置文件
- `feishu_token.txt` - 访问令牌缓存文件(自动生成)
- `upload_result.json` - 上次上传的结果文件

## 技术原理

### 三步上传流程
1. **获取访问令牌**:使用App ID和Secret获取`tenant_access_token`
2. **上传文件**:使用飞书`/im/v1/files` API上传文件,获取`file_key`
3. **发送消息**:使用`file_key`发送文件消息到指定聊天

### API端点
- 获取令牌:`POST /open-apis/auth/v3/tenant_access_token/internal`
- 上传文件:`POST /open-apis/im/v1/files`
- 发送消息:`POST /open-apis/im/v1/messages`

### 权限要求
- `im:message:send_as_bot` - 发送消息权限
- `im:file:send_as_bot` - 发送文件权限(可能需要)
- 文件上传权限(通过`drive:file:upload`已授权)

## 使用示例

### 示例1:上传文本文件
```bash
# 创建测试文件
echo "测试内容" > test.txt

# 上传并发送到群聊
node feishu_complete_upload.js test.txt oc_dd899cb1a7846915cdd2d6850bd1dafa
```

##...

README excerpt

# Feishu Upload Skill

![Feishu Logo](https://sf3-cn.feishucdn.com/obj/eden-cn/ljhwzthljh/feishu.png)

一个强大的飞书文件上传技能,允许OpenClaw直接上传文件到飞书云盘并发送到聊天。

## 🚀 快速开始

### 安装
```bash
# 将此文件夹复制到skills目录
cp -r feishu-upload-skill /home/node/.openclaw/workspace/skills/
```

### 基本使用
```bash
# 上传文件并发送到聊天
node feishu_complete_upload.js <文件路径> <聊天ID>

# 示例:上传记忆文件到群聊
node feishu_complete_upload.js memory_files.tar.gz oc_dd899cb1a7846915cdd2d6850bd1dafa
```

## 📦 功能特性

### 核心功能
- **一键上传**:上传本地文件到飞书
- **智能发送**:自动发送文件消息到指定聊天
- **令牌管理**:自动获取和刷新访问令牌
- **大小检查**:自动验证文件大小(≤30MB)
- **格式支持**:支持所有文件类型

### 技术优势
- **零依赖**:使用Node.js 18+原生功能
- **高性能**:直接API调用,无需中间层
- **易集成**:简单命令行接口
- **可扩展**:模块化设计,易于定制

## 🛠️ 使用方法

### 1. 上传并发送文件
```bash
# 上传文本文件
node feishu_complete_upload.js document.txt oc_dd899cb1a7846915cdd2d6850bd1dafa

# 上传图片
node feishu_complete_upload.js photo.jpg oc_dd899cb1a7846915cdd2d6850bd1dafa

# 上传压缩包
node feishu_complete_upload.js archive.zip oc_dd899cb1a7846915cdd2d6850bd1dafa
```

### 2. 仅上传文件(获取文件Key)
```bash
# 上传文件但不发送
node feishu_complete_upload.js file.txt

# 输出示例:
# {
#   "status": "success",
#   "upload": {
#     "file_key": "file_v3_00ur_xxx",
#     "file_name": "file.txt",
#     "file_size": 1234
#   },
#   "sent": false
# }
```

### 3. 手动管理令牌
```bash
# 获取新的访问令牌
./get_feishu_token.sh

# 查看当前令牌
cat feishu_token.txt
```

## 🔧 技术细节

### 工作流程
```
1. 读取配置文件 → 获取App ID/Secret
2. 获取访问令牌 → 调用/auth/v3/tenant_access_token/internal
3. 上传文件 → 调用/im/v1/files (FormData上传)
4. 获取文件Key → 从响应中提取file_key
5. 发送消息 → 调用/im/v1/messages (使用file_key)
6. 返回结果 → 输出JSON格式结果
```

### API调用
```javascript
// 上传文件
POST https://open.feishu.cn/open-ap...

Related Claw Skills

heyixuan2

bambu-studio-ai

★ 41

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pipeline: search → generate → analyze → colorize → preview → open BS → user slice → print → monitor. Supports all 9 Bambu Lab printers (A1 Mini, A1, P1S, P2S, X1C, X1E, H2C, H2S, H2D).

capt-marbles

geo-optimization

★ 1

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discoverability and citation.

carlulsoe

parakeet-stt

★ 0

Local speech-to-text with NVIDIA Parakeet TDT 0.6B v3 (ONNX on CPU). 30x faster than Whisper, 25 languages, auto-detection, OpenAI-compatible API. Use when transcribing audio files, converting speech to text, or processing voice recordings locally without cloud APIs.

carlzhao007

feishu-process-feedback

★ 0

飞书消息自动处理与进度反馈技能。安装后后台运行,监听飞书任务消息并自动创建独立进程处理。 在处理前后发送实时进度反馈(任务确认、进度百分比、完成通知)。 支持任务类型识别、智能解析、错误重试、并发控制、状态持久化。 使用场景:飞书自动化工作流、任务进度追踪、批量任务处理、需要实时反馈的场景。

cartoonitunes

bottyfans

★ 0

BottyFans agent skill for autonomous creator monetization. Lets AI agents register, build a profile, publish posts (public, subscriber-only, or pay-to-unlock), upload media, accept USDC subscriptions and tips on Base, send and receive DMs, track earnings, and appear on the creator leaderboard. Use this skill when an agent needs to monetize content, interact with fans, manage a creator profile, handle payments in USDC, or operate as an autonomous creator on the BottyFans platform.

camopel

arxivkb

★ 0

Local arXiv paper manager with semantic search. Crawls arXiv categories, downloads PDFs, chunks content, and indexes with FAISS + Ollama embeddings. No cloud API keys required — everything runs locally.