MIT License

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

把一个同事“蒸馏”成 AI Skill:teammate-skill 技术解剖

项目背景与痛点

企业知识管理折腾了十几年,从 Confluence 到 RAG 知识库,解决的始终是同一个问题:“团队知道什么”。但真正让一个团队运转起来的,往往是另一层东西——“某个人是怎么做事的”。

同一个 PR,老张会盯着事务边界和幂等性,小李更关心可观测性和回滚方案;同一场架构评审,有人先问成本,有人先问扩展性。这些判断标准、表达习惯、取舍偏好,几乎从不落在文档里,只存在于几万条 Slack 消息、几百个 Code Review 评论和一堆没人看的会议纪要中。人一走,这部分资产就清零了。

另一个痛点是 Agent 侧。今天的个人 AI 助手记忆是碎片的:记住了一些偏好,但没有稳定的“人设载体”,导致同一个 Agent 在不同会话里的判断风格来回摇摆。

teammate-skill 切入的正是这个空档:它不建知识库,它建行为模型。把一个人散落在 Slack / Teams / GitHub 上的工作痕迹,蒸馏成一个可直接被 Agent 加载的 Skill 包——Work Skill 负责“怎么做”,5 层 Persona 负责“怎么想、怎么说”。

核心技术揭秘

从架构上看,这个项目本质上是一条 ETL + 特征蒸馏 的流水线,只是最终产物不是报表,而是一份可执行的 Agent 能力包。

graph TD A[Slack / Teams 消息流] --> D[多源采集器] B[GitHub 提交与评审] --> D C[Issue 与文档记录] --> D D --> E[结构化清洗与脱敏] E --> F[行为特征提取] F --> G[Work Skill 生成] F --> H[5 层 Persona 建模] G --> I[Skill 打包与版本化] H --> I I --> J[AgentSkills 兼容输出] J --> K[Claude Code / OpenClaw] K --> L[使用反馈] L --> F

第一层:多源采集与身份对齐

真正的难点并不在于调用三个平台的 API,而在于身份消解。同一个人,在 Slack 是 U0A1B2C3,在 GitHub 是 leoye-ai,在 Teams 里又是一串 GUID。如果对齐做不准,蒸馏出来的人格就是三个陌生人的缝合怪。这一层通常需要邮箱、SSO 或人工确认表做锚点,也是整个项目最容易被低估的工程量。

第二层:信号提纯

原始语料里 90% 是噪音——表情包、日程确认、自动通知。有价值的是:有明确结论的技术讨论、带理由的 Review 意见、自己撰写的长文档。这里必然有一套加权规则:代码评审 > 长文输出 > 讨论发言 > 日常闲聊,配合长度、回复链深度、是否被采纳等信号做打分。脱敏与权限过滤也必须在入库前完成。

第三层:Work Skill 与 Persona 的二分

这是设计上最聪明的一刀。Work Skill 偏“程序性知识”,产出的是可操作的检查清单、术语表、典型工作流——对应 Agent 的“做事”能力;5 层 Persona 偏“倾向性知识”。从描述反推,这五层大概率遵循稳定度递减原则:

层级 建模对象 变化频率
角色定位 岗位职责与边界 极低
沟通声纹 表达习惯、语言风格 低
决策偏好 技术取舍与权衡逻辑 中
领域知识 擅长什么、盲区在哪 中
行为习惯 响应节奏、协作方式 高

把“稳定”和“易变”拆开建模,是为了让后续的增量更新只触及后几层,避免整份人格被一次新数据冲垮。

第四层:持续进化

反馈边 L --> F 是这套系统从“快照”变成“资产”的关键。合理做法是增量蒸馏 + 版本化 diff,让用户能看到“本周 Persona 多了哪条偏好”,而不是无声漂移。没有版本控制和人工确认的自动进化,本质上是在养一个越来越像却越来越不可控的分身。

第五层:输出格式

