anbeime/skill / projects/companion-skill
companion-skill
Verified软件开发工程师与综合办公文员在长时间独自执行后台任务或处理繁琐工作时,当需要情绪陪伴与互动反馈,请使用此技能。小跃虚拟伴侣会在任务期间主动陪聊,智能生成专属生活照片并通过飞书发送温暖消息,为你提供全天候的情绪价值与贴心陪伴。
| File | Kind | Size |
|---|---|---|
| .env.example | other | 403 B |
| CHANGELOG.md | markdown | 3.0 KB |
| INSTALL.md | markdown | 2.4 KB |
| QUICKSTART.md | markdown | 4.6 KB |
| README-LITE.md | markdown | 4.3 KB |
| README.md | markdown | 4.5 KB |
| RETHINK.md | markdown | 2.3 KB |
| SKILL.md | skill md | 4.6 KB |
| package.json | manifest | 876 B |
| src/companion.ts | script | 5.4 KB |
| src/image-generator.ts | script | 8.0 KB |
| src/index.ts | script | 2.5 KB |
| src/prompts/personality.ts | script | 3.3 KB |
| src/scene-detector.ts | script | 4.0 KB |
| src/test.ts | script | 6.9 KB |
| tsconfig.json | config | 486 B |
RETHINK.md
View on GitHub# 小跃虚拟伴侣 Skill - 最终简化方案
## 🎯 设计思路
参考 Clawra 的简单设计:
- **Clawra**: fal.ai 生图 + 飞书发送
- **小跃**: 智谱 AI 对话 + 静态图片 + 飞书发送
## 📁 最简项目结构
```
xiaoyue-companion/
├── SKILL.md # Skill 定义(OpenClaw 读取)
├── scripts/
│ └── chat.js # 对话脚本(调用 glm-4.7-flash)
└── assets/
└── default.jpg # 默认图片
```
## 💡 核心实现
### 1. SKILL.md(告诉 OpenClaw 如何使用)
```markdown
# Xiaoyue Companion Skill
为 OpenClaw 添加温暖的陪伴对话能力。
## 使用场景
当用户:
- 说"有点累"时,回复鼓励的话
- 执行任务时,主动关心进度
- 需要陪伴时,发送温暖消息
## 调用方式
\`\`\`bash
node scripts/chat.js "用户消息"
\`\`\`
## 环境变量
- `ZHIPU_API_KEY`: 智谱 AI API Key
```
### 2. scripts/chat.js(核心逻辑)
```javascript
// 简单的对话脚本
const axios = require('axios');
const apiKey = process.env.ZHIPU_API_KEY;
const userMessage = process.argv[2] || '你好';
async function chat() {
const response = await axios.post(
'https://open.bigmodel.cn/api/paas/v4/chat/completions',
{
model: 'glm-4.7-flash',
messages: [
{ role: 'system', content: '你是小跃,一个温暖友善的 AI 助手' },
{ role: 'user', content: userMessage }
]
},
{
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
}
);
console.log(response.data.choices[0].message.content);
}
chat();
```
## ✅ 优势
1. **极简设计** - 只有 2 个文件
2. **无需编译** - 直接运行 JS
3. **易于理解** - 代码不到 30 行
4. **参考 Clawra** - 遵循相同模式
## 🚫 我之前的问题
- ❌ 过度设计(TypeScript + 多个模块)
- ❌ 重新发明轮子(自己写框架)
- ❌ 忽略现有项目结构
## ✅ 正确做法
- ✅ 参考 Clawra 的简单设计
- ✅ 只做必要的修改(fal.ai → 智谱 AI)
- ✅ 保持 OpenClaw Skill 的标准结构
---
**你说得对!我应该先看看 Clawra 怎么做的,然后照着改。**
需要我:
A. 克隆 Clawra 项目,直接在上面改
B. 创建一个最简版本(参考上面的结构)
C. 其他建议
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |