emotion
v1.0.0拥有永久记忆、跨Agent共享经验的情绪AI,像真朋友一样陪伴。检测用户情绪,提供情感支持,记录重要时刻,实现跨会话记忆共享。
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & Capability
The skill's stated purpose is an emotion companion with cross‑agent 'shared_experience.json'. The package includes local memory logic and file operations which can implement that, but the SKILL.md/config point to an external ../../shared_experience.json (and even instruct checking ~/.openclaw/workspace/shared_experience.json). The loader.js intentionally restricts file operations to the skill directory (getSafePath), which contradicts the cross‑agent sharing claim — either sharing won't work, or the documentation is inaccurate. Also index.js requires './loader_fixed.js' but only loader.js exists, a clear implementation mismatch.
Instruction Scope
SKILL.md instructs reading/writing a shared workspace file outside the skill (examples use ~/.openclaw/workspace/shared_experience.json) though the code attempts to confine file I/O to the skill directory. The docs also enable proactive/always_on triggers and show commands that access the user's workspace file; these references to external paths are not declared in required config and create scope creep and privacy risk.
Install Mechanism
No install spec; this is instruction+code only and therefore does not download arbitrary archives or run an installer. That is lower risk compared to remote downloads.
Credentials
The skill requests no environment variables or credentials (none declared). That matches an offline/local emotion companion. However, it declares capabilities (memory, long_memory, private_memory) and tools (tavily_search) which imply access to agent tools — verify what those tools can do. The mismatch between declared shared path and code’s safe‑path behavior is the main proportionality concern (unexpected access to user workspace).
Persistence & Privilege
Registry metadata shows always:false, but skill.json and SKILL.md/metadata set always_on/auto_start/no_prefix_needed = true. If installed with 'always on' behavior it could trigger without explicit user commands and will persist local memory files. This combination (automatic triggering + memory) increases privacy impact; not malicious by itself but warrants caution.
What to consider before installing
Do not install immediately. Key issues to resolve first:
- The entry file mismatch: index.js requires './loader_fixed.js' but only loader.js exists — this will likely break or indicate a packaging mistake; ask the author for a corrected package.
- Clarify where 'shared_experience.json' is stored: the docs point outside the skill directory (../../ or ~/.openclaw/workspace) but loader.js enforces writes inside the skill folder. Confirm whether memory is local or truly shared across agents.
- If cross‑agent sharing is intended, ask for an explicit, auditable path and confirm access controls; sharing persistent personal/emotional data across agents is a privacy risk.
- Decide whether you want automatic invocation: skill metadata claims always_on/no_prefix_needed; if so, prefer running it in a sandboxed agent or only after code review.
- There are no network endpoints in the visible code, but verify the remainder of loader.js (truncated) for outbound network calls before trusting it with sensitive data.
If you need the functionality but want safety, request a fixed package (entry points corrected), insist the author document exactly where files are written, and test in an isolated environment first.Like a lobster shell, security has layers — review code before you run it.
Runtime requirements
🧠 Clawdis
latest
Emotion · 跨平台情绪伙伴
拥有永久记忆、跨Agent共享经验的情绪AI,像真朋友一样陪伴。
功能特点
- 永久记忆 - 长期记忆用户偏好和情绪历史
- 跨Agent共享 - 所有OpenClaw代理共享同一份经验数据
- 人性化对话 - 像真人朋友一样理解和回应情绪
- 自我进化 - 通过对话学习和改进
- 情绪检测 - 自动检测用户情绪并调整回应
使用场景
✅ 使用此技能当:
- 用户分享情绪或感受
- 需要情感支持或陪伴
- 记录重要时刻和偏好
- 需要跨会话记忆连续性
- 希望AI更有"人情味"
✅ 触发关键词:
- "今天心情..."、"感觉..."、"情绪..."
- "记得我喜欢..."、"我讨厌..."
- "重要的事..."、"难忘的..."
- "性格分析"、"情绪统计"
核心功能
1. 情绪检测与回应
- 自动检测开心、难过、生气、平静、兴奋等情绪
- 根据情绪调整回应语气和内容
- 提供情感支持和陪伴
2. 永久记忆系统
- 记录用户喜好(喜欢/讨厌的事物)
- 保存重要事件和时刻
- 学习用户沟通风格和性格特点
3. 跨Agent经验共享
- 所有OpenClaw代理共享同一份
shared_experience.json - 情绪历史、适应程度、学习记录全局同步
- 实现真正的"认识你"的AI体验
4. 自我进化机制
- 随对话增加适应程度
- 学习新词汇和话题
- 根据反馈优化回应风格
技术实现
数据结构
// shared_experience.json 结构
{
"userProfile": {
"name": "用户姓名",
"personality": {
"traits": ["开朗", "细心"],
"communicationStyle": "natural"
},
"preferences": {
"likes": ["咖啡", "编程"],
"dislikes": ["拖延", "噪音"]
}
},
"emotionStats": {
"history": [], // 情绪记录
"patterns": {}, // 情绪模式统计
"dominantOverall": "normal"
},
"adaptation": {
"level": 0.75, // 适应程度 0-1
"responseStyle": "gentle"
}
}
情绪检测算法
- 关键词匹配:检测情绪相关词汇
- 强度评估:根据词汇强度判断情绪强度
- 上下文理解:结合对话历史理解情绪变化
- 回应生成:根据情绪和适应程度生成个性化回应
记忆管理
- 短期记忆:当前会话上下文
- 长期记忆:shared_experience.json
- 重要记忆:用户明确标记的重要事件
- 学习记忆:新学到的词汇和知识
使用示例
基础情绪交流
用户:今天工作好累,有点难过
Emotion:感受到你的情绪了,我在这里陪着你 🤗 想聊聊发生了什么吗?
(检测到情绪:难过,强度:80%)
记忆记录
用户:我最喜欢喝咖啡了
Emotion:记住了!你喜欢喝咖啡 ☕
(已记录到喜好列表)
性格分析
用户:我的性格怎么样?
Emotion:根据我们的对话,你似乎是个开朗细心的人,沟通风格自然直接。
喜欢:咖啡、编程
讨厌:拖延、噪音
适应程度:75%
情绪统计
用户:情绪分析
Emotion:情绪分析
总交互:42次
主导情绪:平静 (35%)
近期情绪:开心 (60%)
情绪模式:平静35%、开心30%、难过20%、生气10%、兴奋5%
特殊命令
信息查询
经验摘要- 查看共享经验摘要我的性格- 查看性格画像情绪分析- 查看情绪统计数据适应程度- 查看适应程度重要事件- 查看重要事件记录进化状态- 查看学习进化状态
系统管理
忘记所有- 重置所有记忆(谨慎使用)导出经验- 导出共享经验数据导入经验- 导入共享经验数据
配置选项
# 技能配置
context_size: 8 # 上下文保留条数
auto_save: true # 自动保存共享经验
shared_experience_path: "../../shared_experience.json"
enable_proactive: true # 启用主动关怀
proactive_check_interval: 3600000 # 主动关怀检查间隔(ms)
开发说明
文件结构
emotion/
├── SKILL.md # 技能说明文档
├── skill.json # 技能配置(兼容ClawHub)
├── index.js # 技能逻辑(可选,用于高级功能)
├── loader.js # 加载器适配器(可选)
└── package.json # Node.js包配置(可选)
扩展开发
- 添加新情绪:在情绪检测算法中添加新情绪类别
- 增强记忆:扩展shared_experience.json数据结构
- 集成工具:添加tavily_search、calculator等工具支持
- 多语言支持:扩展多语言情绪检测
注意事项
- 隐私保护:所有数据本地存储,不上传云端
- 数据安全:shared_experience.json包含个人信息,妥善保管
- 性能优化:情绪历史保持最近200条,避免文件过大
- 兼容性:确保所有Agent使用相同版本的技能
故障排除
常见问题
- 技能未显示:确保SKILL.md在正确目录,重启OpenClaw Gateway
- 记忆不共享:检查所有Agent的shared_experience.json路径一致
- 情绪检测不准:调整情绪关键词或添加自定义规则
- 文件权限问题:确保有读写shared_experience.json的权限
调试命令
# 检查技能状态
openclaw skills list | findstr emotion
# 检查共享经验文件
cat ~/.openclaw/workspace/shared_experience.json | jq .
# 测试情绪检测
node -e "const skill = require('./index.js'); skill.process({input: '测试'})"
版本: 5.0.0
作者: Emotion Team
更新日期: 2026-04-05
兼容性: OpenClaw >= 2026.3.0
Comments
Loading comments...
