当前位置: 首页 > Skill >

Feishu Group Memory

Feishu Group Memory

Feishu Group Memory

从飞书群消息中提取并存储结构化信息,随后查询并获取AI生成的洞察。适用于用户想要:记录群中正在讨论的内容。

1.0.0 2026.11.12 532
获取Skill文件查看使用说明
作 者:林舟 许可证: 更新时间:2026.11.12
本文目录展开

Feishu Group Memory

Architecture

Scripts handle data only — no LLM calls inside scripts:

  • onboarding.py — read/write industry knowledge pack config
  • listener.py — fetch raw messages from Feishu; save analyzed records
  • query.py — keyword search over stored records
  • billing.py — SkillPay charge/balance/payment-link

All AI analysis is done by you (the OpenClaw model): deciding what to record, extracting structured fields, generating advice, writing summaries.

Quick Reference

Operation Script Billed
Check industry config onboarding.py check Free
Load built-in industry pack onboarding.py setup --industry Free
Save custom industry pack onboarding.py save --content Free
Find group by name listener.py find_chat --name Free
Fetch raw messages listener.py fetch_raw Free
Save analyzed records listener.py save_records Free
Search records query.py search Free
List records by period query.py list_records Free
Fetch + analyze messages (fetch_raw → you analyze → save_records) 0.005 USDT
Get AI advice (query → you advise) 0.003 USDT
Generate summary report (list_records → you summarize) 0.005 USDT

First Use: Onboarding

At the start of every session, check whether an industry pack is configured:

python3 {baseDir}/scripts/onboarding.py check --workspace ~/.openclaw/workspace
  • {"configured": true, "context": "..."} → load the context field and proceed
  • {"configured": false} → run onboarding before anything else

Onboarding conversation

Ask the user:

"Before we start, I'd like to understand what your group is mainly used for so I can record and analyze the right things.

Choose one, or describe it in your own words:

  1. 📈 Sales tracking (leads, quotes, deals)
  2. 🎧 Customer support (tickets, issues, complaints)
  3. ⚖️ Legal matters (contracts, risks, cases)
  4. 📋 Project management (tasks, milestones, blockers)
  5. ✍️ Describe my own use case"

Saving the config

Built-in industry (options 1–4):

python3 {baseDir}/scripts/onboarding.py setup 
  --industry sales 
  --workspace ~/.openclaw/workspace

Valid slugs: sales / customer-service / legal / project

Custom description (option 5):

Using the user's description and the template at {baseDir}/templates/context-template.md, generate the knowledge pack yourself, then save it:

python3 {baseDir}/scripts/onboarding.py save 
  --content "YOUR GENERATED CONTENT" 
  --workspace ~/.openclaw/workspace

Confirm with the user: "Got it! I'll use this context going forward. Which group would you like me to start recording?"

Feature: Record Group Messages

Trigger: "record X group", "fetch messages from X", "capture what's been discussed in X"

Step 1 — Find the group

python3 {baseDir}/scripts/listener.py find_chat --name "KEYWORD"

If multiple results, show them and ask the user to pick one.

Step 2 — Fetch raw messages

python3 {baseDir}/scripts/listener.py fetch_raw 
  --chat_id CHAT_ID 
  --limit 100 
  --workspace ~/.openclaw/workspace

Returns an array of {msg_id, time, sender, text} objects.

Step 3 — You analyze

Using the loaded industry knowledge pack (from onboarding check), go through each message and decide:

  • Is it worth recording?
  • What category does it belong to?
  • Who or what is the key entity (person, company, project)?
  • What structured fields can be extracted?
  • What is the urgency (high / medium / low)?

Step 4 — Save the records

python3 {baseDir}/scripts/listener.py save_records 
  --chat_id CHAT_ID 
  --workspace ~/.openclaw/workspace 
  --records '[{"msg_id":"...","time":"...","sender":"...","raw_text":"...","category":"...","key_entity":"...","summary":"...","fields":{...},"urgency":"high"}]'

Step 5 — Report to user

Summarize what was found, e.g.:

"Analyzed 100 messages. Saved 12 items:

  • 3 customer intent signals (Li, Wang, Chen)
  • 5 follow-up actions
  • 4 pricing discussions

2 high-urgency items — want me to walk through them?"

Billing

python3 {baseDir}/scripts/billing.py charge 
  --user_id USER_ID --amount 0.005 --label "message analysis"

If payment_required is returned, show the top-up link and stop.

Feature: Query Records

Trigger: "how is Wang doing", "what happened with Acme last week", "show me recent follow-ups"

python3 {baseDir}/scripts/query.py search 
  --query "KEYWORD" 
  --workspace ~/.openclaw/workspace

Returns matching records as raw JSON. You turn them into a natural-language answer, e.g.:

"Here's what I have on Wang (Wang Zong):

  • Jan 15: Said he can sign next week (high priority)
  • Jan 12: Asked about discount options, still considering

Last contact was 3 days ago — worth reaching out today."

No charge for queries.

Feature: AI Advice

Trigger: "how should I follow up with X", "give me some advice", "help me think through this"

First, search for relevant records:

python3 {baseDir}/scripts/query.py search 
  --query "KEYWORD" 
  --workspace ~/.openclaw/workspace

Then reload the industry pack if needed:

python3 {baseDir}/scripts/onboarding.py check --workspace ~/.openclaw/workspace

Using the "Advice Templates" section of the knowledge pack and the retrieved records, give the user concrete, actionable advice directly.

python3 {baseDir}/scripts/billing.py charge 
  --user_id USER_ID --amount 0.003 --label "AI advice"

Feature: Summary Report

Trigger: "summarize today", "weekly report", "what happened this week"

python3 {baseDir}/scripts/query.py list_records 
  --period today|week|all 
  --workspace ~/.openclaw/workspace

You write the summary. Example structure:

Weekly Summary (Jan 13–19)

28 items recorded across 7 customers.

Action required (3)

  • Li Zong: ready to sign — prepare draft contract
  • Wang Zong: price sticking point — request special approval

By category

  • Customer intent: 12 | Follow-ups: 8 | Pricing: 5 | Other: 3

Suggestion: 2 customers haven't been contacted in 5+ days.

python3 {baseDir}/scripts/billing.py charge 
  --user_id USER_ID --amount 0.005 --label "summary report"

Error Handling

Situation Response
No industry pack configured Run onboarding first
Group not found "I couldn't find a group called 'X'. Could you give me the full name?"
No records yet "Nothing recorded yet. Want me to fetch messages from that group now?"
payment_required Show the top-up link from message field, stop, wait for user
Missing Feishu credentials Ask user to configure channels.feishu.accounts in openclaw.json

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,003
Apache开启.htaccess及使用方法详解

本文介绍如何在本地Apache环境中启用.htaccess文件,主要涉及修改httpd.conf中的AllowOverride参数。同时详细解析.htaccess的多种实用功能,包括自定义错误页面、目录密码保护、IP访问限制、URL自动转向、默认首页设置以及防止图片盗链等配置方法,并分析了使用.htaccess对服务器性能和安全性的潜在影响。

2026.05.09 1,001
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,001
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,000
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,000
Skill 文件
  • SKILL.md
    • Feishu Group Memory
    • Architecture
    • Quick Reference
    • First Use: Onboarding
      • Onboarding conversation
      • Saving the config
    • Feature: Record Group Messages
      • Step 1 — Find the group
      • Step 2 — Fetch raw messages
      • Step 3 — You analyze
      • Step 4 — Save the records
      • Step 5 — Report to user
      • Billing
    • Feature: Query Records
    • Feature: AI Advice
    • Feature: Summary Report
    • Error Handling
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期