cjmellor/level-up/level-up-development
Claude Code and agent skill by cjmellor/level-up
- community
Checking that the SKILL.md file is still in the repository.
Build and work with cjmellor/level-up features, including XP, levels, tiers, achievements, streaks, multipliers, challenges, leaderboards, leagues, and auditing.
Install
npx vskill@latest install cjmellor/level-up/level-up-developmentSKILL.md
When to use this skill
Use this skill when working with gamification features — adding experience points, levels, tiers, achievements, streaks, multipliers, leaderboards, leagues, or auditing — using cjmellor/level-up.
Core Concepts
- XP and Levels — Users earn experience points (XP) and automatically progress through a defined level structure.
- Tiers — Named status brackets (e.g. Bronze, Silver, Gold) based on XP thresholds, independent of numeric levels.
- Achievements — Unlockable rewards, optionally with progress tracking, optionally gated by tier.
- Streaks — Track consecutive daily activities with freeze support.
- Multipliers — Database-backed point modifiers with scoping, scheduling, and configurable stacking strategies.
- Leaderboard — Rank users by any metric (XP by default) with competition-style rank numbers, optionally scoped to a tier or a time period (day/week/month/custom).
- Leagues — A competitive cycle on one periodic Board: active users are grouped into small Cohorts within a Division each period and ranked within their Cohort. A Division is competition history, NOT a Tier (which is XP status) — a user holds both independently.
- Auditing — Automatic history of all XP changes, level-ups, and tier changes.
Setup
Install
Add Traits to the User Model
Add only the traits you need:
GiveExperience is the foundation. The others are opt-in.
Levels
Define Levels
Level 1 must have next_level_experience set to null — it is the default starting point. Users level up automatically when their XP reaches the threshold. Throws LevelExistsException if a level number already exists.
Level Queries
Manual Level Up
Throws InvalidArgumentException if the level does not exist. Fires UserLevelledUp for each intermediate level gained. Respects the level cap.
Level Cap
Configured in config/level-up.php:
When the cap is reached, the user stops levelling. If points_continue is true, XP still accumulates. If false, XP stops accumulating too.
Experience Points (XP)
Add Points
Creates an experience record if none exists, otherwise increments. Automatically levels up if the threshold is crossed. Points past the highest level's next_level_experience cap the user at the top level (no exception).
Deduct Points
Throws Exception if the user has no experience record.
Set Points
Directly overwrites the XP total, then recalculates level and tier from the new total (firing UserLevelledUp / UserTierUpdated as needed). Throws Exception if the user has no experience record. Writes no audit record — it is an administrative override, invisible to periodic leaderboards.
Get Points
Multipliers
Multipliers are database-backed records that modify point calculations. They can be scoped to specific users or tiers, scheduled with time windows, and configured to stack using different strategies.
Create Multipliers
Active multipliers are automatically applied when addPoints() is called. The multiplier value must be at least 0.01. If both starts_at and expires_at are set, starts_at must be before expires_at.
Scope Multipliers
Multipliers with no scopes apply to all users. Use the typed scopeToUser / scopeToTier methods to restrict:
scopeToUser and scopeToTier are idempotent (they use syncWithoutDetaching internally) — calling them twice with the same model does not create duplicates.
Inline Multiplier
Inline multipliers stack with DB multipliers according to the configured strategy.
Stacking Strategies
Configure in config/level-up.php:
Query Multipliers
MultiplierApplied Event
Fires when multipliers modify a point calculation. Properties: Model $user, Collection $multipliers, int $originalAmount, int $finalAmount, string $strategy.
Tiers
Define Tiers
Tier names and experience values must be unique. Throws TierExistsException on duplicates. The metadata column is a flexible JSON field for any extra data (colours, icons, descriptions). The entire add() call is wrapped in a database transaction — if any tier fails, none are created.
Automatic Tier Promotion
Tiers update automatically when XP changes. When addPoints() causes the user to cross a tier threshold, experience.tier_id is updated and a UserTierUpdated event fires with TierDirection::Promoted.
Query Tiers
getTier() returns null if the user has no experience record or tiers are disabled.
Demotion
By default, tiers use a high-water mark — once earned, they persist even if points decrease. Enable demotion to allow tier drops:
When enabled, deductPoints() checks if the user should drop and fires UserTierUpdated with TierDirection::Demoted. The newTier property is nullable — it will be null if the user drops below all tier thresholds.
Tier-Scoped Multipliers
Create a multiplier and scope it to a tier so it only applies to users at that tier:
When a Gold-tier user calls addPoints(), this multiplier is automatically included.
Tier-Gated Achievements
Restrict achievements so only users at a certain tier can earn them:
Attempting to grant to a user below Gold throws TierRequirementNotMet.
Tier-Scaled Streak Freezes
Higher tiers get longer freeze durations:
Falls back to the global freeze_duration if the tier is not listed or tiers are disabled.
Tier-Scoped Leaderboards
Tier Config
Achievements
Create Achievements
Grant Achievement
Throws Exception if progress exceeds 100, or if the user already has the achievement. Throws TierRequirementNotMet if tier-gated and user does not meet the tier requirement. AchievementAwarded event fires only when progress is null or 100.
Revoke Achievement
Throws Exception if the user does not have the achievement.
Achievement Progress
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingresources/boost/skills/level-up-development/SKILL.md
Popularity
- Repository stars
- 670
- Repository forks
- 55
- 7-day trend score
- 33
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cjmellor/level-up/level-up-development)