P

Programmer Tamagotchi Statusline Scheme

Powerful setting for virtual, evolves, based, your. Includes structured workflows, validation checks, and reusable patterns for statusline.

SettingClipticsstatuslinev1.0.0MIT
0 views0 copies

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

AspectDetails
Pet HealthStarts at 100 HP, decreases by 10 every 20 interactions simulating fatigue
Pet HappinessStarts at 50 joy, increases by 5 every 10 interactions rewarding engagement
Pet AppearanceFour visual states: healthy cat, good cat, tired cat, exhausted skull
Mood IndicatorSparkle (very happy), smile (happy), neutral face, or sad based on joy level
Session PersistenceState 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

ParameterTypeDefaultDescription
initial_healthinteger100Starting HP value for the virtual pet at session begin
initial_happinessinteger50Starting joy value for the virtual pet at session begin
health_decay_intervalinteger20Number of interactions between each health decrease
happiness_gain_intervalinteger10Number of interactions between each happiness increase
cache_directorystring"/tmp"Directory for storing persistent session state files

Best Practices

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

  1. 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.
  2. 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.
  3. 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.
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates