← 返回 Skills 市场
BUDDY 宠物系统
作者
dxiaofeng0811-lgtm
· GitHub ↗
· v1.0.0
· MIT-0
121
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install buddy-pet
功能描述
BUDDY 宠物系统 - 一个虚拟宠物伴侣工具,用于生成、互动、展示 AI 宠物。当用户说"摸摸宠物"、"查看宠物"、"孵化宠物"、"buddy"、"/buddy pet"、"/buddy card"、"/buddy hatch"、"/buddy mute"、"/buddy unmute" 或任何与宠物互动相关的...
使用说明 (SKILL.md)
BUDDY 🐙 宠物伴侣系统
概述
BUDDY 是一个拓麻歌子风格的虚拟宠物系统,为 AI 编程体验增添陪伴感和趣味性。完整参考 Claude Code src/buddy/ 实现。
命令列表
| 命令 | 功能 |
|---|---|
hatch \x3CuserId> |
为用户生成新宠物 |
pet \x3CuserId> |
展示抚摸动画(气泡对话) |
card \x3CuserId> |
显示宠物卡片(含完整属性) |
mute \x3CuserId> |
静音宠物 |
unmute \x3CuserId> |
取消静音 |
perfect \x3CuserId> |
生成完美宠物(演示用) |
prompt \x3CuserId> |
显示 AI 上下文注入提示 |
执行方式
cd /root/.openclaw/skills/buddy
bun scripts/buddy.ts \x3Ccommand> \x3CuserId>
宠物生成机制
物种系统(18种)
完整 ASCII 精灵图,5行×12字符,3帧动画(idle/fidget/special)
| 物种 | 英文 | 物种 | 英文 |
|---|---|---|---|
| 🐙 章鱼 | octopus | 🐧 企鹅 | penguin |
| 🦆 鸭子 | duck | 🐢 乌龟 | turtle |
| 🐱 猫 | cat | 🐌 蜗牛 | snail |
| 🐉 龙 | dragon | 👻 幽灵 | ghost |
| 🦉 猫头鹰 | owl | 🦎 六角恐龙 | axolotl |
| 🪿 鹅 | goose | 🦫 水豚 | capybara |
| 🌵 仙人掌 | cactus | 🤖 机器人 | robot |
| 🐰 兔子 | rabbit | 🍄 蘑菇 | mushroom |
| 🐈 胖猫 | chonk | 🫧 果冻 | blob |
稀有度(5级)
| 稀有度 | 概率 | 星级 | 颜色 | 属性下限 |
|---|---|---|---|---|
| 普通(Common) | 60% | ★ | 灰色 | 5 |
| 非凡(Uncommon) | 25% | ★★ | 绿色 | 15 |
| 稀有(Rare) | 10% | ★★★ | 蓝色 | 25 |
| 史诗(Epic) | 4% | ★★★★ | 紫色 | 35 |
| 传说(Legendary) | 1% | ★★★★★ | 金色 | 50 |
闪光系统
1% 概率,独立于稀有度
五维属性
| 属性 | 说明 |
|---|---|
| DEBUGGING | 调试能力 |
| PATIENCE | 耐心值 |
| CHAOS | 混乱指数 |
| WISDOM | 智慧值 |
| SNARK | 毒舌程度 |
功能特性
气泡对话
宠物通过气泡说话:
┌──────────────────┐
│ 咕噜咕噜~ │
│ 好舒服! │
└──────────────────┘
AI 上下文注入
当宠物存在且未静音时,可注入提示到 AI 上下文:
- 告知宠物在旁边
- 用户直接对宠物说话时,AI 保持简短回复
- AI 不会模拟宠物说话
静音功能
mute- 宠物不再显示气泡对话unmute- 恢复宠物互动
交互示例
/buddy hatch - 孵化宠物
🎉 恭喜!你获得了一只新宠物!
🐙 小墨 - ★★★★★
▄▄▄▄▄▄
(·◉·)
>( ═══ )\x3C
══════
UU
/buddy pet - 抚摸宠物
🐙
(·◉·)
>( ═══ )\x3C
══════
UU
✨ +1 爱心 ✨ +1 爱心 ✨ +1 爱心
↑ ↑ ↑
0.5s 1.0s 1.5s
┌──────────────────┐
│ 咕噜咕噜~ │
│ 好舒服! │
└──────────────────┘
小墨发出了满足的咕噜声~ 🐙✨
/buddy card - 查看卡片
╔══════════════════════════════════════════╗
║ 🐙 BUDDY PET CARD 🐙 ║
╠══════════════════════════════════════════╣
║ Name: 小墨 ║
║ Species: octopus ║
║ Rarity: ★★★★★ ║
║ Shiny: ✨ YES ✨ ║
║ Personality: 聪明、好奇、有点傲娇 ║
╠══════════════════════════════════════════╣
║ 📊 FIVE STATS ║
║ DEBUGGING: 150 ║
║ PATIENCE: 150 ║
║ CHAOS: 150 ║
║ WISDOM: 150 ║
║ SNARK: 150 ║
╚══════════════════════════════════════════╝
文件结构
buddy/
├── SKILL.md # 本文件
├── scripts/
│ └── buddy.ts # 主执行脚本
└── references/
└── buddy/ # 核心模块
├── types.ts # 类型定义
├── companion.ts # 生成逻辑
├── sprites.ts # 18物种 ASCII 精灵
└── index.ts # 导出
技术细节
- 确定性生成:userId + salt → FNV-1a 哈希 → Mulberry32 PRNG
- 防作弊:只有灵魂数据(name, personality, hatchedAt)持久化,骨架数据每次重新计算
- 动画:15帧序列 [0,0,0,0,1,0,0,0,-1,0,0,2,0,0,0]
- 0 = idle
- 1 = fidget
- -1 = idle with blink (眼睛替换为 -)
- 2 = special
调用时机
当用户请求:
- "摸摸我的宠物"
- "查看宠物状态"
- "孵化新宠物"
- "/buddy pet"
- "/buddy card"
- "/buddy hatch"
- "/buddy mute" / "/buddy unmute"
- 任何与 BUDDY、小墨、宠物相关的问题
安全使用建议
This skill appears coherent and local: it contains code that will run on the agent host (bun scripts/buddy.ts) and stores small state in /tmp/buddy-state.json. Before installing/running, verify you have the 'bun' runtime (the skill expects to be invoked with bun but does not declare it as a required binary), review the included files you see here (they implement the pet behavior), and be aware the skill prints an AI context-injection prompt that will alter agent responses when a pet is present (intended for the feature but it influences agent behavior). There are no network calls or credential requests in the code, so there is no obvious exfiltration risk, but only run code from sources you trust.
功能分析
Type: OpenClaw Skill
Name: buddy-pet
Version: 1.0.0
The 'buddy-pet' skill implements a harmless virtual pet system (Tamagotchi-style) using ASCII art and deterministic generation based on user IDs. The logic in 'scripts/buddy.ts' and the 'references/buddy/' directory is focused entirely on pet interactions, stat generation, and local state management via a temporary file (/tmp/buddy-state.json). There is no evidence of data exfiltration, malicious command execution, or harmful prompt injection; the AI context instructions are strictly related to the pet's persona and behavior.
能力评估
Purpose & Capability
Name/description (virtual pet companion) match the included files and runtime behavior. All code implements pet generation, ASCII sprites, CLI commands, and state handling — functionality expected for this purpose. One minor mismatch: the scripts use the 'bun' runtime (shebang and usage in SKILL.md) but 'bun' is not declared in the skill's required binaries metadata.
Instruction Scope
SKILL.md directs running the included CLI (bun scripts/buddy.ts) and describes triggers and commands; the instructions stay within the pet domain. The skill also prints an 'AI context injection' prompt that tells the agent to add pet state to its conversation context when the pet is present — this is intended behavior but does modify how the agent will respond. SKILL.md assumes the path /root/.openclaw/skills/buddy for execution, which is an installation-path assumption to be aware of.
Install Mechanism
No install spec (instruction-only) and included code files are present; nothing downloads or installs third-party packages. The runtime will execute local TypeScript/JS via bun; since there is no network download step or extraction from external URLs, install risk is low. Ensure you trust and review the included code before executing it locally.
Credentials
The skill requests no environment variables or credentials. Runtime code only reads/writes a local state file (/tmp/buddy-state.json) and does not access other system config, secrets, or network. The level of environment access is proportionate to the pet functionality.
Persistence & Privilege
always:false (no forced global inclusion). The skill persists minimal state to /tmp (muted flag and an optional savedPet). It does not modify other skills' configs or system-wide settings. Autonomous invocation (model invocation enabled) is normal for skills and not by itself a concern here.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install buddy-pet - 安装完成后,直接呼叫该 Skill 的名称或使用
/buddy-pet触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
初始版本 - 18种宠物/5稀有度/5维属性
元数据
常见问题
BUDDY 宠物系统 是什么?
BUDDY 宠物系统 - 一个虚拟宠物伴侣工具,用于生成、互动、展示 AI 宠物。当用户说"摸摸宠物"、"查看宠物"、"孵化宠物"、"buddy"、"/buddy pet"、"/buddy card"、"/buddy hatch"、"/buddy mute"、"/buddy unmute" 或任何与宠物互动相关的... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 121 次。
如何安装 BUDDY 宠物系统?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install buddy-pet」即可一键安装,无需额外配置。
BUDDY 宠物系统 是免费的吗?
是的,BUDDY 宠物系统 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
BUDDY 宠物系统 支持哪些平台?
BUDDY 宠物系统 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 BUDDY 宠物系统?
由 dxiaofeng0811-lgtm(@dxiaofeng0811-lgtm)开发并维护,当前版本 v1.0.0。
推荐 Skills