Skip to main content
skill CX Codex

leaderboard · karanb192 — Claude Code skill: what it does, how to install

leaderboard prints a per-repo ranking of the files costing the most context tokens, with fixes suggested for the worst offenders.

MIT ★ 586 updated 2026-10-26

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add karanb192/claude-code-hooks
/plugin install context-hogs@claude-code-hooks
Open on GitHub

What leaderboard does

This skill renders a table of the repository's most expensive files by context usage: how many times each was read, total tokens accumulated, and an estimated cost. The numbers come from the context-hogs hook, which logs file access as work happens; the skill itself just runs node context-hogs.js --render to display what that hook recorded.

After the table, Claude is expected to point out the top 1-3 worst files and give one fix per file: splitting an oversized file, excluding a generated or vendored path, or adding a CLAUDE.md entry or permissions.deny rule for something Claude keeps re-reading. No commands get re-run for this; model invocation is disabled by default, so you call it directly.

The table has nothing to show without the context-hogs hook running alongside it, since that hook is what collects the data in the first place.

What it helps with

  • spot which files bloat a session's context
  • get a rough token-cost estimate per file
  • decide which file to split or drop from context
  • write a CLAUDE.md or permissions.deny rule for a problem file

Example prompts for the agent

  • Show me the context-cost leaderboard for this repo
  • Run leaderboard and suggest fixes for the worst files
  • /plugin:leaderboard

How to install leaderboard

1Plugin marketplace

/plugin marketplace add karanb192/claude-code-hooks
/plugin install context-hogs@claude-code-hooks

This installs the whole context-hogs plugin with all its skills

2Skills CLI (Vercel)

npx skills add karanb192/claude-code-hooks --skill leaderboard -a claude-code

3Manually: put the files in place

~/.claude/skills/leaderboard/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/leaderboard/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about leaderboard

How do I install leaderboard in Claude Code?

Run /plugin marketplace add karanb192/claude-code-hooks, then /plugin install context-hogs@claude-code-hooks.

What does the leaderboard skill do?

It prints a table ranking the repository's files by token cost in recent sessions and calls out the worst ones with a concrete fix for each.

Where does leaderboard get its data from?

The context-hogs hook records file reads as you work; the skill just renders that log through context-hogs.js --render.

Source text

SKILL.md · MIT
---
name: leaderboard
description: Show this repo's context-cost leaderboard: the files that pulled the most tokens into context
disable-model-invocation: true
---

# Context-cost leaderboard

!`node "${CLAUDE_SKILL_DIR}/../../context-hogs.js" --render 2>/dev/null || node "${CLAUDE_PLUGIN_ROOT}/context-hogs.js" --render`

The table above is this repository's most token-expensive files, aggregated across
your recent sessions (read count, cumulative tokens, estimated cost). It is produced
by the `context-hogs` hook, which records as you work.

Briefly call out the top 1-3 offenders and suggest one concrete fix each: for
example: split an oversized file, exclude a generated/vendored path, or add the
suggested CLAUDE.md / `permissions.deny` block for a file Claude keeps re-reading.
Keep it short; do not re-run any commands.

© Karan Bansal · MIT · karanb192/claude-code-hooks

Similar skills

All skills for Agent setup: memory, context, orchestration →

leaderboard by other authors comes first.

leaderboard Shpigford Publishing step for the nurb leaderboard: audit the runs merged since the last regeneration, refresh the verdicts, regenerate the report and the public page, open the PRs. CX Codex +1 124installs binance-leaderboard binance-web3-team binance-leaderboard is a Claude Code skill that fetches top on-chain traders by key metrics, scores addresses, and finds wallets holding specified tokens. CX Codex +1 3,900installs qianwen-usage QianWen-AI qianwen-usage — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode that handles QianWenAI auth and billing queries. Covers token usage, free-tier quotas, call logs with 4xx/5xx errors, and order history. CX Codex +1 6,100installs openclaw-control-center reason-machines openclaw-control-center is a Claude Code skill for viewing OpenClaw agents, tasks, token usage, session handoffs, memory, and documents. Write actions are restricted by default. CX Codex +1 4,400installs cost-optimize ruvnet cost-optimize reads token spend for the last 7 days, flags model tiers that don't match the work and weak caching, then ranks fixes by dollar savings. CX Codex +1 753installs cost-report ruvnet cost-report is a Claude Code skill that totals token usage and USD costs by agent and model. It runs on requests for a report covering a chosen period. CX Codex +1 730installs token-dashboard alexgreensh The token-dashboard Claude Code skill reports the cost of past sessions and opens the Token Optimizer dashboard on request. Asking about a cost does not open a browser. CX Codex +1 477installs

From the same set28

The whole set →

Project sponsors

Companies that keep this analytics open