Search

PythonReactSEOPDF
OpenClaw

Feishu Probe Optimize

飞书 Probe 优化

bobbycats0 source installs☆ 0 Repository stars

Installation

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 bobbycats/feishu-probe-optimize

Inspect 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.

View source ↗Guides

Skill instructions

飞书 Probe 优化

检测并优化飞书扩展的 probe 缓存配置,减少 API 调用次数。

问题背景

OpenClaw 的飞书扩展在每次健康检查时会调用飞书 Bot API /open-apis/bot/v3/info 来验证连接状态。健康检查每分钟执行一次。

飞书免费额度:每月 50,000 次(2026年3月)

默认配置
状态 缓存时间
成功 10 分钟
失败 1 分钟
默认情况下的 API 调用量

假设配置了 N 个飞书账号:

  • 每天调用:N × 24 × 60 = N × 1,440 次
  • 每月调用:N × 43,200 次

如果配置 3 个飞书账号,每月调用 129,600 次,很容易超过飞书免费配额。

优化方案

将缓存时间调整为更长间隔:

状态 默认时间 优化后时间
成功 10 分钟 24 小时
失败 1 分钟 1 小时
优化后的 API 调用量
  • 每天调用:N × 1 次 = N 次
  • 每月调用:N × 30 次

3 个账号:每月仅 90 次,节省 99.93%。

新增飞书账号

每增加一个飞书账号,每 24 小时会增加 1 次 API 调用(成功情况下)。配置本身无需修改,缓存机制自动适配所有账号。

账号数 每天调用 每月调用
1 1 30
3 3 90
5 5 150
10 10 300

更新 OpenClaw 后

OpenClaw 大版本更新时,extensions/feishu/src/probe.ts 文件会被覆盖,缓存时间会恢复到默认值(10分钟/1分钟)。

更新后需要:

  1. 重新修改 probe.ts 中的缓存配置
  2. 执行全量编译:pnpm build
  3. 重启服务:systemctl --user restart openclaw-gateway

详见下文「使用步骤」。

使用步骤

步骤 1:定位文件
find ~/.openclaw/workspace/openclaw/extensions/feishu/src -name "probe.ts"
步骤 2:修改配置

打开 probe.ts,找到这两行:

const PROBE_SUCCESS_TTL_MS = 10 * 60 * 1000; // 10 minutes
const PROBE_ERROR_TTL_MS = 60 * 1000; // 1 minute

修改为:

const PROBE_SUCCESS_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours
const PROBE_ERROR_TTL_MS = 60 * 60 * 1000; // 1 hour
步骤 3:全量编译

重要:必须执行全量编译,禁止单扩展编译。

cd ~/.openclaw/workspace/openclaw
pnpm build
步骤 4:验证编译产物

检查...

Source information

Source
github
Repository
openclaw/skills
Path
skills/bobbycats/feishu-probe-optimize
Version
—
Commit
0f3d472914da0f10c58bd446a6f71ea68d993b88
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# 飞书 Probe 优化

检测并优化飞书扩展的 probe 缓存配置,减少 API 调用次数。

## 问题背景

OpenClaw 的飞书扩展在每次健康检查时会调用飞书 Bot API `/open-apis/bot/v3/info` 来验证连接状态。健康检查每分钟执行一次。

> **飞书免费额度**:每月 50,000 次(2026年3月)

### 默认配置

| 状态 | 缓存时间 |
|------|---------|
| 成功 | 10 分钟 |
| 失败 | 1 分钟 |

### 默认情况下的 API 调用量

假设配置了 N 个飞书账号:

- 每天调用:N × 24 × 60 = N × 1,440 次
- 每月调用:N × 43,200 次

如果配置 3 个飞书账号,每月调用 **129,600 次**,很容易超过飞书免费配额。

## 优化方案

将缓存时间调整为更长间隔:

| 状态 | 默认时间 | 优化后时间 |
|------|---------|-----------|
| 成功 | 10 分钟 | **24 小时** |
| 失败 | 1 分钟 | **1 小时** |

### 优化后的 API 调用量

- 每天调用:N × 1 次 = N 次
- 每月调用:N × 30 次

3 个账号:每月仅 **90 次**,节省 **99.93%**。

## 新增飞书账号

每增加一个飞书账号,每 24 小时会增加 1 次 API 调用(成功情况下)。配置本身无需修改,缓存机制自动适配所有账号。

| 账号数 | 每天调用 | 每月调用 |
|--------|---------|---------|
| 1 | 1 | 30 |
| 3 | 3 | 90 |
| 5 | 5 | 150 |
| 10 | 10 | 300 |

## 更新 OpenClaw 后

OpenClaw 大版本更新时,`extensions/feishu/src/probe.ts` 文件会被覆盖,缓存时间会恢复到默认值(10分钟/1分钟)。

**更新后需要:**

1. 重新修改 `probe.ts` 中的缓存配置
2. 执行全量编译:`pnpm build`
3. 重启服务:`systemctl --user restart openclaw-gateway`

详见下文「使用步骤」。

## 使用步骤

### 步骤 1:定位文件

```bash
find ~/.openclaw/workspace/openclaw/extensions/feishu/src -name "probe.ts"
```

### 步骤 2:修改配置

打开 probe.ts,找到这两行:

```typescript
const PROBE_SUCCESS_TTL_MS = 10 * 60 * 1000; // 10 minutes
const PROBE_ERROR_TTL_MS = 60 * 1000; // 1 minute
```

修改为:

```typescript
const PROBE_SUCCESS_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours
const PROBE_ERROR_TTL_MS = 60 * 60 * 1000; // 1 hour
```

### 步骤 3:全量编译

**重要:必须执行全量编译,禁止单扩展编译。**

```bash
cd ~/.openclaw/workspace/openclaw
pnpm build
```

### 步骤 4:验证编译产物

检查...

Related skills

OpenClaw

laborany

laborany

基于 Claude Code 的桌面 AI 工作力平台 — 支持飞书/QQ 远程调度、技能创建、定时任务。OpenClaw 的桌面实现,零代码养好你的 AI 🦞 Desktop AI workforce platform built on Claude Code. Feishu/QQ bot integration, skill c...

OpenClaw

openclaw-admin

duanecilliers

Web-based admin dashboard for OpenClaw — manage Discord persona bots, workspace files, skills, cron jobs, channels, and config