桌面宠物:交互式像素艺术 AI 伙伴 - Openclaw Skills
作者:互联网
2026-03-30
什么是 桌面宠物?
桌面宠物是一个交互式像素艺术伙伴,旨在为基于代理的工作流提供视觉界面。作为一个透明、始终置顶的 Electron 覆盖层运行,此技能引入了一个居住在屏幕上的漫游吉祥物(默认为龙虾)。它专门为 Openclaw Skills 生态系统构建,用作功能状态指示器,根据实时代理活动改变其行为和外观。
该宠物极具动态性,能够沿屏幕边缘行走、爬墙,甚至避开光标或活动窗口以免造成干扰。除了美学吸引力外,它还提供本地 HTTP API,允许您的编码代理通过动画和气泡直接向您传达其内部状态,如思考、工作或说话。
下载入口:https://github.com/openclaw/skills/tree/main/skills/samskrta/mu-pet
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install mu-pet
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 mu-pet。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
桌面宠物 应用场景
- 通过思考、工作或睡眠的专用动画直观监控 AI 代理状态。
- 为您的 macOS 开发环境添加一个能对系统事件做出反应的个性化吉祥物。
- 通过气泡为长时间运行的后台任务实现非侵入式通知系统。
- 作为屏幕伙伴使用,在所有工作区保持可见且不阻塞用户交互。
- 该技能初始化一个基于 Electron 的透明窗口,覆盖整个桌面表面,同时保持点击穿透。
- 在端口 18891 上建立本地 HTTP 服务器,以接收来自 AI 代理或 CLI 工具的状态更新命令。
- 宠物的移动引擎计算沿屏幕边界(地面、墙壁和天花板)的路径,同时检查光标接近度。
- 当通过 API 接收到状态更改时,基于 Canvas 的渲染引擎会切换像素艺术动画序列。
- 智能逻辑确保宠物逃离活动窗口或光标,以防止干扰您的主要工作区。
桌面宠物 配置指南
要开始使用 Openclaw Skills 集合中的此技能,请确保您的 macOS 系统上安装了 Node.js。
# 进入应用目录
cd assets/app
# 安装所需依赖
npm install
# 启动桌面宠物
npx electron .
要自动执行启动过程,您可以使用提供的 plist 模板创建 macOS LaunchAgent,并确保将 APP_PATH 替换为您的实际目录路径。
桌面宠物 数据架构与分类体系
该技能通过本地 REST API 和内部 Canvas 变量管理状态和配置。
| 数据点 | 类型 | 描述 |
|---|---|---|
state |
字符串 | 定义当前动画(例如:空闲、工作中、睡眠) |
bubble |
字符串 | 要在气泡中显示的可选文本 |
statusText |
字符串 | 描述当前宠物活动的元数据 |
coordinates |
对象 | 漫游逻辑的内部 X/Y 定位 |
像素艺术使用坐标映射在 index.html 文件中以编程方式定义,允许在不使用外部图像文件的情况下进行修改。
name: desktop-pet
description: Animated pixel art desktop pet that roams the screen as an always-on-top Electron overlay. The pet avoids the cursor and active windows, walks along screen edges, climbs walls and ceilings, and responds to agent state changes via a local HTTP API. Use when a user wants a desktop companion, screen buddy, desktop mascot, virtual pet, or visual indicator of agent activity. Supports states like idle, walking, working, thinking, sleeping, and talking (faces user with speech bubble). macOS only.
Desktop Pet
A pixel art desktop pet (default: lobster ??) that roams the screen as a transparent Electron overlay.
Quick Start
cd /assets/app
npm install
npx electron .
The pet starts at the bottom center of the screen and begins roaming.
HTTP API
Local API on port 18891 (127.0.0.1 only):
GET /state- returns{"state":"idle","statusText":""}POST /state- set state:{"state":"talking","bubble":"hello!"}
States
| State | Behavior |
|---|---|
idle |
Gentle bob, occasional claw snap |
walking |
Moves along current surface |
climbing |
Transitions between floor/walls/ceiling |
fleeing |
Running from cursor or active window |
working |
Sits at tiny laptop with sparkle particles |
thinking |
Slow sway, thought dots appear |
sleeping |
Eyes closed, zzz bubbles float up |
talking |
Faces user, shows speech bubble, auto-returns to idle |
snapping |
Claw snap animation |
Agent Integration
Hit the API at the start of responses to make the pet face the user:
curl -s -X POST http://127.0.0.1:18891/state r
-H 'Content-Type: application/json' r
-d '{"state":"talking","bubble":"working on it..."}'
Set to working during long operations, thinking while reasoning.
The talking state auto-returns to idle after the bubble duration expires.
Auto-Launch (macOS)
Create a LaunchAgent for auto-start on login. Use label ai.openclaw.desktop-pet.
# Install as LaunchAgent
cat > ~/Library/LaunchAgents/ai.openclaw.desktop-pet.plist << 'EOF'
Label ai.openclaw.desktop-pet
ProgramArguments
APP_PATH/node_modules/.bin/electron
APP_PATH
WorkingDirectory APP_PATH
RunAtLoad
KeepAlive
StandardOutPath /tmp/desktop-pet.log
StandardErrorPath /tmp/desktop-pet.log
EnvironmentVariables
PATH /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
EOF
Replace APP_PATH with the absolute path to the app directory.
Customization
The pet is drawn programmatically via Canvas pixel art in index.html. To change the creature:
- Edit
lobsterBase()andlobsterFront()functions with new pixel layouts - Colors are defined as constants at the top of the script block
- Each pixel is
{x, y, w, h, color}at 3x scale
Features
- Transparent overlay, always-on-top, click-through (except on the pet itself)
- Roams full desktop: floor, walls, ceiling
- Avoids cursor (250px radius) and frontmost window
- Right-click context menu for manual state control
- Speech bubbles with auto-sizing duration
- Pixel art drawn via Canvas (no external images needed)
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
韩国发票:自动化估价单与税务发票 - Openclaw Skills
小红书文案教练:爆款笔记生成器 - Openclaw Skills
慕尼黑 MVG & S-Bahn 实时追踪命令行工具 - Openclaw Skills
Reddit 研究技能:自动化社群洞察 - Openclaw Skills
豆包聊天:带有联网搜索功能的免费 AI 对话 - Openclaw Skills
NightPatch:自动化工作流优化 - Openclaw 技能
国产 AI 视频生成器:Wan2.6 与可灵集成 - Openclaw Skills
Sonos Announce:智能音频状态恢复 - Openclaw Skills
Hypha Payment:P2P 代理协作与 USDT 结算 - Openclaw Skills
Cashu Emoji:隐藏代币编解码 - Openclaw Skills
AI精选
