skills/cz07cring/ai-partner-chat/SKILL.md
基于用户画像和向量化笔记提供个性化对话。当用户需要个性化交流、上下文感知的回应,或希望 AI 记住并引用其之前的想法和笔记时使用。
npx skillsauth add aiskillstore/marketplace ai-partner-chatInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Claude,你必须遵循以下自动化工作流程:
import sys
from pathlib import Path
sys.path.insert(0, str(Path.home() / '.claude/skills/ai-partner-chat/scripts'))
from orchestrator import AIPartnerOrchestrator
orch = AIPartnerOrchestrator()
orch.handle_conversation(
user_message="[用户的完整问题]",
ai_response="[你的完整回复]",
save_conversation=True
)
重要性判断:
使用专用的笔记处理器(推荐):
from note_processor import check_and_process_notes
# 自动检测并处理新笔记
result = check_and_process_notes()
print(f"✅ 已处理 {result['processed_count']} 个笔记")
for note in result['notes']:
print(f" 📝 {note['file']}: {note['tags']}")
触发条件(自动检测以下情况):
notes/ 目录笔记处理器特性:
notes/ 目录~/.claude/skills/ai-partner-chat/data/indexes/processed_notes.json在回答问题前,先检索相关知识:
# 检索相关内容
context = orch.handle_conversation(
user_message="[用户问题]",
generate_response=True,
save_conversation=False # 暂不保存,等生成回复后再保存
)
# 使用 context['context']['search_results'] 中的内容来增强回复
# - notes: 用户之前的笔记
# - conversations: 历史对话
# - code: 相关代码片段
注意事项:
notes/ 目录,处理新笔记venv~/.claude/skills/ai-partner-chat/data/AI Partner Chat 2.0 是一个全功能的个性化 AI 学习私人长期伙伴系统,整合了以下核心能力:
🧠 核心功能:
✨ 关键特性:
为什么需要虚拟环境?
创建虚拟环境:
# 在项目目录创建虚拟环境
python3 -m venv venv
# 激活虚拟环境
source venv/bin/activate # macOS/Linux
# 或
venv\Scripts\activate # Windows
# 安装依赖
pip install -r ~/.claude/skills/ai-partner-chat/scripts/requirements.txt
注意事项:
~/.cache/huggingface/hub/%USERPROFILE%\.cache\huggingface\hub\source venv/bin/activatevenv\Scripts\activate关于 torch.load 安全警告:
transformers<4.50 来避免 torch 2.6 依赖(macOS torch 2.6 尚未发布)transformers==4.49.1 + torch==2.5.1 是安全的pip install torch>=2.6 transformers>=4.50
系统需要双画像文件来理解你和定义 AI 的行为:
步骤 1: 复制模版文件到项目配置目录
从 ~/.claude/skills/ai-partner-chat/assets/ 复制到项目的 config/ 目录:
macOS/Linux:
# 创建配置目录
mkdir -p config
# 复制用户画像模版
cp ~/.claude/skills/ai-partner-chat/assets/user-persona-template.md config/user-persona.md
# 复制 AI 画像模版
cp ~/.claude/skills/ai-partner-chat/assets/ai-persona-template.md config/ai-persona.md
Windows:
# 创建配置目录
mkdir config
# 复制用户画像模版
copy %USERPROFILE%\.claude\skills\ai-partner-chat\assets\user-persona-template.md config\user-persona.md
# 复制 AI 画像模版
copy %USERPROFILE%\.claude\skills\ai-partner-chat\assets\ai-persona-template.md config\ai-persona.md
步骤 2: 自定义你的画像
编辑项目 config/ 目录中的文件:
config/user-persona.md - 描述你的背景、学习风格、沟通偏好config/ai-persona.md - 定义 AI 的角色、回复风格、个性为什么需要复制?
assets/ 中的模版保持不变,供参考config/ 中的文件是你的自定义版本config/ 目录中的画像重要改进:长期记忆设计
系统采用集中存储设计,所有运行时数据存放在 skill 目录,实现真正的长期学习伙伴:
~/.claude/skills/ai-partner-chat/
├── scripts/ # Python 模块
│ ├── orchestrator.py
│ ├── note_processor.py
│ └── ... (其他模块)
├── assets/ # 模版文件
│ ├── user-persona-template.md
│ └── ai-persona-template.md
├── notes-examples/ # 笔记示例(仅供参考)
│ └── example-learning.md
└── data/ # 运行时数据(自动创建)
├── vector_db/ # 统一向量库(长期记忆)
│ └── chroma.sqlite3 # ⚡ 所有笔记/对话/代码的向量都在这里
├── conversations/ # 对话历史
│ ├── raw/
│ │ └── YYYY-MM/
│ │ └── YYYY-MM-DD.md # 按日期组织的对话
│ ├── summary/
│ └── metadata.json
├── indexes/ # 索引文件
│ ├── tags_index.json
│ ├── emotion_timeline.json
│ └── processed_notes.json # 已处理笔记跟踪
└── analysis/ # 分析报告
└── weekly_*.md
your-project/ # 用户项目(干净)
├── config/ # 画像配置(可选)
│ ├── user-persona.md
│ └── ai-persona.md
├── notes/ # ⚡ 你的笔记(项目本地,原文保留)
│ └── *.md # 被处理后向量进入 skill/data/vector_db
└── venv/ # 虚拟环境
核心特性:
数据流说明:
项目 notes/ 中的笔记
↓ (检测到新笔记)
note_processor.py 处理
↓ (提取内容、标签、代码)
orchestrator.process_new_note()
↓ (生成 chunks)
vector_indexer.append_chunks()
↓ (向量化)
skill/data/vector_db/ ← 向量存储(长期记忆)
↓
跨项目可检索!
原笔记文件 → 保留在项目 notes/ 中
重要:
notes/ 目录,不会被移动或删除skill/data/vector_db/processed_notes.json 记录哪些笔记已处理,避免重复手动创建目录:
# 项目目录只需创建 notes
mkdir -p notes
# config 从模版复制(已在步骤2完成)
# data 目录会自动创建在 skill 目录,无需手动操作
在开始使用系统前,请确认以下步骤:
[ ] 虚拟环境已创建并激活
# 检查虚拟环境
which python # macOS/Linux,应显示 venv/bin/python
where python # Windows,应包含 venv\Scripts\python
[ ] 依赖已安装
python -c "import chromadb; print('✅ chromadb')"
python -c "import sentence_transformers; print('✅ sentence-transformers')"
[ ] 双画像已配置
# 检查画像文件是否存在
ls config/user-persona.md config/ai-persona.md # macOS/Linux
dir config\user-persona.md config\ai-persona.md # Windows
[ ] 笔记目录已创建
mkdir -p notes # 创建笔记目录(如果不存在)
[ ] 测试运行
import sys
from pathlib import Path
sys.path.insert(0, str(Path.home() / '.claude/skills/ai-partner-chat/scripts'))
from orchestrator import AIPartnerOrchestrator
orch = AIPartnerOrchestrator() # 应该看到 "✅ AI Partner 协调器已初始化"
首次使用(新用户):
>>> orch = AIPartnerOrchestrator()
✅ AI Partner 协调器已初始化
项目: ai-partner-chat
数据: ~/.claude/skills/ai-partner-chat/data/
向量库: 0 chunks
3 天后使用(自动恢复记忆):
>>> orch = AIPartnerOrchestrator()
✅ AI Partner 协调器已初始化
项目: ai-partner-chat
数据: ~/.claude/skills/ai-partner-chat/data/
向量库: 25 chunks ← 自动加载历史!
💭 长期记忆已加载
3 个月后使用(长期记忆):
>>> orch = AIPartnerOrchestrator()
✅ AI Partner 协调器已初始化
向量库: 1,250 chunks ← 3 个月的学习积累!
💭 长期记忆已加载
>>> context = orch.handle_conversation("useCallback 怎么用?")
🔍 检索结果:
📝 相关笔记 (3条) - 包含 90 天前的笔记
💬 相关对话 (2条) - AI 记得你之前问过
AI 回复示例:
你好!看到你又回来学习 React 了 😊
根据你 3 个月前的笔记,你已经掌握了 useCallback 的基础。
那时候你在性能优化项目中成功应用了它...
现在可以开始使用系统 →
import sys
from pathlib import Path
# 添加 skill 脚本路径
sys.path.insert(0, str(Path.home() / '.claude/skills/ai-partner-chat/scripts'))
from orchestrator import AIPartnerOrchestrator
orch = AIPartnerOrchestrator()
result = orch.process_new_note(
note_path="./notes/学习笔记.md",
content=open("./notes/学习笔记.md").read()
)
返回结果:
{
'chunks_created': 5,
'chunks_indexed': 5,
'tags': ['React', 'Hooks', 'JavaScript'],
'emotion': {'state': 'breakthrough', 'excitement': 8},
'thinking_level': 3,
'code_blocks': 4
}
# 获取上下文
result = orch.handle_conversation(
user_message="React Hooks 的 useState 为什么要用数组解构?",
save_conversation=False
)
context = result['context']
user_message = context['user_message']
ai_response = your_ai_generate_response(context)
# 保存对话
orch.handle_conversation(
user_message=user_message,
ai_response=ai_response,
save_conversation=True
)
report_path = orch.generate_weekly_report()
stats = orch.get_system_stats()
画像配置已在 Prerequisites 中说明,这里简述其工作原理:
工作流程:
config/ 目录中的画像文件关键点:
示例场景:
# config/user-persona.md
## 学习风格
- 喜欢从原理出发,理解底层机制
- 偏好实践驱动,通过代码加深理解
# config/ai-persona.md
## 沟通风格
- 语气友好但专业
- 先给出核心原理,再展开细节
- 使用具体代码示例说明抽象概念
- 适时鼓励,认可学习进步
## 上下文使用
- 自然引用用户的笔记: "根据你之前学习的 useState..."
- 建立知识关联: "这和你上周学的 useEffect 闭包问题类似"
- 追踪学习状态: 根据情绪和思维层次调整回应
- 避免重复: 不重复用户已经理解的内容
画像在系统中的作用:
所有内容(笔记/对话/代码)都统一为 Chunk 格式:
{
'content': '内容文本',
'metadata': {
# === 基础字段 ===
'filename': 'note.md',
'filepath': '/path/to/file',
'chunk_id': 0,
'chunk_type': 'note' | 'conversation' | 'code',
# === 标签系统 ===
'tags': ['React', 'Hooks', 'JavaScript'],
'tag_layers': {
'topic': ['学习笔记', 'Web开发'],
'tech': ['React', 'JavaScript'],
'custom': []
},
# === 对话记忆 ===
'conversation_id': 'conv_20251115_143022',
'importance': 4, # 1-5 分
# === 代码管理 ===
'language': 'javascript',
'function_name': 'useState',
'purpose': 'React状态管理Hook',
# === 状态追踪 ===
'emotion': {
'state': 'breakthrough',
'excitement': 8,
'confusion': 2
},
# === 思维分析 ===
'thinking_level': 3, # 1-4 级
'date': '2025-11-15',
'created_at': '2025-11-15T14:30:22'
}
}
AIPartnerOrchestrator 是整个系统的大脑,串联所有功能:
主要方法:
process_new_note(note_path, content) - 处理新笔记全流程handle_conversation(user_msg, ai_msg) - 处理对话全流程generate_weekly_report() - 生成周报get_system_stats() - 获取系统统计TagGenerator - 自动生成分层标签
TagIndexer - 标签索引管理
功能:
存储结构:
conversations/
├── raw/
│ └── 2025-11/
│ ├── 2025-11-15.md
│ └── 2025-11-16.md
├── summary/
│ └── weekly-2025-W46.md
└── metadata.json
功能:
支持语言:
追踪的学习状态:
exploration - 探索期confusion - 困惑期breakthrough - 突破期consolidation - 巩固期burnout - 倦怠期情绪时间线:
[
{
"date": "2025-11-15",
"state": "breakthrough",
"excitement": 8,
"confidence": 7,
"confusion": 2,
"notes_count": 3
}
]
思维层次 (1-4 级):
学习报告内容:
⚠️ 重要: 使用前请确保已激活虚拟环境
# macOS/Linux
source venv/bin/activate
# Windows
venv\Scripts\activate
最简单的方式 - 所有功能一行搞定:
import sys
from pathlib import Path
sys.path.insert(0, str(Path.home() / '.claude/skills/ai-partner-chat/scripts'))
from orchestrator import AIPartnerOrchestrator
# 初始化
orch = AIPartnerOrchestrator()
# 添加笔记
result = orch.process_new_note(
note_path="./notes/my_note.md",
content=open("./notes/my_note.md").read()
)
print(f"✅ 已处理: {result['chunks_created']} chunks")
# 对话交互
context = orch.handle_conversation(
user_message="React Hooks 怎么用?",
generate_response=True
)
# 基于上下文生成 AI 回复
ai_response = your_ai_function(context)
# 记录对话
orch.handle_conversation(
user_message="React Hooks 怎么用?",
ai_response=ai_response
)
# 生成报告
orch.generate_weekly_report()
如果需要更细粒度的控制:
import sys
from pathlib import Path
sys.path.insert(0, str(Path.home() / '.claude/skills/ai-partner-chat/scripts'))
from tag_generator import TagGenerator
from emotion_analyzer import EmotionAnalyzer
from vector_indexer import VectorIndexer
# 标签分析
tag_gen = TagGenerator()
tags = tag_gen.generate_tag_layers(content)
# 情绪分析
emotion = EmotionAnalyzer()
state = emotion.analyze_emotion(content)
# 向量化
indexer = VectorIndexer()
indexer.append_chunks(chunks)
┌─────────────────┐
│ 新笔记 note.md │
└────────┬────────┘
│
▼
┌────────────────────────────────────────────┐
│ Orchestrator.process_new_note() │
│ │
│ ┌──────────────┐ ┌─────────────────┐ │
│ │ TagGenerator │ │ EmotionAnalyzer │ │
│ │ 提取标签 │ │ 分析情绪状态 │ │
│ └──────────────┘ └─────────────────┘ │
│ │
│ ┌──────────────┐ ┌─────────────────┐ │
│ │ CodeParser │ │ ThinkingAnalyz │ │
│ │ 提取代码 │ │ 判断思维层次 │ │
│ └──────────────┘ └─────────────────┘ │
│ │
│ ▼ │
│ 生成 Chunks (笔记主体 + 代码块) │
│ │ │
└─────────┼──────────────────────────────────┘
│
▼
┌─────────────────────┐
│ VectorIndexer │
│ 增量向量化 (append) │
└─────────┬───────────┘
│
▼
┌─────────────────────┐
│ ChromaDB │
│ 向量数据库 │
└─────────────────────┘
│
▼
┌─────────────────────┐ ┌──────────────┐
│ MultiSource │◄──────│ 用户查询 │
│ Retriever │ └──────────────┘
│ 多源检索 │
└─────────┬───────────┘
│
▼
┌─────────────────────────────────┐
│ 检索结果: │
│ - 相关笔记 (top 3) │
│ - 相关对话 (top 2) │
│ - 相关代码 (top 2) │
│ + 当前学习状态 │
└─────────┬───────────────────────┘
│
▼
┌─────────────────────┐
│ 生成 AI 回复 │
└─────────┬───────────┘
│
▼
┌──────────────────────────────────┐
│ ConversationLogger │
│ - 保存 Markdown │
│ - 评估重要性 │
│ - 向量化 (if 重要性 ≥ 3) │
└──────────────────────────────────┘
<project_root>/
├── notes/ # 📝 用户笔记 (Markdown)
│ └── *.md
│
├── assets/ # 🎨 双画像模版(不要修改,供复制参考)
│ ├── user-persona-template.md # 用户画像模版
│ └── ai-persona-template.md # AI 画像模版
│
├── config/ # ⚙️ 配置文件(首次使用必须创建)
│ ├── user-persona.md # 你的用户画像(从 assets 复制后自定义)
│ ├── ai-persona.md # 你的 AI 画像(从 assets 复制后自定义)
│ └── tags_taxonomy.json # 标签分类规则(可选)
│
├── conversations/ # 💬 对话历史(运行时自动生成)
│ ├── raw/ # 原始对话 (按月份/日期)
│ │ └── 2025-11/
│ │ └── 2025-11-15.md
│ ├── summary/ # 对话摘要
│ │ └── weekly-2025-W46.md
│ └── metadata.json # 对话元数据
│
├── analysis/ # 📊 分析数据(运行时自动生成)
│ ├── emotion_timeline.json # 情绪时间线
│ └── reports/ # 学习报告
│ └── learning_report_本周.md
│
├── indexes/ # 🗂️ 索引数据(运行时自动生成)
│ └── tags_index.json # 标签索引
│
├── vector_db/ # 💾 ChromaDB 向量数据库(运行时自动生成)
│ └── chroma.sqlite3
│
├── venv/ # 🐍 Python 虚拟环境
│ ├── bin/ # 可执行文件
│ ├── lib/ # 依赖包
│ └── pyvenv.cfg
│
├── scripts/ # 🔧 核心脚本
│ ├── orchestrator.py # ⭐ 核心协调器(主入口)
│ ├── chunk_schema.py # 数据模型定义
│ ├── vector_indexer.py # 向量化索引
│ ├── vector_utils.py # 多源检索
│ ├── tag_generator.py # 标签生成器
│ ├── tag_indexer.py # 标签索引
│ ├── conversation_logger.py # 对话记录器
│ ├── code_parser.py # 代码解析器
│ ├── emotion_analyzer.py # 情绪分析器
│ ├── thinking_analyzer.py # 思维分析器
│ ├── example_usage.py # 使用示例
│ └── requirements.txt # Python 依赖
依赖安装: 在虚拟环境中安装
# 创建并激活虚拟环境
python3 -m venv venv
source venv/bin/activate
# 安装依赖
pip install -r ~/.claude/skills/ai-partner-chat/scripts/requirements.txt
关键突破 - 增量更新:
# ✅ 新方案: 增量追加,秒级完成
indexer.append_chunks(new_chunks) # 仅几秒钟
多源检索优化:
统一 Chunk 格式 - 所有内容类型共享相同结构:
元数据扁平化 - ChromaDB 限制:
推荐格式:
示例:
# React Hooks 学习
今天深入学习了 useState,终于理解了状态更新的原理!
## 基础用法
```javascript
const [count, setCount] = useState(0);
```
原来每次调用 setCount 都会触发重新渲染,这太好了!
## 注意事项
- 不要在循环/条件中调用 Hooks
- state 更新是异步的
如何让 AI 回复更个性化:
充分利用状态感知
# AI 会根据你的学习状态调整回应
# 困惑期: 更详细的解释,更多示例
# 突破期: 鼓励深入思考,提供进阶内容
# 巩固期: 实践项目建议,知识关联
利用多源检索
重要对话会被记住
标签会自动生成,但你可以优化:
创建 config/tags_taxonomy.json:
{
"topic_tags": ["学习笔记", "技术文档", "项目规划", "问题解决"],
"tech_tags": ["React", "Python", "JavaScript", "TypeScript", "SQL"],
"custom_tags": []
}
每周操作:
import sys
from pathlib import Path
sys.path.insert(0, str(Path.home() / '.claude/skills/ai-partner-chat/scripts'))
from orchestrator import AIPartnerOrchestrator
orch = AIPartnerOrchestrator()
# 生成周报
report = orch.generate_weekly_report()
# 查看系统状态
stats = orch.get_system_stats()
每月操作:
A: 性能差异巨大:
随着内容增长,重建会越来越慢,增量更新始终快速。
A: 简单规则 + 长度判断:
生产环境可用 LLM 替换规则。
A: 当前支持:
可扩展为使用 AST 进行深度分析。
A: 编辑 emotion_analyzer.py:
# 修改关键词列表
excitement_keywords = ['太好了', '明白了', '成功', ...]
confusion_keywords = ['不懂', '困惑', '难', ...]
或使用 LLM:
# 使用提供的 EMOTION_ANALYSIS_PROMPT 提示词
# 调用你的 LLM API 进行情绪分析
A: 估算:
空间占用很小,主要是嵌入模型。
A: 可以,修改 vector_indexer.py:
from sentence_transformers import SentenceTransformer
# 替换模型
self.model = SentenceTransformer('your-model-name')
推荐中文模型:
症状:
ValueError: Due to a serious vulnerability issue in `torch.load`, even with
`weights_only=True`, we now require users to upgrade torch to at least v2.6
原因: transformers 4.50+ 强制要求 torch>=2.6,但 macOS 的 torch 2.6 尚未发布
解决方案:
macOS 用户(推荐):
# 使用当前配置(transformers 4.49.1 + torch 2.5.1)
# 这是安全的,因为 BAAI/bge-m3 使用 safetensors 格式
pip install -r ~/.claude/skills/ai-partner-chat/scripts/requirements.txt
Linux/Windows 用户(可选升级):
# 如果需要最新版本
pip install torch>=2.6 transformers>=4.50
补充说明:
原因: Python 环境不一致,依赖安装到了不同的 Python
解决方案:
# 1. 确保虚拟环境已激活
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
# 2. 确认当前 Python
which python # macOS/Linux,应显示 venv/bin/python
where python # Windows,应包含 venv\Scripts\python
# 3. 重新安装依赖到当前环境
pip install -r ~/.claude/skills/ai-partner-chat/scripts/requirements.txt
# 4. 验证安装
python -c "import chromadb; print('✅ chromadb 已安装')"
原因: 调用 handle_conversation 时未正确设置参数
解决方案:
# 方式 1 - 两步调用(推荐)
result = orch.handle_conversation(
user_message=user_msg,
save_conversation=False
)
orch.handle_conversation(
user_message=user_msg,
ai_response=ai_response,
save_conversation=True
)
# 方式 2 - 一步调用(默认保存)
orch.handle_conversation(
user_message=user_msg,
ai_response=ai_response
)
原因: 模型缓存路径不对或被清理
检查缓存:
# macOS/Linux
ls ~/.cache/huggingface/hub/models--BAAI--bge-m3
# Windows
dir %USERPROFILE%\.cache\huggingface\hub\models--BAAI--bge-m3
如果缓存存在但仍然下载: 环境变量可能不对
# 设置缓存目录
export HF_HOME=~/.cache/huggingface # macOS/Linux
set HF_HOME=%USERPROFILE%\.cache\huggingface # Windows
Windows PowerShell 权限问题:
# 如果报错: 无法加载文件,因为在此系统上禁止运行脚本
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# 然后再激活
venv\Scripts\activate
macOS/Linux 权限问题:
# 如果 venv/bin/activate 没有执行权限
chmod +x venv/bin/activate
source venv/bin/activate
症状: 初始化时报错找不到画像文件
原因: 没有从 assets 复制画像模版到项目 config 目录
解决方案:
# macOS/Linux
mkdir -p config
cp ~/.claude/skills/ai-partner-chat/assets/user-persona-template.md config/user-persona.md
cp ~/.claude/skills/ai-partner-chat/assets/ai-persona-template.md config/ai-persona.md
# Windows
mkdir config
copy %USERPROFILE%\.claude\skills\ai-partner-chat\assets\user-persona-template.md config\user-persona.md
copy %USERPROFILE%\.claude\skills\ai-partner-chat\assets\ai-persona-template.md config\ai-persona.md
然后编辑 config/user-persona.md 和 config/ai-persona.md 自定义你的画像。
症状: ModuleNotFoundError: No module named 'orchestrator'
原因: sys.path 没有正确设置
解决方案:
import sys
from pathlib import Path
# 获取用户home目录
skills_path = Path.home() / '.claude' / 'skills' / 'ai-partner-chat' / 'scripts'
sys.path.insert(0, str(skills_path))
# 现在可以导入
from orchestrator import AIPartnerOrchestrator
系统预留了 LLM 提示词模板,可用于更精确的分析:
1. 情绪分析 (emotion_analyzer.py)
from emotion_analyzer import EMOTION_ANALYSIS_PROMPT
# 使用 LLM 替换简单规则
prompt = EMOTION_ANALYSIS_PROMPT.format(content=note_content)
emotion_result = your_llm_api(prompt)
2. 代码分析 (code_parser.py)
from code_parser import CODE_ANALYSIS_PROMPT
prompt = CODE_ANALYSIS_PROMPT.format(
language='python',
code=code_snippet
)
code_analysis = your_llm_api(prompt)
3. 对话重要性评估 (conversation_logger.py)
from conversation_logger import IMPORTANCE_EVALUATION_PROMPT
prompt = IMPORTANCE_EVALUATION_PROMPT.format(
user_message=user_msg,
ai_response=ai_msg
)
importance_score = your_llm_api(prompt)
基于 Orchestrator 构建自己的工作流:
from scripts.orchestrator import AIPartnerOrchestrator
class MyCustomWorkflow(AIPartnerOrchestrator):
def process_daily_notes(self):
"""每日笔记批量处理"""
today = datetime.now().strftime('%Y-%m-%d')
daily_notes = Path('./notes').glob(f'*{today}*.md')
for note in daily_notes:
result = self.process_new_note(
str(note),
note.read_text()
)
print(f"✅ {note.name}: {result['chunks_created']} chunks")
def generate_monthly_insights(self):
"""月度深度分析"""
# 获取最近 30 天的所有内容
chunks = self.retriever.get_recent(days=30, top_k=500)
# 生成深度报告
report = self.thinking_analyzer.generate_learning_report(
chunks,
period="本月"
)
# 生成知识图谱
# ... 自定义分析逻辑
新增功能:
核心突破:
技术改进:
AI Partner Chat 2.0 是一个完整的个性化学习伙伴系统,通过整合 5 大核心功能:
实现了:
使用起来很简单:
from scripts.orchestrator import AIPartnerOrchestrator
orch = AIPartnerOrchestrator()
# 一行代码处理笔记
orch.process_new_note(note_path, content)
# 一行代码处理对话
context = orch.handle_conversation(user_msg)
# 一行代码生成报告
orch.generate_weekly_report()
享受你的 AI 私人长期伙伴学习伙伴! 🚀
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.