Programmer Tamagotchi Statusline Scheme
Powerful setting for virtual, evolves, based, your. Includes structured workflows, validation checks, and reusable patterns for statusline.
Programmer Tamagotchi Statusline Scheme
Virtual pet statusline that evolves based on your coding activity, tracking health, happiness, and commits per session.
When to Use This Setting
Apply this setting when you need to:
- Gamify your coding sessions with a virtual pet whose health and happiness respond to your commit activity
- Create an emotional connection with your coding environment that encourages regular commits and engagement
- Track session activity through a persistent counter that survives across statusline refreshes Consider alternatives when:
- Gamification elements feel distracting rather than motivating during professional work sessions
- You work in environments where persistent temp files may be cleared between interactions
Quick Start
Configuration
name: programmer-tamagotchi-statusline-scheme type: setting category: statusline
Example Application
claude setting:apply programmer-tamagotchi-statusline-scheme
Example Output
Setting applied. Changes:
- statusLine.type: command
- statusLine.command: bash tamagotchi-pet inline
- pet_states: healthy(>80HP), good(60-80), tired(40-60), exhausted(<40)
- mood_states: very-happy(>80), happy(60-80), neutral(40-60), sad(<40)
- health_decay: -10 HP every 20 commits
- happiness_gain: +5 joy every 10 commits
Core Concepts
Tamagotchi Pet Overview
| Aspect | Details |
|---|---|
| Pet Health | Starts at 100 HP, decreases by 10 every 20 interactions simulating fatigue |
| Pet Happiness | Starts at 50 joy, increases by 5 every 10 interactions rewarding engagement |
| Pet Appearance | Four visual states: healthy cat, good cat, tired cat, exhausted skull |
| Mood Indicator | Sparkle (very happy), smile (happy), neutral face, or sad based on joy level |
| Session Persistence | State cached in /tmp keyed by session ID, survives statusline refreshes |
Tamagotchi State Architecture
+-------------------+ +---------------------+ +------------------+
| Session Cache |---->| Counter Increment |---->| Health Calculator |
| /tmp/tamagochi_* | | commits + 1 | | -10 every 20 |
| HP, Joy, Commits | | per interaction | | max: 100 |
+-------------------+ +---------------------+ +------------------+
| |
v v
+---------------------+ +------------------+
| Happiness Calc | | Visual Mapper |
| +5 every 10 commits |--->| HP->pet emoji |
| max: 100 | | Joy->mood emoji |
+---------------------+ +------------------+
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| initial_health | integer | 100 | Starting HP value for the virtual pet at session begin |
| initial_happiness | integer | 50 | Starting joy value for the virtual pet at session begin |
| health_decay_interval | integer | 20 | Number of interactions between each health decrease |
| happiness_gain_interval | integer | 10 | Number of interactions between each happiness increase |
| cache_directory | string | "/tmp" | Directory for storing persistent session state files |
Best Practices
- Balance health decay with session length - If your sessions typically exceed 100 interactions, the pet will inevitably reach exhausted state. Increase the health_decay_interval to 40 or 50 for longer sessions so the pet remains in healthy or good state throughout your typical working period.
- Use pet state as a break reminder - When your pet transitions from healthy to tired, treat it as a natural signal to take a break. This creates a built-in break reminder system without installing separate timer applications.
- Reset pet state between work blocks - Delete the session cache file at the start of each focused work block to give your pet a fresh start. This prevents accumulated fatigue from previous sessions carrying over.
- Share pet state with your team - If your team uses a shared Slack or Discord channel, post your pet state at the end of each session. This creates a fun social dynamic where team members compare their coding pet health.
- Extend with feeding mechanics - Add custom events like successful test runs or merged pull requests that restore pet health. This creates a richer gameplay loop where good development practices directly benefit your virtual companion.
Common Issues
- Pet state resets every refresh - The session ID extraction may be failing, causing a new cache file each time. Verify that the session input JSON contains a valid session_id field and that the jq extraction command correctly parses it.
- Health and happiness exceed 100 - The boundary clamping logic uses shell arithmetic comparison. Ensure the ternary expressions are compatible with your bash version. Older bash versions may need explicit if-else statements instead.
- Cache files accumulate in /tmp - Each session creates a new cache file that persists until system cleanup. On long-running systems, these files can accumulate. Add a cleanup step to your shell logout script or periodically remove old tamagochi cache files.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Project Standards Config
Claude Code settings preset that enforces consistent coding standards. Configures TypeScript strict mode, ESLint rules, Prettier formatting, and naming conventions.
Bedrock Configuration Blueprint
All-in-one setting covering configure, claude, code, amazon. Includes structured workflows, validation checks, and reusable patterns for api.
Refined Corporate Preset
Production-ready setting that handles configure, proxy, settings, corporate. Includes structured workflows, validation checks, and reusable patterns for api.