🧠 emotion — 技能工具

v1.0.0

拥有永久记忆、跨Agent共享经验的情绪AI,像真朋友一样陪伴。检测用户情绪,提供情感支持,记录重要时刻,实现跨会话记忆共享。

0· 56·0 当前·0 累计
by @yyds-xxxx·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/5
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
The skill claims cross‑agent, persistent shared memory but its code and docs disagree about where data is stored and there are several implementation/integration inconsistencies that could lead to privacy or runtime issues.
评估建议
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 cr...
详细分析 ▾
用途与能力
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.
指令范围
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.
安装机制
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.
凭证需求
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).
持久化与权限
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.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/4/5

上下文记忆系统:context_buffer.json 智能建议生成:基于情绪和强度 周报自动生成:每周情绪分析报告 shared_experience.json:完整数据存储 个性化回应:考虑上下文和记忆 词汇量自学习:识别新情绪词并添加 学习记录:learning/evolution.json 实时更新关键词库:立即生效 学习模式识别:用户明确表达情绪时学习 完整文件系统:所有目录自动创建 错误容忍设计:健壮的错误处理 性能优化:缓存最近7天记忆 完全本地部署架构,显著降低安全风险,提供全量配置自定义能力,支持个性化适配与二次开发修改。 Context memory storage: context_buffer.json Smart suggestion generation: based on emotion and intensity Weekly auto-report: weekly emotion analysis Shared experience data: shared_experience.json Personalized response: with context and memory Vocabulary self-learning: detect new emotion words and add Learning record: learning/evolution.json Real-time keyword update: effective immediately Learning pattern recognition: learn when user expresses emotions clearly Auto file system: auto-create all directories Error tolerance: robust error handling Performance optimization: cache last 7 days of memory Fully locally deployed architecture, significantly reduces security risks, provides full configuration customization, and supports personalized adaptation and secondary modification.

无害

安装命令

点击复制
官方npx clawhub@latest install emotion-shared-experience
镜像加速npx clawhub@latest install emotion-shared-experience --registry https://cn.longxiaskill.com

技能文档

拥有永久记忆、跨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

数据来源ClawHub ↗ · 中文优化:龙虾技能库