skills-experimental/buddy-companion/SKILL.md
虚拟伙伴系统,游戏化用户体验 Use when [buddy companion] is needed.
npx skillsauth add bianhaifeng789-hue/openclaw-config buddy-companionInstall 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 Code 的 Buddy 系统,实现游戏化体验:
// 根据用户生成确定性 Buddy
const buddy = generateBuddy('user-ou_xxx')
// 返回格式
{
id: 'buddy-user-ou_xxx-1703275200',
name: '鸭子·王者', // Legendary 有后缀
species: 'duck',
rarity: 'legendary',
stats: {
wisdom: 95, // 峰值属性
courage: 12, // 低谷属性
charisma: 67,
intelligence: 72,
creativity: 58,
luck: 45
},
hat: 'wizard',
eyes: 'cool',
interactionCount: 0
}
| 稀有度 | 权重 | 属性下限 | Emoji | |--------|------|---------|-------| | Common | 60% | 5 | ⚪ | | Uncommon | 25% | 15 | 🟢 | | Rare | 10% | 25 | 🔵 | | Epic | 4% | 35 | 🟣 | | Legendary | 1% | 50 | 🟡 |
import { createBuddyHook } from './buddy-companion-service'
const hook = createBuddyHook()
// 会话开始
const { buddy, notification, card } = hook.onSessionStart(userId)
// 发送 Buddy 卡片
if (notification) {
message({
action: 'send',
card: { title: '你的伙伴', content: card }
})
}
🟡 **鸭子·王者**
稀有度: 传奇
种类: 鸭子
智慧: ██████████ 95
勇气: █░░░░░░░░░ 12
魅力: ██████░░░░ 67
智力: ███████░░░ 72
创造力: █████░░░░░ 58
运气: ████░░░░░░ 45
互动次数: 23
位置: memory/buddy-state.json
{
"currentBuddy": {
"id": "buddy-ou_xxx-1703275200",
"name": "鸭子",
"rarity": "uncommon",
"interactionCount": 23
},
"buddies": [...],
"totalInteractions": 23
}
用户开始会话:
→ generateBuddy(userId)
→ 发送飞书卡片: "🟢 你的伙伴: 猫咪"
→ 显示属性条形图
每 50 次互动:
→ shouldNotify() 检测里程碑
→ 发送飞书通知: "🎉 猫咪达成 50 次互动!"
30 分钟无互动:
→ shouldNotify() 检测 idle
→ 发送飞书消息: "猫咪在等你回来~"
- name: buddy-idle-check
interval: 30m
prompt: "Check buddy-state.json lastInteraction. If > 30min idle, send Feishu reminder with buddy name"
export * as buddy from './buddy-companion-service'
// 用法
import { buddy } from './impl/utils'
buddy.generateBuddy(userId)
buddy.formatBuddyCard(currentBuddy)
// Mulberry32 - 小巧的种子随机数生成器
function mulberry32(seed: number): () => number {
// 生成确定性随机数序列
// 同一种子 → 同一序列 → 同一 Buddy
}
// 字符串哈希
hashString(userId + timestamp) → seed
| 操作 | 预期耗时 | Ops/sec | |------|---------|---------| | generateBuddy | < 1ms | 1M+ | | rollRarity | < 0.01ms | 100M+ | | rollStats | < 0.1ms | 10M+ | | formatBuddyCard | < 1ms | 1M+ |
| 功能 | Claude Code | OpenClaw | 状态 | |------|-------------|----------|------| | generateBuddy | ✅ | ✅ | ✅ | | 稀有度系统 | 5 级 | 5 级 | ✅ | | 属性系统 | 6 项 | 6 项 | ✅ | | Sprite 渲染 | React Ink | 飞书卡片 | ⚠️ | | CompanionSprite | 46KB | 简化 | ⚠️ |
Claude Code:
OpenClaw:
生成时间: 2026-04-13 20:45 状态: Phase 13 实现完成 ✅
business
IAA 日报飞书输出能力。 支持把固定 CSV 模板一键转换成: - 中文运营结论 - 飞书卡片 JSON - 飞书发送载荷 Use when: - 需要把 IAA 日报直接发到飞书 - 需要从 CSV 一键生成运营日报
data-ai
IAA日报分析模型 功能: - 渠道日报自动分析 - 小时级+日级ROI联动判断 - 按地区输出加量/降量/停投建议 - 按产品类型输出阈值 - 自动识别利润区/观察区/止损区 Use when: - 分析每天投放数据 - 生成运营日报结论 - 判断是否加量/降量/停投 - 对比美加澳/日韩表现 Keywords: - 日报模型, 投放日报, 加量, 降量, 停投, ROI日报, 分地区分析
data-ai
IAA固定日报分析模板 功能: - 固定字段模板(可直接贴每天数据) - 自动输出总盘结论 - 自动输出美加澳/日韩结论 - 自动给出加量/降量/停投建议 - 适配文件修复/清理两类产品 Use when: - 需要固定日报格式 - 每天复盘渠道表现 - 给运营团队出统一结论 Keywords: - 固定模板, 日报模板, ROI模板, IAA日报, 运营模板
development
# HyperlinkPool Pattern Skill HyperlinkPool Pattern - HyperlinkPool class + strings array + stringMap + Index 0 no hyperlink + intern(hyperlink) + get(id) + undefined handling + 5-minute reset + OSC8 hyperlink interning。 ## 功能概述 从Claude Code的ink/screen.ts提取的HyperlinkPool模式,用于OpenClaw的OSC8超链接池管理。 ## 核心机制 ### HyperlinkPool Class ```typescript export class HyperlinkPool { private strings: string[] = [''] // Index 0 = no hyperlink private stringMap = new Map<string, number>() // strings