A Claude Code skill โ your virtual pet that feeds on AI coding sessions
Devagotchi is your "Living Developer Companion" โ a virtual pet that lives inside Claude Code and evolves based on your coding sessions. The more tokens you consume while coding with Claude, the more your pet grows!
- ๐ฎ Virtual Pet System: Three unique species (cat, dragon, robot) with ASCII art
- ๐ Evolution System: Egg โ Baby โ Teen โ Adult โ Elder โ Mythic (based on token XP)
- ๐ Token-Based Feeding: 1000 tokens = 1 food unit
- ๐ Dynamic Moods: Happy, content, hungry, or starving based on hunger level
- ๐จ ASCII Art Animations: Different frames for idle, happy, hungry, sleeping, and eating states
- ๐พ Local Storage: All data stored locally in
~/.devagotchi/- ZERO telemetry - ๐ Adapter System: Pluggable adapters for different AI tools (currently supports Claude Code)
- ๐ช Pet Skills: Fortune telling and tricks to interact with your companion
Install devagotchi: run git clone https://github.com/antoinedc/devagotchi.git ~/.claude/skills/devagotchi && cd ~/.claude/skills/devagotchi && ./setup
Paste the above into Claude Code. It clones, installs, builds, and hatches your pet.
git clone https://github.com/antoinedc/devagotchi.git ~/.claude/skills/devagotchi
cd ~/.claude/skills/devagotchi
./setupThen type /devagotchi in Claude Code.
- Node.js 18+
- Claude Code installed โ get it here
/devagotchi
or
/devagotchi:show
Displays your pet with current stats, hunger bar, and XP progress.
/devagotchi:feed
Syncs with Claude Code to count tokens from your coding sessions since installation and feeds your pet. Your pet gains XP (cumulative) and food based on token consumption.
Important: Only tokens from sessions that happen AFTER you install Devagotchi are counted. No retroactive XP!
/devagotchi:stats
Shows comprehensive information about your pet including:
- Name, species, and evolution stage
- Total XP and hunger level
- Current mood
- XP needed until next evolution
- Age in days
/devagotchi:pet
Show some love to your pet with a heart animation!
/devagotchi:name <name>
Give your pet a custom name. Example: /devagotchi:name Sparkles
/devagotchi:fortune
Get a random fortune about your coding day from your pet!
/devagotchi:trick
Watch your pet perform a fun ASCII art trick!
Your pet evolves as you accumulate XP (tokens):
| Stage | XP Threshold | Description |
|---|---|---|
| ๐ฅ Egg | 0 | Your journey begins |
| ๐ถ Baby | 10,000 | First evolution |
| ๐ง Teen | 100,000 | Getting stronger |
| ๐ง Adult | 500,000 | Fully grown |
| ๐ด Elder | 2,000,000 | Wise and powerful |
| โจ Mythic | 10,000,000 | Ultimate form |
- Hunger: Depletes by 1 per hour, max 100
- Feeding: 1000 tokens = 1 food unit
- Mood System:
- ๐ Happy (hunger > 70)
- ๐ Content (hunger 40-70)
- ๐ Hungry (hunger 20-40)
- ๐ญ Starving (hunger < 20)
- XP: Cumulative total tokens consumed, never decreases
When your pet first hatches, it randomly becomes one of three species:
- ๐ฑ Cat: Playful and adorable
- ๐ Dragon: Fierce and magical
- ๐ค Robot: Mechanical and precise
Each species has unique ASCII art for all evolution stages!
The Claude Code adapter automatically tracks your token usage by reading JSONL session files from ~/.claude/projects/. It counts input, output, cache creation, and cache read tokens from all your coding sessions.
No Retroactive XP: When you first install Devagotchi, it records the installation timestamp. Only tokens from sessions that happen AFTER this timestamp are counted. This ensures fair gameplay and gives everyone a fresh start!
The adapter tracks the last sync timestamp to avoid double counting, so you can safely run /devagotchi:feed multiple times.
Devagotchi stores all data locally in ~/.devagotchi/state.json. No telemetry, no external connections (except reading local Claude Code session files). Your pet lives entirely on your machine.
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
# Test
npm testdevagotchi/
โโโ SKILL.md # Claude Code skill definition
โโโ scripts/ # Shell scripts for each command
โ โโโ show.sh
โ โโโ feed.sh
โ โโโ stats.sh
โ โโโ pet.sh
โ โโโ name.sh
โ โโโ fortune.sh
โ โโโ trick.sh
โโโ src/
โ โโโ commands/ # Command handlers
โ โ โโโ show.ts
โ โ โโโ feed.ts
โ โ โโโ stats.ts
โ โ โโโ pet.ts
โ โ โโโ name.ts
โ โ โโโ fortune.ts
โ โ โโโ trick.ts
โ โโโ adapters/
โ โ โโโ claudeCode.ts # Claude Code token adapter
โ โโโ types.ts # TypeScript type definitions
โ โโโ petEngine.ts # Core pet state machine
โ โโโ ascii.ts # ASCII art renderer
โ โโโ storage.ts # Local storage system
โ โโโ display.ts # Terminal display utilities
โ โโโ skills.ts # Pet skills (fortune, trick)
โ โโโ index.ts # Main Devagotchi class
โ โโโ cli.ts # CLI entry point
โโโ dist/ # Compiled JavaScript
โโโ package.json
โโโ tsconfig.json
โโโ tsup.config.ts
MIT
Contributions welcome! Feel free to open issues or submit PRs.
- Codex CLI adapter
- Aider adapter
- Web dashboard with pet animation
- Desktop widget (macOS menu bar / Windows tray)
- More species and evolution branches
- Custom user skills (
~/.devagotchi/skills/) - Opt-in social: compare pets, leaderboards
- Starship prompt module
Made with โฅ by developers, for developers