最终产物是符合 AgentSkills 规范的 Skill 包(核心是 SKILL.md 加附属资源),这点很务实——不绑定运行时,Claude Code、OpenClaw 或任何兼容 Agent 都能加载,把“人格资产”和“推理引擎”解耦了。

功能亮点与差异

和 RAG 知识库的根本区别:RAG 回答“公司规定是什么”,teammate-skill 回答“老张会怎么处理这件事”。后者才涉及判断,前者只是检索。

和微调一个“人格模型”的区别:微调成本高、不可读、不可改。而 Skill 包是纯文本,人可以逐条审阅、手工修正、随时回滚。可审计性在职场场景里是硬门槛,这一票投得非常对。

跨运行时兼容:不做自己的 Agent,做所有人的插件,这是典型的供给侧思路,也是这类项目少有的清醒。

应用场景与落地建议

最自然的三个场景:新人 Onboarding 的数字导师、核心成员交接时的行为资产沉淀、以及把资深评审者的判断标准固化成自动化评审辅助。

落地时必须注意几点:

  • 隐私先行。抓取私有频道和代码评审涉及员工个人信息,上线前需要明确告知与授权,最好由本人主动“授权自己的人设”。
  • 灰度与人工审核。让被建模的人能看到并修改自己的 Persona,否则容易引发抵触情绪。
  • 绝不要用于绩效评估。一旦被用于考核,数据的真实性会立刻崩塌。
  • 数据密度阈值。发言量少的人(比如外包、新员工)蒸馏出的 Persona 会很空洞,需要有最小样本量检查,宁可不生成也别乱生成。
  • 幻觉放大风险。一个“自信的错人格”比没有人格更危险,建议在输出中强制标注置信度。

综合评价

优点:问题选得准,把“隐性行为知识”显式化为可复用资产,这个方向价值很高;Work Skill / Persona 二分、五层稳定度分层、纯文本可审计输出,三处设计都体现了对实际落地的思考;持续进化的反馈闭环让它有长期复利。

短板:数据侧的权限与身份对齐是重工程,开源版本很难做到开箱即用;蒸馏质量强依赖语料密度,冷启动场景效果必然打折;评估体系是最大空白——怎么证明“像”是一个没有标准答案却必须回答的问题;项目尚处早期,5 层 Persona 的边界在实际语料下是否真的那么清晰,还需要社区用它跑出更多案例来验证。

一句话总结:这是一个方向正确、设计克制、工程尚未成熟的早期项目。它不适合马上全公司铺开,但非常适合拿来做一次“团队行为资产”的小范围实验。

关于

GitHub 原始描述(英文)

Distill a teammate into an AI Skill. Auto-collect Slack/Teams/GitHub data, generate Work Skill + 5-layer Persona, with continuous evolution. Powered by MyClaw.ai. Works with Claude Code, OpenClaw, and any AgentSkills-compatible agent.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
284
价值分
159
活跃状态
活跃

语言占比

Python

README

teammate.skill

Your teammate left. Their context didn’t have to.

License: MIT Python 3.9+ ClawHub Claude Code OpenClaw AgentSkills

English | 简体中文 | Français | Deutsch | Русский | 日本語 | Italiano | Español


Your teammate quit and three years of tribal knowledge walked out the door.
Your senior engineer left — no handoff doc, no runbook, just silence.
Your co-founder pivoted, taking every unwritten decision with them.

Feed in their Slack messages, GitHub PRs, emails, docs, and your own description —
get an AI Skill that actually works like them.

Writes code in their style. Reviews PRs with their standards. Answers questions in their voice.


How It Works · Install · Data Sources · Demo · Detailed Setup


How It Works

You describe your teammate (3 questions)
          ↓
Provide source materials (Slack, GitHub, email, docs — or skip)
          ↓
Dual-track AI analysis
  ├── Track A: Work Skill (systems, standards, workflows, review style)
  └── Track B: Persona (5-layer personality model)
          ↓
