Skip to content

postgigg/gode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GODE β€” Every tool call is a lottery ticket. Gamified credits for Claude Code.

Claude Code Hook Slot Machine Tamper Proof Degenerate

Gode

Every tool call is a lottery ticket.

Gode is a PostToolUse hook for Claude Code that turns your coding sessions into a passive idle game. Credits rain down while Claude works. Blow them on a slot machine. Buy ridiculous titles. Flex ASCII dragons. All backed by real files, real randomness, a house edge that will take your money, and HMAC-signed wallets you can't cheat.


How it works

Gode runs silently in the background. Every time Claude uses a tool β€” Read, Edit, Bash, Grep, anything β€” the hook fires and rolls the dice. You'll see gold notifications pop in your terminal when credits land.

Passive credit drops appearing during normal Claude Code work β€” 8% chance per tool use, 0.5% rare drops

  • 8% chance per tool use to earn 5-25 credits
  • 0.5% chance for a rare drop worth 100-250 credits
  • 30-second cooldown between drops
  • Never blocks Claude's work β€” always exits 0

The slot machine

Spend your credits on 3-reel slots with 7 dev-themed symbols. Each reel is independent, weighted to hurt, and resolved with random.choices(). No fake shuffles.

Multi-spin results showing 5 spins with a GEM GEM GEM jackpot worth 5000 credits

Payout table

Match Payout Match Payout
3x GEM 5000 cr 2x GEM 200 cr
3x ROCKET 1000 cr 2x ROCKET 75 cr
3x STAR 500 cr 2x STAR 40 cr
3x MERGE 250 cr 2x MERGE 20 cr
3x COMMIT 150 cr 2x COMMIT 10 cr
3x COFFEE 100 cr 2x COFFEE 5 cr
3x BUG 75 cr 2x BUG 3 cr

Expected return: ~35-42 credits per 50 credit bet. The house always wins.


The shop

Burn credits on cosmetics, collectible ASCII art, and perks that might actually help.

Arcade shop showing titles, badges, ASCII art, and perks with prices and ownership status

Full item catalog

Titles β€” show up in your wallet header

Item Price
Code Monkey 200 cr
Bug Slayer 500 cr
Merge Master 1000 cr
Diamond Hands 2500 cr
Jackpot King 5000 cr

Badges

Item Price
Coffee Cup 100 cr
Rocket Ship 500 cr
Crown 1500 cr

ASCII Art β€” viewable after purchase

Item Price
Snake 150 cr
Robot 500 cr
Dragon 1000 cr
Castle 2000 cr

Perks β€” re-purchasable, actually do something

Item Price Effect
Lucky Charm 750 cr +2% earn chance for 50 tool uses
Double Down 500 cr Next spin payout is doubled

Achievements

Achievement Trigger Reward
First Spin Spin once +50 cr
Lucky 7 Win 7 times +100 cr
Jackpot! Hit 3x GEM +500 cr
Streak Master Win 5 in a row +300 cr
Big Spender Spend 5000 in shop +200 cr
Collector Own 5+ items +150 cr
High Roller Wager 10000 total +250 cr
Rare Find Get a rare drop +100 cr

Achievements are proof-of-earn verified. You can't inject them β€” the wallet audits every achievement against your actual stats on every load.


Tamper protection

Don't bother. Four layers will catch you.

Tamper detection β€” editing wallet.json triggers HMAC signature mismatch and resets everything

Layer What it checks Punishment
HMAC-SHA256 signature Every wallet save is signed with an obfuscated key. Edit any field and the signature breaks. Reset to 500
Proof-of-earn audit Achievements are cross-checked against actual stats. Claimed a jackpot with 0 spins? Reset to 500
Balance sanity Can't have more credits than you've ever earned. Items must be paid for. Equipped items must be owned. Reset to 500
Config hash config.json is SHA256-hashed and baked into the code. Change the odds, payouts, spin cost, or shop prices? Reset to 0

Wallet tampering resets you to starter credits. Config tampering is worse β€” you tried to rig the game itself. You get zero.


Installation

1. Clone it

git clone https://github.com/postgigg/gode.git ~/.claude/hooks/arcade

2. Register the hook

Add this to your ~/.claude/settings.json inside the hooks.PostToolUse array:

{
  "hooks": [
    {
      "type": "command",
      "command": "python ~/.claude/hooks/arcade/earner.py",
      "timeout": 5
    }
  ]
}

3. Start working

Credits drop automatically. Check your balance anytime:

python ~/.claude/hooks/arcade/arcade.py wallet

Commands

python arcade.py spin              # Pull the lever (50 cr)
python arcade.py spin 10           # Pull it 10 times
python arcade.py spin --bet 100    # High stakes
python arcade.py wallet            # Check balance + stats
python arcade.py shop              # Browse the store
python arcade.py buy badge_coffee  # Buy something
python arcade.py equip title title_bug_slayer  # Show off
python arcade.py equip badge badge_crown       # Flex
python arcade.py art art_dragon    # View your dragon
python arcade.py achievements      # Check progress
python arcade.py stats             # Gambling statistics
python arcade.py history           # Transaction log

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    PostToolUse     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚  Claude   β”‚ ─────────────────►│ earner.py β”‚      β”‚
β”‚  β”‚  Code     β”‚   (every tool)    β”‚  (hook)   β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜      β”‚
β”‚                                        β”‚            β”‚
β”‚       β”‚                          β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”      β”‚
β”‚       β”‚  "spin"                  β”‚ wallet.py β”‚      β”‚
β”‚       β”‚                          β”‚ (HMAC-    β”‚      β”‚
β”‚       β–Ό                          β”‚  signed)  β”‚      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                    β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜      β”‚
β”‚  β”‚ arcade.py β”‚β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β”‚  β”‚  (CLI)    β”‚                                      β”‚
β”‚  β””β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”˜         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚
β”‚     β”‚   β”‚              β”‚ config.json β”‚               β”‚
β”‚     β”‚   └─────────────►│  (locked)   β”‚               β”‚
β”‚     β”‚                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
β”‚     β–Ό                                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚ slots.py  β”‚  β”‚ shop.py  β”‚  β”‚ wallet.json β”‚      β”‚
β”‚  β”‚ (engine)  β”‚  β”‚ (store)  β”‚  β”‚ (persisted) β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Config reference

These are the defaults in config.json. They're locked β€” changing them zeros your wallet.

Setting Default What it does
spin_cost 50 Credits per spin
earn_chance 0.08 Drop chance per tool use
rare_drop_chance 0.005 Rare drop chance
earn_cooldown_seconds 30 Cooldown between drops
starting_credits 500 New wallet balance

If you fork the repo and want different values, you'll need to update the config hash in wallet.py to match. The hash is split across _CH0 through _CH3.


Requirements

  • Python 3.7+
  • Pillow (only for regenerating images: pip install Pillow)
  • Claude Code with hooks support
  • A tolerance for losing fake money

Regenerating images

pip install Pillow
python assets/generate.py

Requires Windows fonts (Consolas, Segoe UI). All images are hand-rendered with PIL β€” no AI generation.


Built for degens who think coding sessions need more dopamine.


Disclaimer: Gode uses fictional credits with zero real-world value. No real money, cryptocurrency, or tokens of any kind are involved. This is a toy. You cannot cash out. You cannot trade. You cannot lose anything except fake numbers and your dignity. Please gamble responsibly with your imaginary coins.

About

🎰 Gode β€” gamified credit system for Claude Code. Passive drops, slot machine, shop, achievements. A PostToolUse hook that turns your coding sessions into an idle game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages