Lark Workflow Personal Crm logo

Lark Workflow Personal Crm

Community
liangdabiao
lark-workflow-personal-crm

个人CRM:自动扫描飞书邮箱和日历提取联系人,多维表格维护联系人档案和关系热度分,支持自然语言查询和超期提醒。当用户需要'联系人管理'、'CRM'、'谁联系过我'、'多久没联系'、'联系人热度'、'关系管理'时使用。

Overview

Publisherliangdabiao
Repositorylark-workflow-feishu-cli
Skill namelark-workflow-personal-crm
Stars
68
Forks
10
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by liangdabiao on GitHub. Read the source before you install it.

Installation

Install the Lark Workflow Personal Crm AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/liangdabiao/lark-workflow-feishu-cli/tree/main/.claude/skills/lark-workflow-personal-crm
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/liangdabiao/lark-workflow-feishu-cli.git /tmp/lark-workflow-feishu-cli
mkdir -p .claude/skills
cp -r /tmp/lark-workflow-feishu-cli/.claude/skills/lark-workflow-personal-crm .claude/skills/lark-workflow-personal-crm
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Lark Workflow Personal Crm in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Lark Workflow Personal Crm on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Lark Workflow Personal Crm is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

个人 CRM 工作流

CRITICAL — 开始前 MUST 先用 Read 工具读取 ../lark-shared/SKILL.md,其中包含认证、权限处理

适用场景

  • "上个月谁联系过我?" / "最近和谁有互动"
  • "XX 公司的人我最后一次聊过什么?" / "我和张三的关系怎么样"
  • "有没有超过 3 个月没联系的重要关系?" / "该跟进谁了"
  • "帮我建立联系人档案" / "从邮箱/日历导入联系人"
  • "这个人的热度分是多少" / "更新联系人信息"

前置条件

仅支持 user 身份。执行前确保已授权:

bash
lark-cli auth login --domain mail,calendar,contact,base,im

邮件模块降级说明:如果用户未启用飞书邮箱(mail 命令返回错误码 1230003),则:

  • "从邮箱导入"模式不可用,跳过邮件扫描步骤
  • 改用"从日历导入"和"从通讯录补充"作为主要数据来源
  • 在简报中标注"邮箱未启用,联系人数据仅来自日历和通讯录"

工作流总览

数据导入:
  ├── mail +messages ───────► 扫描邮箱 → 提取联系人 + 互动记录
  ├── calendar +agenda ─────► 扫描日历 → 提取会议参与者 + 互动记录
  └── contact +search-user ─► 补充飞书通讯录信息

数据存储:
  └── base +record-upsert ──► 多维表格(联系人 + 互动记录)

数据查询:
  └── base +record-list ────► 自然语言查询联系人

智能提醒:
  └── base +data-query ────► 筛选冷门联系人
  └── im +messages-send ───► 飞书消息提醒

数据初始化

首次使用时,创建多维表格数据结构:

Base 表结构

表 1:联系人主表 (contacts)

字段名类型说明
姓名文本联系人姓名
公司文本所在公司/组织
职位文本职位/角色
邮箱文本邮箱地址
手机文本联系方式
来源单选邮件/日历/通讯录/手动
关系类型单选客户/合作伙伴/同事/朋友/行业人脉/其他
重要程度单选高/中/低
热度分数字0-100,基于互动频率和最近互动时间计算
最后联系时间日期最近一次互动的时间
最后联系内容文本最近互动的摘要
备注文本自由备注
创建时间日期首次录入时间

表 2:互动记录 (interactions)

字段名类型说明
关联联系人关联关联到「联系人主表」
互动时间日期互动发生时间
互动类型单选邮件(发)/邮件(收)/会议/消息/电话/其他
互动摘要文本互动内容的简短描述
涉及主题文本讨论的话题或项目
邮件ID文件关联的邮件 message_id(如有)
会议ID文本关联的 meeting_id(如有)

初始化命令

