loot-drop
v1.2.0
Published
Collectible trading cards generated from your AI coding sessions. Spotify Wrapped meets Pokemon cards for developers using Claude Code, OpenCode, and Codex.
Maintainers
Readme
loot-drop
Collectible trading cards generated from your AI coding sessions.
Think Spotify Wrapped meets Pokemon cards — but for developers using AI coding agents.
Run one command, get five beautifully rendered trading cards based on your actual usage data. Each card captures a different dimension of how you code with AI: your identity, specialization, raw power, legendary moments, and temporal patterns.
Quick Start
npx loot-dropThat's it. The tool scans your local session data, crunches 150+ metrics, and drops 5 PNG trading cards into a loot-drop/ folder on your Desktop. The whole reveal takes about a minute with a dramatic CLI experience.
Requirements: Node >= 18, macOS or Linux. Works with Claude Code, OpenCode, and Codex.
The Five Cards
Identity — "Who you are"
Your overall coding persona. The engine analyzes your streak length, active days, tool diversity, session patterns, and model variety to assign you one of 48 archetypes across 8 fantasy houses (Shadow Keep, Sun Spire, Iron Forge, Storm Gate, Archive Tower, Crystal Citadel, Abyss Hall, Open Road).
You might be The Midnight Architect if you code late at night across many repos, or The Dawn Ritualist if you start every morning with a focused session.
Stats: HP (composite score), House, Archetype
Specialist — "What you do"
What kind of work do you actually do with AI? The engine classifies your sessions into five specializations — Architect, Debugger, Strategist, Janitor, Tester — based on your tool calls, file patterns, and keyword analysis.
Each class gets a fantasy name. Strategists become The Oracle. Debuggers become The Bug Hunter. Your primary and secondary class combine into a unique title.
Stats: INT (intelligence score), MCPs, Tools, Models
Power — "How hard you hit"
Pure scale. Total tokens consumed, estimated cost, cache efficiency, output-to-input ratio, and model mastery. The engine even penalizes over-reliance on a single model — true power means knowing when to use Opus vs. Sonnet vs. Haiku.
Stats: INPUT tokens, OUTPUT tokens, estimated COST
Legends — "Your hall of fame"
Your war stories. That 4-hour marathon debugging session at 2am. The single session where you generated 500K tokens. Your month-over-month growth trajectory. The engine finds your most legendary moments and builds a hall of fame.
Stats: Total SESSIONS, LONGEST session, TOP PROMPT
Temporal — "Your time fingerprint"
When do you code? This card renders actual data visualizations — a 24-hour radial clock showing your activity distribution, a monthly bar chart of tokens burned, and a streak progress bar. It detects whether you're a night owl, an afternoon cruiser, or a dawn patrol devotee.
Stats: PEAK HOUR, ACTIVE DAYS, STREAK
How Scoring Works
Every card is scored independently on a 0–100 scale using percentile-band interpolation. Your metrics are compared against calibrated bands (p0 through p100) so that scoring is fair whether you've run 50 sessions or 5,000.
Rarity Tiers
| Tier | Score Range | Cards per Type | | ------------------- | ----------- | -------------- | | Common | 0–40 | 8 variants | | Rare | 40–65 | 6 variants | | Epic | 65–85 | 4 variants | | Legendary | 85–100 | 2 variants |
Each tier has unique card artwork — 20 illustrations per card type, 100 total.
Star Ratings
Cards earn 1–5 stars based on their index within the tier:
- Index 1–4: ★☆☆☆☆
- Index 5–8: ★★☆☆☆
- Index 9–12: ★★★☆☆
- Index 13–16: ★★★★☆
- Index 17–20: ★★★★★
Holographic Cards
Some cards get a rainbow shimmer holographic treatment. This isn't a rarity tier — it's a bonus triggered by achievement unlocks. The more achievements you earn on a card type, the higher the chance it goes holographic.
100+ Achievements
Achievements are evaluated across all five card types. Some favorites:
- Night Stalker — 30+ sessions between 11pm and 4am
- Token Tsunami — Burned over 50M tokens
- The Immortal — 180-day all-time streak
- MCP Fanatic — 30+ MCP servers configured
- Cache Master — 70%+ cache hit rate
- The Devoted — 1,000+ total sessions
- Season of Fire — 200+ sessions in a single month
- The Patron — Over $1,000 in estimated API cost
Each unlocked achievement appears as an ability on the relevant card and increases the holographic probability.
Built in a Weekend
This project was built over a weekend as a fun experiment in turning developer telemetry into something you'd actually want to look at.
The Stack
- TypeScript — Everything from parsers to renderers
- Ink (React for the terminal) — Powers the dramatic 5-phase CLI reveal experience with spinners, gradients, and big text
- resvg-js — Converts SVG card templates to high-quality PNGs
- Claude Haiku — Generates the sassy flavor text at the bottom of each card ("3,665 tool calls. Not a single one was 'go outside.'")
- better-sqlite3 — Tracks cooldowns so you can't spam-generate (24-day cooldown, bypassable with
--force) - Bun — Build tooling
The Pipeline
Session Data (JSONL/JSON)
→ Unified Parser (Claude Code + OpenCode + Codex)
→ Profile Aggregator (150+ derived metrics)
→ 5 Independent Scorers (weighted percentile scoring)
→ Achievement Engine (100+ criteria)
→ Asset Fetcher (S3 illustrations + icons)
→ Flavor Text Generator (Claude Haiku API)
→ SVG Card Renderer (650×1050px, golden ratio)
→ PNG Export (resvg-js)
→ Dramatic CLI Reveal (Ink/React)The cards follow standard trading card dimensions (2.5" × 3.5" golden ratio) and each card type has its own color palette — deep purple for Identity, dark gold for Specialist, teal for Power, crimson for Legends, and navy for Temporal.
What Makes It Fun
- It's personal. Every card is generated from your actual data. Your streaks, your peak hours, your favorite models, your most epic sessions.
- It's surprising. You probably don't know your cache hit rate or that you ran 83 sessions last month. The engine finds patterns you didn't know existed.
- The flavor text roasts you. Claude Haiku generates one-liners that range from self-deprecating to genuinely savage. Each card type has a different tone — cocky for Specialist, dramatic for Legends, deadpan for Temporal.
- The reveal is theatrical. Five phases: agent scan, superlatives, scoring, achievements, and finally the cards. It builds anticipation like opening a real booster pack.
Supported Agents
| Agent | Data Source |
| ---------------------------------------------------------- | ------------------------------ |
| Claude Code | ~/.claude/projects/*.jsonl |
| OpenCode | OpenCode JSON sessions |
| Codex | Codex session data |
The tool automatically detects which agents you have installed and merges data from all sources. Minimum 10 sessions required to generate cards.
Usage
# Generate your cards
npx loot-drop
# Force regeneration (bypass 24-day cooldown)
npx loot-drop --forceCards are saved to ~/Desktop/loot-drop/ as PNG files, ready to share.
Built with an mass of tokens and an mass of fun.