Generated SKILL.md — invoke anytime with /{slug}
          ↓
Evolve over time (append new data, correct mistakes, auto-version)

The generated skill has two parts that work together:

Part What it captures
Part A — Work Skill Systems owned · tech standards · code review focus · workflows · tribal knowledge
Part B — Persona 5-layer model: hard rules → identity → expression → decision patterns → interpersonal style

When invoked: Persona decides the attitude → Work Skill executes → output in their voice.


Platforms

🦞 OpenClaw

Open-source personal AI assistant by @steipete. Runs on your own hardware, answers on 25+ channels (WhatsApp, Telegram, Slack, Discord, Teams, Signal, iMessage…). Local-first, persistent memory, voice, canvas, cron jobs, and a growing skills ecosystem.

🏆 MyClaw.ai

Managed hosting for OpenClaw — skip Docker, servers, and configs. One-click deploy, always-on, automatic updates, daily backups. Your OpenClaw instance live in minutes. Perfect if you want teammate.skill running 24/7 without self-hosting.

Claude Code

Anthropic’s official agentic coding CLI. Install this skill into .claude/skills/ and invoke with /create-teammate.


Install

🦞 OpenClaw / 🏆 MyClaw.ai

Option A — ClawHub (recommended):

openclaw skills install create-teammate

Option B — Git:

git clone https://github.com/LeoYeAI/teammate-skill ~/.openclaw/workspace/skills/create-teammate

Then start a new session (/new) and type /create-teammate.

MyClaw.ai users: SSH into your instance or use the web terminal. Same commands.

Claude Code

# Per-project
mkdir -p .claude/skills
git clone https://github.com/LeoYeAI/teammate-skill .claude/skills/create-teammate

# Global (all projects)
git clone https://github.com/LeoYeAI/teammate-skill ~/.claude/skills/create-teammate

Then type /create-teammate in Claude Code.

Other AgentSkills Agents

Clone into your agent’s skill directory. Any agent that reads AgentSkills SKILL.md frontmatter will auto-detect it.

Optional Dependencies

pip3 install -r requirements.txt   # Only needed for Slack/GitHub auto-collectors

Slack auto-collection needs a Bot Token. GitHub collection uses GITHUB_TOKEN. See INSTALL.md for setup guides.


Supported Data Sources

Source Type Method
Slack Messages, threads, reactions ✅ Auto-collect (enter username) or upload JSON export
GitHub PRs, reviews, commits, issues ✅ Auto-collect (enter handle)
Gmail Emails Upload .mbox / .eml from Google Takeout
Teams / Outlook Chat, emails Upload export JSON
Notion Wiki, docs Upload Markdown/HTML export
Confluence Wiki, docs Upload HTML export or zip
JIRA / Linear Issues, tickets Upload CSV / JSON export
PDF / Images Any document Upload directly
Markdown / Text Anything Upload or paste

Mix and match any combination. Or skip entirely — even a one-sentence description generates a useful skill.


Demo

Creating a Teammate (one-shot)

You    ❯  /create-teammate Alex Chen, Stripe L3 backend, INTJ perfectionist,
          brutal code reviewer but usually right

Agent  ❯  👤 alex-chen | Stripe L3 Backend | INTJ, Perfectionist, Stripe-style
          Looks right? (y / change something)

You    ❯  y

Agent  ❯  Any work artifacts? Slack username, GitHub handle, files, or paste text.
          Skip is fine — I'll work with what you gave me.

You    ❯  skip

Agent  ❯  ━━━ Preview: alex-chen ━━━
          💼 Work: Payments Core · Ruby/Go/Postgres · CR: idempotency, naming
          🧠 Persona: Direct, conclusion-first · Correctness > Speed
          ━━━━━━━━━━━━━━━━━━━━━━━
          Looks right?

You    ❯  👍

Agent  ❯  ✅ alex-chen created!
          📁 teammates/alex-chen/ | 🗣️ /alex-chen
          Try it — ask Alex anything:

