✓ Verified 💻 Development ✓ Enhanced Data

Gamification Xp

XP system for productivity gamification via ClawdBot - track levels, badges, streaks, and achievemen

Rating
4.8 (221 reviews)
Downloads
4,471 downloads
Version
1.0.0

Overview

XP system for productivity gamification via ClawdBot - track levels, badges, streaks, and achievements.

Key Features

1

XP System: Earn XP for habits, tasks, and goal milestones

2

Leveling: Level up with formula XP = 50 * (level^2)

3

Streak Bonuses: Up to 2.0x multiplier for consistent habits

4

Badges: Earn badges for achievements and milestones

5

Leaderboard: Compare progress (multi-user support)

6

Accountability: Track commitment and earn-back system

Complete Documentation

View Source →

Gamification & XP System

Turn productivity into a game with XP, levels, badges, streaks, and achievements. Every completed task, habit, and goal milestone earns XP toward leveling up.

ClawdBot Integration

This skill is designed for ClawdBot - it provides the prompt interface for ClawdBot's gamification API server which stores data in Supabase.

Architecture:

text
User → ClawdBot Gateway → ClawdBot API Server → Supabase (Postgres)
                         (Railway)              (user_gamification, xp_transactions tables)

The backend implementation lives in api-server/src/routes/gamification.ts and api-server/src/lib/xp-engine.ts.

Features

  • XP System: Earn XP for habits, tasks, and goal milestones
  • Leveling: Level up with formula XP = 50 * (level^2)
  • Streak Bonuses: Up to 2.0x multiplier for consistent habits
  • Badges: Earn badges for achievements and milestones
  • Leaderboard: Compare progress (multi-user support)
  • Accountability: Track commitment and earn-back system

Environment Variables

VariableRequiredDescription
SUPABASE_URLYesSupabase project URL
SUPABASE_SERVICE_KEYYesSupabase service role key

API Endpoints

All endpoints are relative to the ClawdBot API server ({CLAWDBOT_API_URL}/api/gamification/).

Get User Stats

text
GET /api/gamification/stats/:userId

Response:

json
{
  "totalXp": 2450,
  "currentLevel": 7,
  "weeklyXp": 350,
  "monthlyXp": 1200,
  "progress": {
    "xpInLevel": 150,
    "xpNeeded": 450,
    "percent": 33
  },
  "accountability": {
    "balance": 50,
    "totalSlashed": 10,
    "totalEarnedBack": 60
  }
}

Get Recent Transactions

text
GET /api/gamification/transactions/:userId?limit=20

Get User Badges

text
GET /api/gamification/badges/:userId

Award XP (Internal)

text
POST /api/gamification/award
{
  "userId": "302137836",
  "amount": 50,
  "source": "habit",
  "sourceId": "morning-routine",
  "note": "Completed morning routine"
}

Complete Habit (with streak bonus)

text
POST /api/gamification/habit-complete
{
  "userId": "302137836",
  "habitId": "workout",
  "currentStreak": 7
}

Complete Task

text
POST /api/gamification/task-complete
{
  "userId": "302137836",
  "taskId": "task-123",
  "priority": 8
}

Goal Milestone

text
POST /api/gamification/goal-milestone
{
  "userId": "302137836",
  "goalId": "goal-456",
  "milestonePercent": 50
}

Award Badge

text
POST /api/gamification/badge
{
  "userId": "302137836",
  "badgeType": "early_bird",
  "metadata": { "streak": 30 }
}

Get Leaderboard

text
GET /api/gamification/leaderboard

Get XP Config

text
GET /api/gamification/config

Database Tables

This skill requires the following Supabase tables:

  • user_gamification - User XP totals, levels, streaks
  • xp_transactions - XP award history
  • user_badges - Earned badges

XP Rewards

ActionBase XPNotes
Habit completion10-50+ streak bonus up to 2x
Task completion5-50Based on priority (1-10)
Goal 25% milestone100First quarter
Goal 50% milestone200Halfway
Goal 75% milestone300Three quarters
Goal 100% completion500Full completion

Example Usage

Check Progress

text
"What's my XP level?"
"How close am I to leveling up?"
"Show my gamification stats"

View Achievements

text
"What badges do I have?"
"Show my recent XP transactions"
"What's my current streak?"

Leaderboard

text
"Show the leaderboard"
"Who has the most XP?"

Related

  • goals - Set and track goals
  • habits - Habit tracking system
  • remind - Reminder system
  • daily-briefing - Daily progress summary

Installation

Terminal bash

openclaw install gamification-xp
    
Copied!

💻Code Examples

**Architecture:**

architecture.txt
User → ClawdBot Gateway → ClawdBot API Server → Supabase (Postgres)
                         (Railway)              (user_gamification, xp_transactions tables)

Response:

response.json
{
  "totalXp": 2450,
  "currentLevel": 7,
  "weeklyXp": 350,
  "monthlyXp": 1200,
  "progress": {
    "xpInLevel": 150,
    "xpNeeded": 450,
    "percent": 33
  },
  "accountability": {
    "balance": 50,
    "totalSlashed": 10,
    "totalEarnedBack": 60
  }
}

### Award XP (Internal)

-award-xp-internal.txt
POST /api/gamification/award
{
  "userId": "302137836",
  "amount": 50,
  "source": "habit",
  "sourceId": "morning-routine",
  "note": "Completed morning routine"
}

### Complete Habit (with streak bonus)

-complete-habit-with-streak-bonus.txt
POST /api/gamification/habit-complete
{
  "userId": "302137836",
  "habitId": "workout",
  "currentStreak": 7
}

### Complete Task

-complete-task.txt
POST /api/gamification/task-complete
{
  "userId": "302137836",
  "taskId": "task-123",
  "priority": 8
}

### Goal Milestone

-goal-milestone.txt
POST /api/gamification/goal-milestone
{
  "userId": "302137836",
  "goalId": "goal-456",
  "milestonePercent": 50
}

### Award Badge

-award-badge.txt
POST /api/gamification/badge
{
  "userId": "302137836",
  "badgeType": "early_bird",
  "metadata": { "streak": 30 }
}

### Check Progress

-check-progress.txt
"What's my XP level?"
"How close am I to leveling up?"
"Show my gamification stats"

### View Achievements

-view-achievements.txt
"What badges do I have?"
"Show my recent XP transactions"
"What's my current streak?"

### Leaderboard

-leaderboard.txt
"Show the leaderboard"
"Who has the most XP?"

Tags

#clawdbot_tools #bot #productivity

Quick Info

Category Development
Model Claude 3.5
Complexity One-Click
Author chipagosfinest
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install gamification-xp