npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-rpg-game

v0.1.2

Published

RPG gamification for Claude Code — earn XP, level up, and collect loot while coding

Readme

claude-rpg

Turn your coding sessions into an RPG adventure. Earn XP, level up, collect loot, and evolve your class — all while coding with Claude Code.

⚔️  C L A U D E   R P G  ⚔️
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Semih — Level 12 Adept
  Class: 🧙🛡️ Battle Mage "Refactor & Test"

  XP: 2,847 / 3,500
  ████████████████░░░░ 81%

  📊 Stats:
    STR ████████░░░░░░ 52
    INT ████████████░░ 89 ★
    DEX █████░░░░░░░░░ 34
    WIS ██████████░░░░ 71
    CON ███████████░░░ 78

  🔥 Streak: 5 days (best: 12) +10% XP

  🎒 Equipment:
    👑 Head: 🔵 🎧 Noise Cancelling Helm
    ⚔️ Weapon: 🟢 ⌨️ Mechanical Keyboard
    👕 Armor: 🔵 🦇 Dark Theme Cape
    🧿 Amulet: 🟢 ☕ Enchanted Coffee Mug

  🧬 Evolution: 🧙 Wizard → 🧙🏹 Sage → 🧙🛡️ Battle Mage
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

How It Works

claude-rpg runs as a PostToolUse hook in Claude Code. Every time Claude edits a file, reads code, runs tests, or makes a commit, the hook fires in the background and awards XP — with zero context consumption.

You write code with Claude Code
  → Claude uses a tool (Edit, Read, Bash, etc.)
  → Hook fires silently in the background (~37ms)
  → XP gained, stats updated, maybe an item drops
  → You type /rpg to check your character

Claude never sees the RPG system. It doesn't consume tokens or slow down your work.

Install

npm install -g claude-rpg-game
rpg install

Then restart Claude Code. That's it.

install automatically:

  • Creates ~/.claude-rpg/ for your save data
  • Adds the /rpg command to Claude Code
  • Configures the PostToolUse hook in ~/.claude/settings.json

Commands

Inside Claude Code:

/rpg                  Character sheet
/rpg inventory        View your loot
/rpg equip <#|name>   Equip an item by slot number or name
/rpg unequip <#|slot> Unequip by slot number or name
/rpg quests           Quest chain progress
/rpg daily            Daily quests
/rpg history          Class evolution timeline

Or directly from terminal:

rpg character
rpg inventory
rpg equip 1
rpg unequip 6
rpg quests
rpg daily
rpg history

Dynamic Class System

You don't pick a class — your class picks you. Every action builds one of 5 stats:

| Stat | Source | |------|--------| | STR | Commits, file creation, builds | | INT | Edits, refactoring, bug fixes | | DEX | Quick fixes, small changes | | WIS | File reads, grep, code exploration | | CON | Running tests |

Your dominant stat determines your class. If two stats are close, you get a hybrid class:

| Class | Type | Playstyle | |-------|------|-----------| | ⚔️ Warrior | STR | The Builder | | 🧙 Wizard | INT | The Refactorer | | 🗡️ Rogue | DEX | The Quick Fixer | | 🏹 Ranger | WIS | The Explorer | | 🛡️ Paladin | CON | The Guardian | | ⚔️🛡️ Dark Knight | STR+CON | Build & Test | | 🧙🏹 Sage | INT+WIS | Research & Refactor | | 🗡️🧙 Spellblade | DEX+INT | Quick & Smart | | ⚔️🗡️ Berserker | STR+DEX | Fast Shipper | | 🧙🛡️ Battle Mage | INT+CON | Refactor & Test | | ...and 5 more hybrids | | |

Your class evolves over time as your coding style changes.

Loot System

Items drop randomly after tool uses. Higher levels unlock rarer drops.

5 rarity tiers: ⬜ Common → 🟢 Uncommon → 🔵 Rare → 🟣 Epic → 🟠 Legendary

8 equipment slots: Head, Weapon, Shield, Armor, Boots, Ring ×2, Amulet

Items give bonuses like XP +%, stat +%, or drop rate +%. Examples:

| Item | Rarity | Slot | Effect | |------|--------|------|--------| | 🦆 Rubber Duck | ⬜ | Amulet | XP +5% | | ⌨️ Mechanical Keyboard | 🟢 | Weapon | INT +10%, XP +5% | | 🦇 Dark Theme Cape | 🔵 | Armor | XP +12%, INT +8% | | ⚔️ Mass Formatter | 🟣 | Weapon | INT +20%, XP +20% | | 🔱 The Mass Deployer | 🟠 | Weapon | STR +25%, INT +15%, XP +30% |

33 items total across all slots and rarities.

Quests

Daily Quests

Reset every day. Quick tasks for bonus XP:

  • 🩸 First Blood — Make your first edit today (+50 XP)
  • 🔥 Warm Up — Edit 5 files (+30 XP)
  • 📦 Committer — Make 3 commits (+40 XP)
  • 📖 Bookworm — Read 10 files (+25 XP)
  • 🧪 Test Runner — Run 3 tests (+60 XP)

Quest Chains

Long-term goals with item rewards at each stage:

  • 📜 The Refactoring Saga — Edit 10/25/50 files
  • 🏃 The Commit Marathon — 10/25/50 commits
  • 🗺️ The Explorer's Path — Read 50/100/200 files
  • 🧪 The Test Guardian — Run 10/25/50 tests
  • 🏗️ The Builder — Create 5/15/30 files

Streak System

Code on consecutive days to build a streak. Each day adds +2% XP bonus, up to +20%.

Uninstall

rpg uninstall
npm uninstall -g claude-rpg-game

Your save data stays in ~/.claude-rpg/ — delete it manually if you want a fresh start.

Requirements

License

MIT