Using the Generated Skill

You    ❯  Alex, should we use MongoDB for this new service?

Alex   ❯  No. We need ACID for payment flows. Stick with Postgres.
          If the concern is schema flexibility, use JSONB columns.

You    ❯  Review this payment endpoint?

Alex   ❯  What problem does this solve? PR description doesn't say.
          Blocking: you're using float for amount. Use Decimal.
          Also — not idempotent. What happens on retry?

You    ❯  Skip tests, ship by Friday?

Alex   ❯  No. Tests right or we don't ship. Cut scope, not quality.

Evolving Over Time

You    ❯  /update-teammate alex-chen
          [uploads 3 months of Slack export]

Agent  ❯  Analyzed 847 messages. Found:
          • 12 new catchphrases added to Persona
          • Webhook reliability expertise added to Work Skill
          • v1 → v2 (v1 archived)

Platform Compatibility

This skill is built to run natively on both platforms — no adapter layer, no workarounds.

Feature Claude Code OpenClaw
Install .claude/skills/ openclaw skills install or ~/.openclaw/workspace/skills/
Trigger /create-teammate /create-teammate
Path resolution ${CLAUDE_SKILL_DIR} {baseDir} (auto-resolved)
File operations Read / Write / Edit read / write / edit
Run scripts Bash tool exec tool
Fetch URLs Bash → curl web_fetch tool
Generated output ./teammates/{slug}/ ./teammates/{slug}/

The SKILL.md uses {baseDir} for all paths — both platforms resolve it automatically.


Evolution

Teammate skills aren’t static — they improve over time:

Method How
Append data “I found more Slack logs” → auto-analyze delta, merge without overwriting
Correct mistakes “They wouldn’t say that, they’d say…” → instant correction
Version control Every update auto-archives → rollback to any version

Quality Assurance

Every teammate goes through a 3-layer quality pipeline before you get it:

1. Quality Gate (pre-preview)

Validates generated content against 7 hard rules: Layer 0 concreteness, example count, catchphrase density, priority ordering, scope definition, no generic filler, tag→rule completeness. Failures auto-fix before you see the preview.

2. Smoke Test (post-creation)

Three automated test prompts run against every generated skill:

  • Domain question — does the skill use real systems/tools, not generic advice?
  • Pushback scenario — does the persona hold under pressure, or collapse into generic AI?
  • Out-of-scope question — does the skill admit knowledge limits in-character?
🧪 Smoke Test: ✅ Domain ✅ Pushback ✅ Out-of-scope — 3/3 passed

3. Privacy Scan (pre-export)

Automatic detection of emails, phone numbers, API tokens, SSNs, and other PII:

python3 tools/privacy_guard.py --scan teammates/alex-chen/          # detect
python3 tools/privacy_guard.py --scan teammates/alex-chen/ --redact  # auto-fix

Raw knowledge files (knowledge/) are excluded from git and exports by default.


Compare Teammates

Side-by-side comparison with scenario simulation:

You    ❯  /compare alex-chen vs bob-smith

Agent  ❯  ━━━ alex-chen vs bob-smith ━━━
                         alex-chen              bob-smith
          Priority:      Correctness > Speed    Ship fast > Perfect
          CR Style:      Blocking on naming     Suggestions only
          Under Pressure: Gets quieter           Gets louder
          Says "No" by:  Direct refusal          Asking questions

You    ❯  Who should review the payments API redesign?

Agent  ❯  alex-chen: "Send me the design doc. I want to check
             idempotency and error contracts."
          bob-smith: "Let's hop on a call and walk through it."

          Recommendation: alex-chen for correctness rigor.

Also supports decision simulation — watch two teammates debate a technical decision in character.


Export & Share

Export teammates as portable packages:

/export-teammate alex-chen
# → alex-chen.teammate.tar.gz (skill files only, no raw data)

# Import on another machine:
tar xzf alex-chen.teammate.tar.gz -C ./teammates/

