
analytics
Query and analyze Claude Code usage history stored in a ccrecall database.
- version
- 0.0.23
- GitHub stars
- 37
What it does
- Covers token usage by model, project, and day, plus session history and thinking block search
- Provides an analytics skill for querying token usage and session history from the ccrecall database
- Designed for reviewing how Claude Code is used across your projects and sessions
Add marketplace
/plugin marketplace add spences10/claude-code-toolkitRun it inside Claude Code once, then install the plugin below.
Install
/plugin install analytics@claude-code-toolkitRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceSession Analytics
Query your Claude Code usage data from the ccrecall SQLite database.
Prerequisites
# Sync transcripts to SQLite (requires bun)
bun x ccrecall sync
Database location: ~/.claude/ccrecall.db
CLI Commands
bun x ccrecall sync # Import transcripts (incremental)
bun x ccrecall stats # Show session/message/token counts
bun x ccrecall sessions # List recent sessions
bun x ccrecall search # Full-text search across messages
bun x ccrecall tools # Show most-used tools
bun x ccrecall query # Execute raw SQL
Quick Queries
Token usage by model
SELECT model,
COUNT(*) as messages,
SUM(input_tokens) as input_tok,
SUM(output_tokens) as output_tok
FROM messages
WHERE model IS NOT NULL
GROUP BY model;
Daily usage
SELECT date(timestamp/1000, 'unixepoch') as day,
COUNT(*) as msgs,
SUM(output_tokens) as tokens
FROM messages
GROUP BY day
ORDER BY day DESC
LIMIT 7;
Usage by project
SELECT s.project_path,
COUNT(m.uuid) as messages,
SUM(m.output_tokens) as tokens
FROM sessions s
JOIN messages m ON m.session_id = s.id
GROUP BY s.project_path
ORDER BY tokens DESC
LIMIT 10;
Tool usage
SELECT tool_name, COUNT(*) as count
FROM tool_calls
GROUP BY tool_name
ORDER BY count DESC;
Search thinking blocks
SELECT substr(thinking, 1, 200) as preview,
datetime(timestamp/1000, 'unixepoch') as time
FROM messages
WHERE thinking LIKE '%your search term%'
ORDER BY timestamp DESC
LIMIT 10;
Using with mcp-sqlite-tools
If you have mcp-sqlite-tools configured, Claude can query directly:
- Open database:
open_database ~/.claude/ccrecall.db - Tables:
sessions,messages,tool_calls,tool_results,teams,team_members,team_tasks - Run queries above or ask Claude to analyze patterns
GitHub
From the spences10/claude-code-toolkit README
claude-code-toolkit
Productivity and ecosystem tools for Claude Code.
For vendor-agnostic skills usable outside Claude Code's plugin marketplace, use spences10/skills.
Quick Start
# Add marketplace
/plugin marketplace add spences10/claude-code-toolkit
# Install plugins
/plugin install mcp-essentials
/plugin install analytics
/plugin install toolkit-skills
/plugin install claude-workflow
/plugin install dev-environment
/plugin install devops-skills
/plugin install dev-practices
/plugin install nopeek
Plugins
mcp-essentials
Setup guide for recommended MCP servers:
| Server | Purpose |
|---|---|
| mcp-omnisearch | Unified search (Tavily, Kagi, GitHub, Perplexity) |
| mcp-sqlite-tools | Safe SQLite operations |
| mcpick | Manage MCP servers, plugins, cache, and profiles |
Skills: mcp-setup — setup guide for configuring MCP servers
analytics
Query Claude Code usage from ccrecall database:
- Token usage by model/project/day
- Session history
- Thinking block search
Skills: analytics — query token usage and session history
toolkit-skills
Core skills for the toolkit ecosystem.
| Skill | Description |
|---|---|
| ecosystem-guide | Guide to choosing the right tool across the ecosystem |
| research | Verify sources before presenting findings |
| skill-creator | Design and create Claude Skills using progressive disclosure |
| reflect | Extract learnings from sessions and persist to skills |
| plugin-dev | Validate, test, and distribute Claude Code plugins |
claude-workflow
Claude Code workflow patterns.
| Skill | Description |
|---|---|
| advanced-prompting | High-leverage prompts that challenge Claude's defaults |
| claude-md-maintenance | Maintain CLAUDE.md files effectively |
| orchestration | Multi-agent orchestration patterns for team mode |
| structured-rpi | Enhanced Research-Plan-Implement workflow with structured phase gates |
dev-environment
Development environment setup.
| Skill | Description |
|---|---|
| terminal-optimization | Terminal setup for Claude Code (Ghostty, statusline, tmux) |
| worktree-mastery | Git worktree patterns for parallel Claude sessions |
devops-skills
DevOps patterns.
| Skill | Description |
|---|---|
| ci-debug-workflow | Debug failing CI pipelines and reproduce bugs locally |
| techdebt-finder | Find duplicated code, inconsistent patterns, and refactoring opportunities |
| deslop | Identify and remove AI-generated code patterns (slop) |
| improve-codebase-architecture | Find architectural improvement opportunities and deepen shallow modules |
dev-practices
Development practice skills.
| Skill | Description |
|---|---|
| tdd | Test-Driven Development workflow with red-green-refactor cycle |
nopeek
Secret safety for Claude Code sessions. Powered by the nopeek CLI.
| Hook | Event | What it does |
|---|---|---|
| redact-output | PreToolUse(Bash) | Best-effort pattern redaction for selected cloud CLI stdout; not stderr |
Tell your coding agent: Use npx nopeek if you need keys.
Swap npx for pnpx or bunx if that's what you use.
The agent selects keys and uses run for each credential-dependent command.
init is an optional cloud-auth audit, not an installation prerequisite.
Security migration: Update to nopeek CLI 0.0.17 or newer and
nopeek plugin 0.0.24 or newer. Stored credentials
and CLI profiles are no longer automatically loaded into sessions, and
load no longer writes CLAUDE_ENV_FILE. Remove legacy SessionStart
registrations and restart affected sessions. The retired session-load.sh
entry point only prints migration guidance; it never reads stored keys.
Neither updating nor deleting stored keys clears old environments,
session files, histories, or transcripts. Rotate exposed credentials.
Persistence remains explicit, global plaintext, and not project-scoped;
load --persist now requires --only. Prefer per-command run instead.
run --only filters the file, not inherited parent variables, and does
not prevent child output or argument disclosure. Redaction is not a guarantee.
Skills: nopeek — per-command credentials, migration, and limitations
Regression checks (synthetic credentials only):
python3 -m unittest discover -s plugins/nopeek/tests -v
claude plugin validate plugins/nopeek
See the cross-agent assessment for source-backed comparisons and the tested delivery boundary.
Ecosystem
Related projects for Claude Code power users. For portable skills across compatible agents, use spences10/skills.
| Project | What it does |
|---|---|
| nopeek | Per-command credential loading that reduces accidental disclosure |
| svelte-skills-kit | Production-ready Svelte 5 & SvelteKit skills (90%+ verified accuracy) |
| claude-skills-cli | Create skills with progressive disclosure validation and 84% activation hooks |
| mcpick | Manage MCP servers, plugins, cache, and profiles from the CLI |
| ccrecall | Sync Claude Code transcripts to SQLite for usage analytics and search |
Local Development
git clone git@github.com:spences10/claude-code-toolkit.git ~/repos/claude-code-toolkit
# Add local marketplace
/plugin marketplace add ~/repos/claude-code-toolkit
# Install plugin
/plugin install mcp-essentials
Releasing Updates
Version lives in one place: .claude-plugin/marketplace.json. Bump all
"version" values there, commit, and push. Users with auto-update get
changes on startup. Others run /plugin update plugin-name@spences10-claude-code-toolkit.
Details
- Marketplace
- spences10/claude-code-toolkit
- Source
- plugins/analytics
- Author
- Scott Spence
- Category
- Analytics
- License
- MIT
- Keywords
- analytics, tokens, sessions
- Listed since
- Apr 7, 2026
More from spences10/claude-code-toolkit
All 8Similar to analytics
More Developer Tools
ccam-analyticsPluginhoangsonww/Claude-Code-Agent-Monitor1.2K starsDeep analytics and monitoring for Claude Code sessions — cost tracking, token usage breakdowns, usage trends, and productivity scoring powered by Agent Monitor.
session-reportSkillanthropics/claude-plugins-official4.6K installsGenerates an explorable HTML usage report from local Claude Code session transcripts, with anomaly callouts.
ccam-insightsPluginhoangsonww/Claude-Code-Agent-Monitor1.2K starsAI-powered insights for Claude Code — pattern detection, anomaly alerting, optimization recommendations, and session comparison using Agent Monitor analytics.
fullstoryPluginanthropics/claude-plugins-official47.9K starsConnect Claude to Fullstory to query behavioral analytics, session replays, and customer experience insights.
claude-telemetry-hooksPluginfcakyon/claude-codex-settings1.2K starsTrack Claude Code usage, rejections, and session stats in one dashboard.