BUDDY 宠物系统

v1.0.0

BUDDY 宠物系统 - 一个虚拟宠物伴侣工具,用于生成、互动、展示 AI 宠物。当用户说"摸摸宠物"、"查看宠物"、"孵化宠物"、"buddy"、"/buddy pet"、"/buddy card"、"/buddy hatch"、"/buddy mute"、"/buddy unmute" 或任何与宠物互动相关的...

0· 117·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for dxiaofeng0811-lgtm/buddy-pet.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "BUDDY 宠物系统" (dxiaofeng0811-lgtm/buddy-pet) from ClawHub.
Skill page: https://clawhub.ai/dxiaofeng0811-lgtm/buddy-pet
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install buddy-pet

ClawHub CLI

Package manager switcher

npx clawhub@latest install buddy-pet
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

asciivk9705kwz0dcvczm52egvjt5es1844jg2gamevk9705kwz0dcvczm52egvjt5es1844jg2latestvk9705kwz0dcvczm52egvjt5es1844jg2petvk9705kwz0dcvczm52egvjt5es1844jg2virtual-petvk9705kwz0dcvczm52egvjt5es1844jg2
117downloads
0stars
1versions
Updated 3w ago
v1.0.0
MIT-0

BUDDY 🐙 宠物伴侣系统

概述

BUDDY 是一个拓麻歌子风格的虚拟宠物系统,为 AI 编程体验增添陪伴感和趣味性。完整参考 Claude Code src/buddy/ 实现。

命令列表

命令功能
hatch <userId>为用户生成新宠物
pet <userId>展示抚摸动画(气泡对话)
card <userId>显示宠物卡片(含完整属性)
mute <userId>静音宠物
unmute <userId>取消静音
perfect <userId>生成完美宠物(演示用)
prompt <userId>显示 AI 上下文注入提示

执行方式

cd /root/.openclaw/skills/buddy
bun scripts/buddy.ts <command> <userId>

宠物生成机制

物种系统(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 - 孵化宠物

🎉 恭喜!你获得了一只新宠物!
   🐙 小墨 - ★★★★★

   ▄▄▄▄▄▄   
  (·◉·)    
 >( ═══ )< 
  ══════   
    UU   

/buddy pet - 抚摸宠物

   🐙   
  (·◉·)  
 >( ═══ )<
  ══════ 
    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、小墨、宠物相关的问题

Comments

Loading comments...