stock-data-skill
OpenClaw Skill for stock data analysis
Feishu image upload and send tool. Send images to Feishu chats by uploading first then sending with image_key. Usage: `node feishu-image-tool.js send --target <open_id> --file <path>`
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
SkillHub CLI
skillhub install bo170814/feishu-img-toolInspect the source and compatibility requirements, then follow its installation steps.
Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.
Tool feishu_image for uploading and sending images to Feishu chats.
Feishu requires a two-step process to send images:
/open-apis/im/v1/images to upload the image and get image_key
/open-apis/im/v1/messages with msg_type: "image" and the image_key
{
"action": "send",
"target": "ou_xxx", // User open_id or chat_id
"file_path": "/path/to/image.png",
"message": "Optional caption"
}
Parameters:
action: "send"
target: Feishu user open_id or chat_id (omit for current conversation)file_path: Path to the image file on the servermessage: Optional text message to send with the imageReturns:
success: booleanimage_key: The uploaded image keymessage_id: The sent message ID{
"action": "upload",
"file_path": "/path/to/image.png"
}
Returns image_key for later use.
{
"action": "send_with_key",
"target": "ou_xxx",
"image_key": "img_v3_xxx"
}
Required credentials (in order of priority):
FEISHU_APP_ID, FEISHU_APP_SECRET
~/.feishu-image/config.json
# Method 1: Environment variables
export FEISHU_APP_ID="cli_xxx"
export FEISHU_APP_SECRET="xxx"
# Method 2: Config file (~/.feishu-image/config.json)
{
"appId": "cli_xxx",
"appSecret": "xxx"
}
im:message - Send messages as botim:image - Upload imagesim:message - Send messages as botim:image - Upload images{
"action": "send",...
These signals come from indexed source analysis and may lag behind changes. Check the current source files.
这个技能允许你在飞书中发送图片消息。
clawhub install feishu-image-send
技能将安装到 ClawHub 技能目录。
# 发送图片给用户(带文字说明)
node feishu-image-tool.js send \
--target ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--file /tmp/stock-report.png \
--message "📊 今日股票报告"
# 仅上传图片,获取 image_key
node feishu-image-tool.js upload \
--file /tmp/image.png
# 使用已有的 image_key 发送消息
node feishu-image-tool.js send-with-key \
--target ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--image-key img_v3_xxx
const { exec } = require('child_process');
exec(`node feishu-image-tool.js send --target ${userId} --file ${filePath}`, (error, stdout, stderr) => {
if (error) {
console.error(`Error: ${error}`);
return;
}
const result = JSON.parse(stdout);
console.log('Image sent:', result.message_id);
});
export FEISHU_APP_ID="cli_xxxxxxxxxxxxxxxx"
export FEISHU_APP_SECRET="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
创建 ~/.feishu-image/config.json:
{
"appId": "cli_xxxxxxxxxxxxxxxx",
"appSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
可从示例配置复制:
cp config.example.json ~/.feishu-image/config.json
# 然后编辑 ~/.feishu-image/config.json 填入你的凭证
im:message - 发送消息im:image - 上传图片成功响应:
{
"success": true,
"image_key": "img_v3_02vd_xxx",
"message_id": "om_x100b5560xxx"
}
# Feishu Image Tool
Tool `feishu_image` for uploading and sending images to Feishu chats.
## How It Works
Feishu requires a two-step process to send images:
1. **Upload Image** - Call `/open-apis/im/v1/images` to upload the image and get `image_key`
2. **Send Message** - Call `/open-apis/im/v1/messages` with `msg_type: "image"` and the `image_key`
## Actions
### Upload and Send Image
```json
{
"action": "send",
"target": "ou_xxx", // User open_id or chat_id
"file_path": "/path/to/image.png",
"message": "Optional caption"
}
```
**Parameters:**
- `action`: `"send"`
- `target`: Feishu user open_id or chat_id (omit for current conversation)
- `file_path`: Path to the image file on the server
- `message`: Optional text message to send with the image
**Returns:**
- `success`: boolean
- `image_key`: The uploaded image key
- `message_id`: The sent message ID
### Upload Image Only
```json
{
"action": "upload",
"file_path": "/path/to/image.png"
}
```
Returns `image_key` for later use.
### Send Image with Key
```json
{
"action": "send_with_key",
"target": "ou_xxx",
"image_key": "img_v3_xxx"
}
```
## Image Limits
- **Max size**: 10 MB
- **Supported formats**: JPG, JPEG, PNG, WEBP, GIF, BMP, ICO
- **Resolution**:
- GIF: max 2000 x 2000 pixels
- Other formats: max 12000 x 12000 pixels
## Configuration
### Feishu App Credentials
Required credentials (in order of priority):
1. Environment variables: `FEISHU_APP_ID`, `FEISHU_APP_SECRET`
2. Config file: `~/.feishu-image/config.json`
```bash
# Method 1: Environment variables
export FEISHU_APP_ID="cli_xxx"
export FEISHU_APP_SECRET="xxx"
# Method 2: Config file (~/.feishu-image/config.json)
{
"appId": "cli_xxx",
"appSecret": "xxx"
}
```
### Required Permissions
- `im:message` - Send messages as bot
- `im:image` - Upload images
## Permissions
- `im:message` - Send messages as bot
- `im:image` - Upload images
## Example Usage
### Send stock chart to user
```json
{
"action": "send",...# Feishu Image Skill - 飞书图片发送技能
这个技能允许你在飞书中发送图片消息。
## 安装
```bash
clawhub install feishu-image-send
```
技能将安装到 ClawHub 技能目录。
## 使用方法
### 方法 1:直接使用 Node.js 脚本
```bash
# 发送图片给用户(带文字说明)
node feishu-image-tool.js send \
--target ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--file /tmp/stock-report.png \
--message "📊 今日股票报告"
# 仅上传图片,获取 image_key
node feishu-image-tool.js upload \
--file /tmp/image.png
# 使用已有的 image_key 发送消息
node feishu-image-tool.js send-with-key \
--target ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--image-key img_v3_xxx
```
### 方法 2:在 OpenClaw 中调用
```javascript
const { exec } = require('child_process');
exec(`node feishu-image-tool.js send --target ${userId} --file ${filePath}`, (error, stdout, stderr) => {
if (error) {
console.error(`Error: ${error}`);
return;
}
const result = JSON.parse(stdout);
console.log('Image sent:', result.message_id);
});
```
## 配置
### 方法 1:环境变量(推荐)
```bash
export FEISHU_APP_ID="cli_xxxxxxxxxxxxxxxx"
export FEISHU_APP_SECRET="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```
### 方法 2:配置文件
创建 `~/.feishu-image/config.json`:
```json
{
"appId": "cli_xxxxxxxxxxxxxxxx",
"appSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
```
可从示例配置复制:
```bash
cp config.example.json ~/.feishu-image/config.json
# 然后编辑 ~/.feishu-image/config.json 填入你的凭证
```
### 获取飞书应用凭证
1. 访问 [飞书开放平台](https://open.feishu.cn/app)
2. 创建企业自建应用
3. 获取 App ID 和 App Secret
4. 确保应用有以下权限:
- `im:message` - 发送消息
- `im:image` - 上传图片
## 限制
- 图片大小:最大 10 MB
- 支持格式:JPG, JPEG, PNG, WEBP, GIF, BMP, ICO
- 分辨率限制:
- GIF: 最大 2000 x 2000 像素
- 其他格式:最大 12000 x 12000 像素
## 输出示例
成功响应:
```json
{
"success": true,
"image_key": "img_v3_02vd_xxx",
"message_id": "om_x100b5560xxx"
}
```
## 故障排除
### 错误:Cannot find module '@lark...OpenClaw Skill for stock data analysis
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 discove...
139邮箱邮件收发 Skill - 支持 IMAP/SMTP 协议,兼容139/QQ/163/Gmail等主流邮箱 功能: 1. 发送邮件(SMTP) 2. 接收邮件(IMAP) 3. 查看收件箱列表 4. 查看未读邮件 当用户提到 "发邮件"、"收邮件"、"查看邮件"、"邮箱"...
⚠️ 重要声明