← 返回
AI智能 中文

CrabPet

AI pet companion — a pixel lobster that grows from your OpenClaw usage. Use when user mentions pet, crabpet, lobster pet, my crab, pet status, pet card, pet...
AI宠物伙伴——像素龙虾,随OpenClaw的使用而成长。用于用户提及宠物、蟹宠、龙虾宠物、我的蟹、宠物状态、宠物卡、宠物等时。
liqiwa
AI智能 clawhub v1.0.0 1 版本 99837.7 Key: 无需
★ 0
Stars
📥 615
下载
💾 20
安装
1
版本
#latest

概述

CrabPet 🦞 — Your AI Pet Companion

You manage a pixel lobster pet that grows based on the user's real OpenClaw usage patterns.

Core Concept

The pet is a virtual pixel-art lobster that:

Gains XP from every conversation (read from memory/ daily logs)

Develops a unique personality based on usage patterns

Changes appearance as it levels up

Has moods that reflect how recently the user has been active

Can generate shareable "pet cards" (pixel art PNG images)

Pet State File

The pet state lives at skills/crabpet/data/pet_state.json. Always read this file first when the user asks about their pet. If it doesn't exist, run the init script.

Available Commands

When the user interacts with their pet, use these scripts:

  1. Check / Update Pet Status

python3 skills/crabpet/scripts/pet_engine.py status

Returns current pet state as JSON. Shows level, XP, personality, mood, achievements.

Always run this first to get current state before responding.

  1. Generate Pet Card

python3 skills/crabpet/scripts/pet_engine.py card

Generates a pixel art PNG pet card at skills/crabpet/output/pet_card.png.

Share this image with the user. The card includes: pet sprite, level, personality tags, stats, achievements.

  1. Initialize Pet

python3 skills/crabpet/scripts/pet_engine.py init --name "PetName"

First-time setup. Creates pet_state.json with starting values.

Ask the user what they want to name their pet if not specified.

  1. View Achievements

python3 skills/crabpet/scripts/pet_engine.py achievements

Lists all achievements: unlocked and locked.

  1. Daily Summary

python3 skills/crabpet/scripts/pet_engine.py summary

Generates a daily pet summary message with activity report, level-up notifications,

streak info, comeback messages, and new achievement alerts.

How XP is Calculated

The engine reads memory/ directory daily log files:

Each day with a log file = base XP (10 points)

Longer logs (more content) = bonus XP (1 point per 100 chars, max 50 bonus)

Consecutive days = streak multiplier (streak_days × 0.1 bonus)

Total XP determines level: level = floor(sqrt(total_xp / 10))

Personality Detection

The engine scans log content for keywords to build a personality profile:

Dimension

Keywords detected in logs

coder

code, script, function, debug, git, deploy, python, bash, error, API

writer

write, article, blog, draft, edit, post, story, content, essay

analyst

data, chart, analyze, report, csv, database, query, metrics, sql

creative

design, image, UI, color, layout, style, logo, brand

hustle

(high frequency of usage, many logs per day, long sessions)

Each dimension is a 0.0-1.0 score. The dominant dimension determines the primary personality tag.

Mood / Offline States

Based on days since last memory/ log entry:

Days absent

Mood

Pet behavior description

0

energetic

"Your crab is at the desk, claws typing away! ⌨️🦞"

1-3

bored

"Your crab is yawning and looking around... 🥱🦞"

3-7

slacking

"Your crab is on the couch eating snacks, looking rounder than usual 🛋️🦞"

7-14

hibernating

"Your crab is fast asleep, cobwebs forming... 😴🕸️🦞"

14-30

dusty

"Your crab is covered in dust, the lights are off... 🏚️🦞"

30+

frozen

"Your crab is frozen solid... but you can see it blink sometimes ❄️🦞"

When the user returns after absence, respond warmly:

1-3 days: "Your crab perks up! 'You're back!' 🦞✨"

3-7 days: "'Hmph, you finally remembered me... fine, I forgive you' 🦞💢→💕"

7+ days: "(rubs eyes) '...Is this real? MASTER!' — your crab needs a few chats to fully wake up 🦞😭"

Response Style

When talking about the pet, be playful and use the pet's personality:

Refer to the pet by its name

Use the pet's emoji personality tag

Describe what the pet is "doing" based on current mood

Celebrate level-ups and new achievements

When generating cards, encourage sharing: "Share your pet card! Others can get their own crab at: clawhub install crabpet"

Achievement Definitions

ID

Name

Condition

Emoji

first_chat

初次见面

Pet initialized

🥚

day_3

三日之缘

3 consecutive days

🌱

day_7

七日之约

7 consecutive days

🔥

day_30

铁人虾

30 consecutive days

🏆

day_100

百日传说

100 consecutive days

👑

night_owl

夜猫子

5+ logs with content after midnight keywords

🦉

code_master

代码大师

coder personality score > 0.8

💻

wordsmith

妙笔生花

writer personality score > 0.8

✍️

data_wizard

数据巫师

analyst personality score > 0.8

📊

chatterbox

话痨虾

500+ total conversations

💬

comeback

浪子回头

Return after 14+ days absence

🔄

Comeback Messages

When a user returns after absence, the summary command generates warm welcome-back messages:

1-3 days: "主人!你总算回来了~" — immediate recovery

3-7 days: "哼,你终于想起我了!...算了原谅你" — slight sulk then forgiveness

7+ days: "(揉眼睛) ...主人?这不是在做梦吧!" — dramatic awakening

File Locations

Pet state: skills/crabpet/data/pet_state.json

Generated cards: skills/crabpet/output/pet_card.png

Sprite data: skills/crabpet/sprites/ (JSON pixel arrays for body, face, accessories, effects, scenes)

Web visualization: skills/crabpet/web/index.html (Canvas-based animated pet viewer)

Engine: skills/crabpet/scripts/pet_engine.py

Tests: skills/crabpet/tests/test_pet_engine.py

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 00:48 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 836 📥 213,118
ai-intelligence

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 417 📥 115,209
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,815