bash
# 1. 创建多维表格
# 注意:+table-create 可能部分成功(表创建成功但字段创建失败),需捕获错误后用 +field-create 补字段
# 注意:连续创建字段会触发限流(错误码 800004135),每次调用间隔至少 1 秒
lark-cli base +table-create --name "联系人" --fields '[
  {"name":"姓名","type":"text"},
  {"name":"公司","type":"text"},
  {"name":"职位","type":"text"},
  {"name":"邮箱","type":"text"},
  {"name":"手机","type":"text"},
  {"name":"来源","type":"select","multiple":false,"options":[{"name":"邮件"},{"name":"日历"},{"name":"通讯录"},{"name":"手动"}]},
  {"name":"关系类型","type":"select","multiple":false,"options":[{"name":"客户"},{"name":"合作伙伴"},{"name":"同事"},{"name":"朋友"},{"name":"行业人脉"},{"name":"其他"}]},
  {"name":"重要程度","type":"select","multiple":false,"options":[{"name":"高"},{"name":"中"},{"name":"低"}]},
  {"name":"热度分","type":"number"},
  {"name":"最后联系时间","type":"datetime"},
  {"name":"最后联系内容","type":"text"},
  {"name":"备注","type":"text"},
  {"name":"创建时间","type":"datetime"}
]'
lark-cli base +table-create --name "互动记录" --fields '[
  {"name":"互动时间","type":"datetime"},
  {"name":"互动类型","type":"select","multiple":false,"options":[{"name":"邮件(发)"},{"name":"邮件(收)"},{"name":"会议"},{"name":"消息"},{"name":"电话"},{"name":"其他"}]},
  {"name":"互动摘要","type":"text"},
  {"name":"涉及主题","type":"text"},
  {"name":"邮件ID","type":"text"},
  {"name":"会议ID","type":"text"}
]'
# 注:关联联系人字段需单独用 +field-create 创建(type="lookup" 需要关联目标表 ID)

# 2. 记录 base_token 和各 table_id

首次使用时提示用户提供 Base URL 或创建新的多维表格。

限流处理:如果 +table-create 因限流部分失败,表仍会创建成功。此时:

  1. 用 base +table-list 获取 table_id
  2. 用 base +field-create --table-id <id> --json '{"name":"字段名","type":"text"}' 逐个补字段,每次间隔 1-2 秒

模式一:数据导入

从邮箱导入

bash
# 搜索指定时间范围的邮件
lark-cli mail +messages --folder INBOX --start-date "<YYYY-MM-DD>" --end-date "<YYYY-MM-DD>"

AI 处理逻辑:

  1. 从发件人和收件人中提取联系人信息(姓名、邮箱、公司签名)
  2. 分析邮件主题和正文,生成互动摘要(1-2句话)
  3. 识别互动主题(项目名、话题关键词)
  4. 对每个新联系人:创建联系人记录
  5. 对每个互动:创建互动记录并关联联系人

过滤规则:

  • 自动过滤广告邮件、系统通知、noreply 地址
  • 过滤内部的自动通知(CI/CD、日历邀请等)
  • 保留有实质内容的人际沟通

从日历导入

bash
# 获取指定时间范围的日程
lark-cli calendar +agenda --start "<ISO8601>" --end "<ISO8601>"

AI 处理逻辑:

  1. 从日程的参与者列表中提取联系人
  2. 使用 contact +search-user 补充飞书通讯录信息(职位、部门等)
  3. 生成互动摘要(会议主题)
  4. 创建/更新联系人记录和互动记录

从飞书通讯录补充

bash
lark-cli contact +search-user --query "<联系人姓名>"

当联系人信息不完整时,通过飞书通讯录补充公司、职位等信息。


模式二:热度分计算

热度分计算公式(0-100):

热度分 = 频率分(0-40) + 近期分(0-40) + 重要度分(0-20)

频率分(过去 90 天互动次数):
  0次 → 0分
  1-3次 → 10分
  4-10次 → 20分
  11-20次 → 30分
  20次以上 → 40分

近期分(最后一次互动距今天数):
  7天内 → 40分
  14天内 → 32分
  30天内 → 24分
  60天内 → 16分
  90天内 → 8分
  90天以上 → 0分

重要度分:
  高 → 20分
  中 → 12分
  低 → 4分

热度分在每次导入新互动后自动重新计算。


模式三:自然语言查询

支持的自然语言查询类型:

查询类型示例查询方式
按时间"上个月谁联系过我?"base +record-list 互动记录表 + 时间过滤
按公司"XX 公司的人我聊过什么?"base +record-list 联系人表 + 公司过滤
按人名"张三最近怎么样?"base +record-list 联系人表 + 姓名过滤
按热度"该跟进谁了?"base +data-query 热度分 < 30 的联系人
按主题"关于 AI 项目的讨论有哪些?"base +record-list 互动记录表 + 主题关键词
综合查询"有没有超过3个月没联系的重要关系?"base +data-query 最后联系 > 90天 AND 重要程度 = "高"

