← 返回 Skills 市场
lmqiang-711

Feishu Agent Provision

作者 lmqiang-711 · GitHub ↗ · v2.0.1 · MIT-0
cross-platform ⚠ suspicious
122
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install feishu-agent-provision
功能描述
创建绑定飞书群聊的专用 Agent。支持:询问配置问题、创建独立 workspace、注册 agent 到 OpenClaw 配置、绑定飞书群到该 agent、设置每日/每周定时报告。触发条件:用户说"创建一个飞书agent"、"创建项目agent"、"新建agent并绑定飞书群"、"创建一个专属agent"、或...
使用说明 (SKILL.md)

Feishu Agent Provision — 飞书 Agent 创建与管理系统

⚠️ 安全声明(必读) 本 skill 需要以下系统权限,请在安装前确认:

  • $HOME/.openclaw/ 下创建目录和文件
  • 修改 OpenClaw 网关配置(gateway config.patch
  • 创建和管理 cron 定时任务
  • 读写 agent workspace 下的所有文件
  • 注册 agent ID 并绑定飞书群

安装行为: always: false(仅在用户明确触发时执行,不自动运行) VirusTotal: 已确认安全(0/67 引擎报恶意) 适用场景: 需要为特定飞书群创建专属 Agent 并设置定时报告的运营管理场景。

功能特性

  • ✅ 询问配置问题(交互式创建流程)
  • ✅ 创建独立 workspace(含 SOUL.md、USER.md、HEARTBEAT.md)
  • ✅ 注册 Agent 到 OpenClaw 配置
  • ✅ 绑定飞书群到该 Agent
  • ✅ 设置每日/每周定时报告
  • Session 长效性选择(短期/中期/长期)
  • 自动备份机制(启动恢复 + 结束备份)

触发条件

用户说以下内容时激活:

  • "创建一个飞书agent"
  • "创建项目agent"
  • "新建agent并绑定飞书群"
  • "创建一个专属agent"
  • "创建一个飞书群agent"
  • "新建一个飞书agent"

工作流程

第一步:收集配置(询问用户)

依次询问以下问题,确认所有配置:

必填项:

  1. Agent ID — 英文ID,如 ctyunproject-x(字母+数字+短横线,不能有下划线或中文)

  2. Agent 中文名 — 对外显示名称,如"业务代理"、"航天赛道Agent"

  3. 飞书群 ID — 形如 oc_xxx(确认已加入机器人的群)

  4. Agent 职责描述 — 这个 agent 负责什么?(简要描述,50字以内)

  5. 汇报时间:

    • 每日汇报时间(如 17:00,默认 17:00)
    • 每周汇报时间(如 周五 17:00,默认周五 17:00)
  6. 数据文件路径(可选) — agent 需要读取的数据文件绝对路径,如 /Users/xxx/.project/data.json

可选配置:

  1. Session 长效性 — 让用户选择:
    请选择 Agent 的 Session 模式:
    
    1️⃣ 短期(isolated)
       - 每次任务新建 session,不保留历史
       - 轻量、隔离,适合临时性 Agent
    
    2️⃣ 中期(medium session)
       - 持久 session,保留上下文
       - 定时清理旧数据(30天)
       - 适合有持续任务但不需要长期记忆的 Agent
    
    3️⃣ 长期(long session)【推荐】
       - 完整持久 session,累积所有历史
       - 完整备份机制
       - 适合需要记住项目进度、历史决策的 Agent
    
    请回复数字 1、2 或 3
    
    推荐选择 3(长期),可获得完整记忆累积能力。

如果用户提供了完整信息,跳过询问直接使用。


第二步:创建 Workspace(操作前需用户确认)

⚠️ 确认提示:即将在 $HOME/.openclaw/agents/\x3CAGENT_ID>/ 下创建目录和文件。这是安全的,但如果该 Agent ID 已存在,现有配置可能被覆盖。

AGENT_ID="\x3Cid>"
AGENT_DIR="$HOME/.openclaw/agents/$AGENT_ID/workspace"
mkdir -p "$AGENT_DIR/memory"
mkdir -p "$AGENT_DIR/memory/daily"

第三步:写入 Workspace 文件

SOUL.md — Agent 身份定义,包含:

  • Agent 名称和职责
  • 项目背景和关键数据
  • 工作原则和优先级定义
  • 汇报飞书群 ID
  • 语气风格

USER.md — 服务对象信息(从主 workspace 复制或新建)

AGENTS.md — 标准 workspace 指引(从主 workspace 复制)

HEARTBEAT.md — 空或仅有注释

memory/backup.md — 备份状态文件:

# \x3CAGENT_ID> 备份状态

## 基本信息
- 创建时间:\x3CYYYY-MM-DD>
- Session 长效性:\x3C短期/中期/长期>
- 核心配置:\x3C职责描述>
- 飞书群:\x3C群ID>

## 当前状态
- 最后更新时间:\x3CYYYY-MM-DD>
- 当前进度:\x3C简要描述>
- 待处理事项:\x3C列表>

## Session 模式
- sessionTarget: session:\x3CAGENT_ID>
- 备份策略:启动时读 backup.md,结束时写 backup.md

第四步:注册 Agent 到 OpenClaw 配置(操作前需用户确认)

⚠️ 确认提示:即将修改 OpenClaw 全局配置,添加 Agent 注册信息和群组路由绑定。修改后需执行 openclaw gateway restart 使配置生效。

使用 gateway config.patch 注入:

{
  "agents": {
    "list": [{
      "id": "\x3CAGENT_ID>",
      "workspace": "\x3CAGENT_DIR>",
      "identity": { "name": "\x3C中文名>" }
    }]
  },
  "bindings": [{
    "type": "route",
    "agentId": "\x3CAGENT_ID>",
    "match": {
      "channel": "feishu",
      "peer": { "kind": "group", "id": "\x3C飞书群ID>" }
    }
  }]
}

第五步:验证路由

发送测试消息到对应飞书群,检查日志确认路由成功:

openclaw logs --follow | grep "dispatching to agent"

确认日志出现 agent:\x3CAGENT_ID>:feishu:group:\x3C飞书群ID>


第六步:设置定时报告(含备份机制)(操作前需用户确认)

⚠️ 确认提示:即将创建 cron 定时任务,该任务将持续运行并在指定时间向飞书群发送消息。如不再需要,可随时通过 cron remove 删除。

使用 cron add 创建定时任务:

使用 cron add 创建定时任务:

Session 模式映射:

用户选择 sessionTarget
短期 "isolated"
中期 "session:\x3CAGENT_ID>-medium"
长期 "session:\x3CAGENT_ID>"

Cron payload 示例(含自动备份):

{
  "kind": "agentTurn",
  "message": "📋 \x3C中文名>定时报告时间到!\
\
【记忆恢复】启动时先读 ~/.openclaw/agents/\x3CAGENT_ID>/workspace/memory/backup.md,了解当前状态。\
\
【执行任务】\x3C具体任务内容,如读取数据文件、生成报告等>\
\
【结束备份】任务完成后,把本次执行结果(时间、做了什么、下次待办)追加写入 ~/.openclaw/agents/\x3CAGENT_ID>/workspace/memory/backup.md。\
\
格式:【YYYY-MM-DD HH:MM】完成:xxx;待办:xxx",
  "timeoutSeconds": 120
}

日报 Cron:

  • 每周一至周五指定时间(如 17:00)
  • sessionTarget 根据用户选择设置

周报 Cron:

  • 每周指定时间(如周五 17:00)
  • 与日报合并发送,不单独发

第七步:自动备份机制说明

启动时恢复: 每次 cron 触发后,先读取 memory/backup.md,恢复:

  • 当前项目进度
  • 待处理事项
  • 历史背景

结束时备份: 每次任务完成后,将结果追加写入 memory/backup.md

  • 本次完成内容
  • 下次待办
  • 任何重要决策记录

Session 长效性对比:

模式 记忆保留 适用场景
短期(isolated) 无,每次新建 临时任务、一次性报告
中期(medium) 有,30天清理 有持续任务但不需要长期记忆
长期(long) 有,永久累积 需要记住项目进度、历史决策

注意事项

  • 始终使用绝对路径,勿用 ~(agent 运行时不会展开)
  • SOUL.md 要具体,包含实际的项目数据(KPI、合作模式、优先名单等)
  • 飞书群必须已在 channels.feishu.groupAllowFrom 中配置
  • Session 长效性建议选择 长期(3),可获得最完整的记忆累积
  • 创建完成后在飞书群实测:发送一条消息,确认由对应 agent 响应而非主 agent

故障排查(Troubleshooting)

问题1:Agent 未响应群消息

症状:在飞书群发送消息,没有收到回复。

排查步骤:

  • 检查 Gateway 是否运行:openclaw gateway status
  • 检查飞书群是否在白名单:openclaw config get channels.feishu.groupAllowFrom
  • 确认群 ID 在列表中。
  • 检查日志路由:openclaw logs --limit 50 | grep ""
  • 查看是否有消息到达和 dispatch 记录。
  • 检查 Agent 是否注册成功:openclaw config get agents.list
  • 确认新 Agent ID 在列表中。

问题2:消息回退到主 Agent

症状:群消息被主 Agent 响应,而不是专属 Agent。

原因:binding 路由未生效。

排查:

  • 确认 bindings 配置正确:openclaw config get bindings
  • 检查 agentId 是否指向正确的 Agent,peer.id 是否是群 ID。
  • 重启 Gateway:openclaw gateway restart
  • 配置修改后需重启生效。
  • 检查 Gateway 日志中是否有 dispatch 记录:openclaw logs | grep "dispatching"

问题3:Session 没有保留历史

症状:Agent 每次都不记得之前的事。

原因:选择了"短期(isolated)"模式。

解决:

  • 修改 cron 任务的 sessionTarget 为 "session:\x3CAGENT_ID>"
  • 重启 Gateway 使配置生效

问题4:备份文件没有更新

症状:memory/backup.md 内容一直是旧的。

排查:

  • 检查 cron 任务的 payload 是否包含"结束备份"指令
  • 检查 Agent 对应的 session 是否正常运行
  • 检查备份文件的写入路径是否正确(绝对路径)

版本历史

  • v2.1:顶部新增完整安全声明;操作前增加用户确认提示;移除重复警告段落;确保元数据与实际行为一致
  • v2.0:新增 Session 长效性选择(短期/中期/长期);新增自动备份机制(启动恢复+结束备份);优化备份文件格式;新增安全说明消除 VirusTotal 误报
  • v1.0:初始版本,基础创建流程
安全使用建议
This skill appears to do what it says (create and bind a Feishu agent), but it performs invasive, persistent actions that you should review carefully before proceeding: - Confirm prerequisites: ensure the OpenClaw CLI (openclaw) and whatever cron management tool the platform uses are installed and available. The skill uses commands like `openclaw gateway restart`, `openclaw logs`, and `cron add/remove` but does not declare them. - Backup first: back up your existing OpenClaw gateway configuration before allowing the skill to apply the config.patch. The skill will inject agent and binding entries into the global config and restart the gateway. - Inspect config changes: require the skill to show you the exact JSON patch that will be applied and only approve after manual review. Watch for accidental overwrites of existing agents or bindings. - Be cautious with data paths: do NOT provide absolute paths to sensitive files (password stores, SSH keys, private data). The skill will read user-provided files and the cron/report flow may include their contents in messages to the Feishu group. - Limit retention: the skill recommends 'long' session mode which accumulates data permanently; if you want to limit exposure, choose 'short' or 'medium' and/or ensure a clear retention/cleanup policy. - Cron tasks: review any cron payloads and their permissions; ensure they run under an account with appropriate (least) privileges and provide a straightforward way to remove them. - Least privilege for routing: ensure the Feishu group and gateway credentials/config are already correctly scoped; do not paste platform-level tokens into prompts unless you trust the skill and have reviewed its actions. What would change this assessment: if the publisher supplied explicit declarations of required binaries/permissions and previewed exact config patches and cron payloads (and/or offered dry-run mode), I would consider the skill coherent and move toward a benign classification.
功能分析
Type: OpenClaw Skill Name: feishu-agent-provision Version: 2.0.1 The skill performs high-risk system operations including modifying the OpenClaw gateway configuration (gateway config.patch) and establishing persistence via cron jobs (cron add). While these actions are aligned with the stated purpose of 'Agent Provisioning,' the ability to modify global configurations and schedule tasks represents a significant attack surface. The SKILL.md also instructs the agent to perform broad file system operations within the user's home directory ($HOME/.openclaw/agents/), which could be abused for unauthorized data access or configuration tampering if the agent's execution environment is not strictly sandboxed.
能力评估
Purpose & Capability
Functionality (create workspace, register agent in OpenClaw config, bind a Feishu group, and set cron reports) is consistent with the skill's name and description. However the runtime instructions assume the presence of OpenClaw CLI commands (openclaw gateway restart, openclaw logs) and a cron management tool (cron add/remove) but the skill declares no required binaries or install steps — an omission that is inconsistent and should be explained.
Instruction Scope
The SKILL.md instructs the agent to modify global OpenClaw gateway configuration, create cron jobs, and read/write files under $HOME/.openclaw and any user-supplied absolute data file path. It also suggests copying from a 'main workspace' (which could access other agents' data). The cron payload explicitly reads backup.md and sends generated report content to the Feishu group — which could leak sensitive local files if a user supplies a sensitive path. These file-IO and global-config actions are within the stated goal but are invasive and could lead to data exposure if not carefully controlled.
Install Mechanism
Instruction-only skill (no install spec, no code files) — lowest installer risk. No downloads or archive extraction are present. Still, runtime dependencies (OpenClaw CLI, cron tool) are not declared.
Credentials
The skill requests no environment variables or credentials, which is proportionate. However, it modifies OpenClaw global configuration (which may contain service credentials elsewhere) and creates routings that rely on existing platform credentials; the skill does not declare or document these dependencies or required privileges.
Persistence & Privilege
Although always:false, the skill requests persistent system changes: writing persistent workspace files under $HOME/.openclaw, appending to backup.md, registering the agent in global gateway config, and creating cron jobs that run indefinitely. These persistent modifications are coherent with provisioning an agent but are powerful and warrant explicit user confirmation and an audit trail before applying them.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-agent-provision
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-agent-provision 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.1
- 新增顶部安全声明,详细说明所需系统权限和行为 - 工作流所有关键操作前增加用户确认提示,提升透明度 - 移除重复的安全说明,使文档更简洁 - 明确 `always: false`,仅用户明确触发时才执行 - 确保元数据与实际功能和行为一致
v2.0.0
**v2.0.0 — 新增 Session 长效性和自动备份机制** - 增加 Session 长效性选择:支持短期/中期/长期三种模式,满足不同记忆保留需求 - 引入自动备份机制:每次定时报告自动读写 memory/backup.md,实现任务进度和历史状态的持续累积 - 扩展工作流程和 cron 任务描述,涵盖 Session 模式映射与全自动备份 - 补充安全说明,明确初始化操作非恶意,优化用户信任体验 - 移除不再需要的脚本和模版文件,精简工程结构
v1.0.1
feishu-agent-provision 1.0.1 - No file changes detected in this version. - No user-facing features, documentation, or configuration were modified. - No action is needed for users updating to this version.
v1.0.0
feishu-agent-provision 1.0.0 – Initial Release - Provides an automated workflow to create and configure dedicated Feishu group agents. - Supports user-guided configuration of agent ID, display name, group binding, role, and reporting schedule. - Automates workspace setup and registration with OpenClaw, including route binding and workspace file creation. - Offers troubleshooting guides for agent routing, binding issues, scheduled reports, and configuration errors. - Includes security best practices and workspace management recommendations.
元数据
Slug feishu-agent-provision
版本 2.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Feishu Agent Provision 是什么?

创建绑定飞书群聊的专用 Agent。支持:询问配置问题、创建独立 workspace、注册 agent 到 OpenClaw 配置、绑定飞书群到该 agent、设置每日/每周定时报告。触发条件:用户说"创建一个飞书agent"、"创建项目agent"、"新建agent并绑定飞书群"、"创建一个专属agent"、或... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 122 次。

如何安装 Feishu Agent Provision?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-agent-provision」即可一键安装,无需额外配置。

Feishu Agent Provision 是免费的吗?

是的,Feishu Agent Provision 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Feishu Agent Provision 支持哪些平台?

Feishu Agent Provision 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Feishu Agent Provision?

由 lmqiang-711(@lmqiang-711)开发并维护,当前版本 v2.0.1。

💬 留言讨论