Just show up every day. Track your daily Claude Code usage with a simple streak system.
Like going to the gym - consistency beats intensity. This tracker helps you build the habit of using Claude Code daily, naturally discovering more valuable use cases along the way.
π Detailed Installation Guide β
curl -fsSL https://raw.githubusercontent.com/ussumant/claude-code-streak-tracker/main/install.sh | bashgit clone https://github.com/ussumant/claude-code-streak-tracker.git
cd claude-code-streak-tracker
./install.shTrack consistency + daily pace - see your progress in real-time! π
1. Status Line (Always Visible)
Settings Status Config Usage β π₯ 4 day streak | π 43/15 today
2. Welcome Message (Every Session)
π₯ 12 day streak
β Best: 18 days
3. /streak Command (Full Details)
π₯ 12 day streak
October 2024
Mo Tu We Th Fr Sa Su
π₯ π₯ π₯ π₯ π₯
π₯ π₯ β¬ π₯ π₯ π₯ π₯
π₯ π₯ π₯ π₯
β Best: 18 days
π Total active: 23 days
- Automatic Tracking: Analyzes
~/.claude/history.jsonl - Streak Day: At least 1 Claude Code conversation
- Smart Calculation: Current streak + best streak + 30-day calendar
- Performance: <50ms with intelligent caching
- Smart Nudges: Gentle reminders when your streak needs attention (optional)
Celebrate achievements as you build the habit:
- π 7 days - Week Warrior
- π 14 days - Two weeks strong!
- π 30 days - Month mastery!
- π 50 days - Legend status!
- π 100 days - Absolutely phenomenal!
Context-aware nudges that help you code better, not just maintain streaks.
Unlike generic reminders, our nudge system analyzes your real developer activity to offer help when you actually need it.
Priority System: Productive flow β Bug spiral β Analysis paralysis β Other signals β Streak reminders
π’ Productive Flow (suppress all nudges)
- Recent commit + active editing? β No nudges (don't interrupt!)
- Steady progress on current task? β No nudges (you're in the zone)
π΄ Bug-Fixing Spiral (highest priority)
- Same test command failed 3+ times in 45 min? β "npm test failed 5 times in 30 min. Ask: 'Why is this failing?'"
- Repeated build failures? β "Debugged for 45 min with 4 failures. Want Claude's help?"
π Analysis Paralysis (high priority)
- 8+ file reads/searches with no commits in 45 min? β "Explored 12 commands in 35 min with no commits. Ready to build?"
- Lots of exploration, little building? β "Reading code for 40 min. Ask: 'Where should I start implementing?'"
π‘ Stuck Signals
- Been working on same file for 2+ hours with no commit? β "Stuck on auth.ts? Claude can review your approach"
- 5+ git status calls in 10 minutes? β "Ready to commit or need a sanity check?"
- Lots of grep/find commands? β "Searching through code? Ask Claude to explain the structure"
- Bouncing between directories? β "Lost in the codebase? Claude can help navigate"
π΅ Victory Moments
- Just committed code? β "Nice commit! Document what you learned while it's fresh?"
- Tests just passed? β "Testing complete? Document what this test covers"
π£ Work Transitions
- Returning after 2+ hour break? β "Welcome back! Pick up where you left off on feature/auth?"
- Late night coding (10 PM+)? β "It's 11:30 PM. Quick ask: 'Review my changes before I commit?'"
- Context switching (5+ files in 30 min)? β "Bouncing between files? Ask: 'How do auth.ts and api.ts connect?'"
βͺ Streak Reminders (fallback only)
- Only used when no real developer signal detected
- High risk: End of day with no activity
- Milestones: 1 day away from achievement
Traditional streak trackers focus on vanity metrics. We focus on actual work patterns:
- β Detects bug-fixing spirals β Suggests asking Claude to debug before you waste more time
- β Detects analysis paralysis β Nudges you to start building instead of just reading
- β Respects productive flow β Won't interrupt when you're making steady progress
- β Suggests asking Claude when you're stuck β Real value, not vanity metrics
- β Encourages documentation after victories β Builds knowledge
- β Helps you resume work after breaks β Saves time
- β Doesn't nag about maintaining streaks β Not gimmicky
- Analyzes shell history and git activity locally (privacy-first)
- Context-based messages with specific file names and suggestions
- macOS notifications with actionable next steps
- Respects quiet hours (11 PM - 7 AM)
- Max 2 nudges per day
- Flow-state aware (won't interrupt active work)
# Install hourly check (runs in background)
(crontab -l 2>/dev/null; echo "0 * * * * ~/.claude/nudge-scheduler.sh") | crontab -
# Test nudge engine manually
node ~/.claude/nudge-engine.js
# Check what signals are detected right now
node ~/.claude/context-analyzer.jsBug-Fixing Spiral:
- β "Keep trying!"
- β "npm test failed 5 times in 30 min. Ask: 'Why is this failing?'"
Analysis Paralysis:
- β "Time to code!"
- β "Explored 12 commands in 35 min with no commits. Ready to build?"
Productive Flow:
- β "Your streak needs attention!"
- β No nudge (you're in the zone - no interruption)
Stuck on Task:
- β "Your 12-day streak expires in 4 hours!"
- β "Been on auth.ts for 2h? Claude can review your approach."
Victory Moment:
- β "Keep going!"
- β "Just committed! Add a comment explaining the approach?"
Real-time feedback on whether you're on track to hit your daily usage quota.
The system tracks your conversations throughout the day and shows whether you're ahead, on pace, or behind schedule.
Status Line shows progress:
π₯ 4 day streak | π 43/15 today
Default Settings:
- Daily quota: 15 conversations
- Working hours: 7 AM - 11 PM
- Pace check threshold: -20% (nudges when 20%+ behind)
Customize in ~/.claude/nudge-config.json:
{
"dailyQuota": 15,
"quotaWorkingHours": {
"start": 7,
"end": 23
},
"quotaPaceNudgeThreshold": -20,
"features": {
"quotaPaceChecks": true
}
}Behind pace (20%+ behind):
- "60% of day done, only 40% to quota. Time to tackle that task?"
- "Behind pace today - 5/15 conversations. What are you working on?"
- "Need 10 more conversations to hit quota. Quick win?"
Ahead of pace (15%+ ahead):
- "Crushing it! 12/15 conversations - 20% ahead of schedule π₯"
- "Way ahead of pace! 25% ahead - keep this energy! β‘"
On track:
- No nudge (you're doing fine!)
π₯ 4 day streak
## Today's Progress
π 43/15 conversations (100% to quota)
β±οΈ 48% through working hours
β
52% ahead of pace! Crushing it! π₯
October 2024
...
- Actionable in real-time: Know if you need to pick up the pace
- Respects working hours: Only checks pace during 11 AM - 8 PM
- Celebrates wins: Positive reinforcement when ahead
- Non-judgmental: Gentle nudges, not nagging
- Configurable: Adjust quota to your needs
The power of showing up.
You don't track gym results daily - you track showing up. Same here. Consistency creates the habit. The habit creates discoveries. The discoveries create value.
Even a single Claude Code conversation counts. You'll naturally find yourself reaching for AI assistance more often, discovering use cases you never considered.
- Claude Code installed (
~/.claudedirectory exists) - Node.js (any recent version)
- macOS or Linux
~/.claude/
βββ streak-lib.js # Core calculation engine
βββ streak-statusline.sh # Status line script (shows streak + quota)
βββ quota-tracker.js # Daily quota & pace tracking
βββ context-analyzer.js # Developer signal detection (includes pace)
βββ nudge-messages.js # Contextual message templates
βββ nudge-engine.js # Nudge decision engine
βββ nudge-scheduler.sh # Hourly cron runner
βββ nudge-deliver.sh # Notification delivery
βββ nudge-config.json # User preferences (includes quota settings)
βββ hooks/
β βββ streak-welcome.sh # Session start hook
βββ commands/
β βββ streak.md # /streak slash command (shows pace details)
βββ settings.json # Updated with hooks + statusLine
~/.claude-streak-cache.json # Performance cache (auto-created)
~/.claude/nudge-history.jsonl # Nudge delivery log (auto-created)
Edit ~/.claude/streak-lib.js:
const TIMEZONE = 'America/New_York'; // Change to your timezoneRemove from ~/.claude/settings.json:
// Disable welcome message
"hooks": { ... }
// Disable status line
"statusLine": { ... }# Force recalculation
rm ~/.claude-streak-cache.json
node ~/.claude/streak-lib.js- Restart Claude Code
- Check
~/.claude/settings.jsonhas hooks configured - Test:
~/.claude/hooks/streak-welcome.sh
- Restart Claude Code
- Check
~/.claude/settings.jsonhas statusLine configured - Test:
~/.claude/streak-statusline.sh
# Restore backup
cp ~/.claude/settings.json.backup ~/.claude/settings.json
# Remove files
rm ~/.claude/streak-lib.js
rm ~/.claude/streak-statusline.sh
rm ~/.claude/hooks/streak-welcome.sh
rm ~/.claude/commands/streak.md
rm ~/.claude-streak-cache.jsonThis is a personal project, but feel free to fork and adapt for your needs!
MIT
Start your streak today! π₯
Open Claude Code β See your current streak β Build the habit of daily AI-assisted development.