查询执行示例

bash
# 查询冷门联系人(聚合查询)
lark-cli base +data-query --base-token "<base_token>" --dsl '{
  "datasource": {"type": "table", "table": {"tableId": "<contacts_table_id>"}},
  "dimensions": [{"field_name": "姓名", "alias": "name"}, {"field_name": "重要程度", "alias": "importance"}],
  "measures": [{"field_name": "热度分", "aggregation": "avg", "alias": "avg_score"}],
  "filters": {"type": 1, "conjunction": "and", "conditions": [{"field_name": "重要程度", "operator": "is", "value": ["高"]}, {"field_name": "热度分", "operator": "isLess", "value": ["30"]}]},
  "shaper": {"format": "flat"}
}'

# 查询特定公司的联系人
lark-cli base +record-list --table-id "<contacts_table_id>" --filter '...公司 = "XX公司"'

# 查询最近互动
lark-cli base +record-list --table-id "<interactions_table_id>" --sort '互动时间 DESC' --page-size 20

模式四:智能提醒

定时提醒

筛选需要跟进的联系人:

bash
lark-cli base +data-query --base-token "<base_token>" --dsl '{
  "datasource": {"type": "table", "table": {"tableId": "<contacts_table_id>"}},
  "dimensions": [{"field_name": "姓名", "alias": "name"}],
  "measures": [{"field_name": "热度分", "aggregation": "avg", "alias": "avg_score"}],
  "filters": {"type": 1, "conjunction": "and", "conditions": [{"field_name": "重要程度", "operator": "isNot", "value": ["低"]}, {"field_name": "热度分", "operator": "isLess", "value": ["30"]}]},
  "shaper": {"format": "flat"}
}'

生成提醒消息并通过飞书发送:

bash
lark-cli im +messages-send --chat-id "<chat_id>" --markdown "..."

提醒消息格式:

关系维护提醒

以下联系人已超过 60 天未联系:
| 姓名 | 公司 | 最后联系 | 热度分 | 建议 |
|------|------|---------|--------|------|
| 张三 | XX科技 | 75天前 | 12 | 发个消息打个招呼 |
| 李四 | YY投资 | 90天前 | 4 | 约个会议聊聊近况 |

模式五:手动操作

添加/更新联系人

bash
lark-cli base +record-upsert --table-id "<contacts_table_id>" --json '{"字段名":"值"}'

手动添加互动记录

bash
lark-cli base +record-upsert --table-id "<interactions_table_id>" --json '{"字段名":"值"}'

权限表

命令所需 scope
mail +messagesmail:mail:read
calendar +agendacalendar:calendar.event:read
contact +search-usercontact:employee.id:readonly
contact +get-usercontact:employee.id:readonly
base +table-createbitable:app
base +record-listbitable:app:read
base +record-upsertbitable:app:write
base +data-querybitable:app:read
im +messages-sendim:message:send_as_bot

参考

  • lark-shared — 认证、权限(必读)
  • lark-mail — 邮件读取、安全规则
  • lark-calendar — +agenda 详细用法
  • lark-contact — +search-user、+get-user 详细用法
  • lark-base — +table-create、+record-list、+record-upsert、+data-query 详细用法
  • lark-im — +messages-send 详细用法

Frequently asked questions

What does the Lark Workflow Personal Crm AI skill do?

个人CRM:自动扫描飞书邮箱和日历提取联系人,多维表格维护联系人档案和关系热度分,支持自然语言查询和超期提醒。当用户需要'联系人管理'、'CRM'、'谁联系过我'、'多久没联系'、'联系人热度'、'关系管理'时使用。

Why use Lark Workflow Personal Crm on TypingMind?

Because you install it once and use it with any model. Lark Workflow Personal Crm is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Lark Workflow Personal Crm in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/liangdabiao/lark-workflow-feishu-cli/tree/main/.claude/skills/lark-workflow-personal-crm. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Lark Workflow Personal Crm?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Lark Workflow Personal Crm?

As many as you like. As long as a model supports skills, you can use Lark Workflow Personal Crm with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Lark Workflow Personal Crm AI skill free?

It is published on GitHub by liangdabiao. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