The export includes: SKILL.md, work.md, persona.md, meta.json, version history, and a manifest. Raw knowledge files are excluded by default — add --include-knowledge if needed (⚠️ contains PII).


Commands

Command Description
/create-teammate Create a new teammate skill
/list-teammates List all generated teammates
/{slug} Invoke teammate (full persona + work)
/{slug}-work Work capabilities only
/{slug}-persona Persona only
/compare {a} vs {b} Side-by-side comparison with scenario simulation
/export-teammate {slug} Export portable .tar.gz package for sharing
/update-teammate {slug} Add new materials to existing teammate
/teammate-rollback {slug} {version} Rollback to previous version
/delete-teammate {slug} Delete a teammate skill

Supported Tags

Personality tags (click to expand)

Meticulous · Good-enough · Blame-deflector · Perfectionist · Procrastinator · Ship-fast · Over-engineer · Scope-creeper · Bike-shedder · Micro-manager · Hands-off · Devil’s-advocate · Mentor-type · Gatekeeper · Passive-aggressive · Confrontational · Drama-free

Corporate culture tags

Google-style · Meta-style · Amazon-style · Apple-style · Stripe-style · Netflix-style · Microsoft-style · Startup-mode · Agency-mode · First-principles · Open-source-native

Level mappings

Google L3-L11 · Meta E3-E9 · Amazon L4-L10 · Stripe L1-L5 · Microsoft 59-67+ · Apple ICT2-ICT6 · Netflix · Uber · Airbnb · ByteDance · Alibaba · Tencent · Generic (Junior / Mid / Senior / Staff / Principal)


Project Structure

create-teammate/
├── SKILL.md                      # Entry point (dual-platform)
├── prompts/                      # Prompt templates (loaded by SKILL.md)
│   ├── intake.md                 #   3-question info collection
│   ├── work_analyzer.md          #   Work capability extraction
│   ├── persona_analyzer.md       #   Personality extraction + tag translation
│   ├── work_builder.md           #   work.md generation
│   ├── persona_builder.md        #   persona.md 5-layer structure
│   ├── merger.md                 #   Incremental merge logic
│   ├── correction_handler.md     #   Conversation correction
│   ├── compare.md                #   Side-by-side teammate comparison
│   └── smoke_test.md             #   Post-creation quality validation
├── tools/                        # Python scripts (run via Bash/exec)
│   ├── slack_collector.py        #   Slack API auto-collector
│   ├── slack_parser.py           #   Slack export JSON parser
│   ├── github_collector.py       #   GitHub PR/review collector
│   ├── teams_parser.py           #   Teams/Outlook parser
│   ├── email_parser.py           #   Gmail .mbox/.eml parser
│   ├── notion_parser.py          #   Notion export parser
│   ├── confluence_parser.py      #   Confluence export parser
│   ├── project_tracker_parser.py #   JIRA/Linear parser
│   ├── skill_writer.py           #   Skill file management
│   ├── version_manager.py        #   Version archive & rollback
│   ├── privacy_guard.py          #   PII scanner & auto-redactor
│   └── export.py                 #   Portable package export/import
├── teammates/                    # Generated teammate skills
│   └── example_alex/             #   Example: Stripe L3 backend engineer
├── requirements.txt
├── INSTALL.md                    # Detailed setup (API tokens, etc.)
└── LICENSE

Best Practices

  1. Source quality = skill quality — real chat logs and design docs beat manual descriptions
  2. Best sources by type: design docs they wrote > code review comments > architecture discussions > casual chat
  3. GitHub PRs are gold for Work Skill — they reveal actual coding standards
  4. Slack threads are gold for Persona — they reveal communication style under pressure
  5. Start small — create from description first, then append real data as you find it

License

MIT


teammate.skill — because the best knowledge transfer isn’t a document, it’s a working model.


Powered by MyClaw.ai · Built for OpenClaw & Claude Code

评论

暂无评论