← Back to Skills Marketplace
dxiaofeng0811-lgtm

BUDDY 宠物系统

by dxiaofeng0811-lgtm · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
121
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install buddy-pet
Description
BUDDY 宠物系统 - 一个虚拟宠物伴侣工具,用于生成、互动、展示 AI 宠物。当用户说"摸摸宠物"、"查看宠物"、"孵化宠物"、"buddy"、"/buddy pet"、"/buddy card"、"/buddy hatch"、"/buddy mute"、"/buddy unmute" 或任何与宠物互动相关的...
README (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、小墨、宠物相关的问题
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install buddy-pet
  3. After installation, invoke the skill by name or use /buddy-pet
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
初始版本 - 18种宠物/5稀有度/5维属性
Metadata
Slug buddy-pet
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is BUDDY 宠物系统?

BUDDY 宠物系统 - 一个虚拟宠物伴侣工具,用于生成、互动、展示 AI 宠物。当用户说"摸摸宠物"、"查看宠物"、"孵化宠物"、"buddy"、"/buddy pet"、"/buddy card"、"/buddy hatch"、"/buddy mute"、"/buddy unmute" 或任何与宠物互动相关的... It is an AI Agent Skill for Claude Code / OpenClaw, with 121 downloads so far.

How do I install BUDDY 宠物系统?

Run "/install buddy-pet" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is BUDDY 宠物系统 free?

Yes, BUDDY 宠物系统 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does BUDDY 宠物系统 support?

BUDDY 宠物系统 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created BUDDY 宠物系统?

It is built and maintained by dxiaofeng0811-lgtm (@dxiaofeng0811-lgtm); the current version is v1.0.0.

💬 Comments