cc-analytics — how to use cc-analytics how to use cc-analytics, cc-analytics setup guide, cc-analytics alternative, cc-analytics vs claude code, what is cc-analytics, cc-analytics install, cc-analytics report generation, claude code analytics, git data analytics

v1.0.0
GitHub

About this Skill

Perfect for Python Analysis Agents needing advanced Claude Code usage analytics and HTML report generation capabilities. cc-analytics is a skill that generates HTML reports of Claude Code usage, providing summary stats and project tables with remote links

Features

Generates single HTML file with terminal aesthetic
Utilizes ~/.claude/history.jsonl for prompt and project data
Leverages Git data for remote URLs and commit counts
Creates ASCII art header and bar chart for visualization
Runs via Python script for report generation

# Core Topics

serejaris serejaris
[0]
[0]
Updated: 3/10/2026

Quality Score

Top 5%
51
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
> npx killer-skills add serejaris/ris-claude-code/cc-analytics
Supports 18+ Platforms
Cursor
Windsurf
VS Code
Trae
Claude
OpenClaw
+12 more

Agent Capability Analysis

The cc-analytics MCP Server by serejaris is an open-source Community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use cc-analytics, cc-analytics setup guide, cc-analytics alternative.

Ideal Agent Persona

Perfect for Python Analysis Agents needing advanced Claude Code usage analytics and HTML report generation capabilities.

Core Value

Empowers agents to generate comprehensive HTML reports of Claude Code usage from ~/.claude/history.jsonl, utilizing Git data for enhanced analytics and providing insights through ASCII art headers, summary stats, and project tables with remote links.

Capabilities Granted for cc-analytics MCP Server

Generating HTML reports of Claude Code usage
Analyzing project insights with Git data integration
Visualizing ASCII bar charts for commit counts

! Prerequisites & Limits

  • Requires access to ~/.claude/history.jsonl
  • Python script execution needed
  • Git data availability required for enhanced analytics
Project
SKILL.md
6.5 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Claude Code Analytics

Generate HTML report of Claude Code usage from ~/.claude/history.jsonl.

Data Sources

  • History: ~/.claude/history.jsonl — prompts with timestamps and project paths
  • Git: Remote URLs and commit counts per project

Output

Single HTML file with terminal aesthetic:

  • ASCII art header
  • Summary stats (projects, prompts, commits, days)
  • Project table with remote links
  • ASCII bar chart

Generation Script

Run this Python script to generate the report:

python
1import json 2import os 3import subprocess 4from datetime import datetime, timedelta 5from collections import defaultdict 6 7def get_git_info(path): 8 if not os.path.isdir(path) or not os.path.exists(os.path.join(path, '.git')): 9 return None, 0 10 try: 11 result = subprocess.run(['git', '-C', path, 'remote', 'get-url', 'origin'], 12 capture_output=True, text=True, timeout=5) 13 remote = result.stdout.strip() if result.returncode == 0 else None 14 if remote: 15 remote = remote.replace('git@github.com:', 'github.com/').replace('.git', '').replace('https://', '') 16 17 week_ago = (datetime.now() - timedelta(days=7)).strftime('%Y-%m-%d') 18 result = subprocess.run(['git', '-C', path, 'rev-list', '--count', f'--since={week_ago}', 'HEAD'], 19 capture_output=True, text=True, timeout=5) 20 commits = int(result.stdout.strip()) if result.returncode == 0 else 0 21 return remote, commits 22 except: 23 return None, 0 24 25# Parse history 26history = [] 27with open(os.path.expanduser('~/.claude/history.jsonl'), 'r') as f: 28 for line in f: 29 try: 30 history.append(json.loads(line)) 31 except: 32 pass 33 34# Filter last N days (default 7) 35days = 7 36now = datetime.now() 37cutoff = (now - timedelta(days=days)).timestamp() * 1000 38 39projects = defaultdict(lambda: {'prompts': [], 'sessions': set()}) 40for entry in history: 41 ts = entry.get('timestamp', 0) 42 if ts >= cutoff: 43 project = entry.get('project', 'unknown') 44 projects[project]['prompts'].append(entry) 45 projects[project]['sessions'].add(datetime.fromtimestamp(ts/1000).strftime('%Y-%m-%d')) 46 47# Collect data 48results = [] 49total_commits = 0 50for project, data in projects.items(): 51 remote, commits = get_git_info(project) 52 total_commits += commits 53 results.append({ 54 'name': os.path.basename(project) or project.replace('/Users/ris/', '~/'), 55 'folder': project.replace('/Users/ris/', '~/'), 56 'remote': remote, 57 'prompts': len(data['prompts']), 58 'sessions': len(data['sessions']), 59 'commits': commits 60 }) 61 62results.sort(key=lambda x: -x['prompts']) 63max_prompts = results[0]['prompts'] if results else 1

HTML Template

Use terminal aesthetic with:

  • Monospace system fonts: 'SF Mono', 'Monaco', 'Inconsolata', monospace
  • Dark background: #0d0d0d
  • Muted colors: #b0b0b0 (text), #555 (dim), #4ec9b0 (cyan), #ce9178 (orange)
  • ASCII box-drawing for header
  • $ command --flags style section headers
  • ASCII bar chart using characters
html
1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <meta charset="UTF-8"> 5 <title>claude-analytics</title> 6 <style> 7 body { 8 font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace; 9 background: #0d0d0d; 10 color: #b0b0b0; 11 font-size: 14px; 12 line-height: 1.6; 13 padding: 24px; 14 } 15 .container { max-width: 900px; margin: 0 auto; } 16 .header { color: #6a9955; margin-bottom: 24px; } 17 .dim { color: #555; } 18 .bright { color: #e0e0e0; } 19 .cyan { color: #4ec9b0; } 20 .orange { color: #ce9178; } 21 .row { 22 display: grid; 23 grid-template-columns: 24px 200px 1fr 80px 80px 60px; 24 gap: 8px; 25 padding: 6px 0; 26 border-bottom: 1px solid #1a1a1a; 27 } 28 .row:hover { background: #141414; } 29 a { color: #555; text-decoration: none; } 30 a:hover { color: #888; } 31 .stat-box { display: inline-block; margin-right: 32px; } 32 .stat-value { font-size: 28px; color: #e0e0e0; } 33 .stat-label { color: #555; font-size: 12px; } 34 </style> 35</head> 36<body> 37 <div class="container"> 38 <pre class="header"> 39┌─────────────────────────────────────────────────────────────────┐ 40│ ██████╗██╗ █████╗ ██╗ ██╗██████╗ ███████╗ │ 41│ ██╔════╝██║ ██╔══██╗██║ ██║██╔══██╗██╔════╝ │ 42│ ██║ ██║ ███████║██║ ██║██║ ██║█████╗ │ 43│ ██║ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝ │ 44│ ╚██████╗███████╗██║ ██║╚██████╔╝██████╔╝███████╗ │ 45│ ╚═════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ │ 46│ Weekly Analytics Report │ 47│ {start_date} .. {end_date} │ 48└─────────────────────────────────────────────────────────────────┘ 49</pre> 50 <!-- Stats, table, chart sections --> 51 </div> 52</body> 53</html>

Bar Chart Generation

python
1def make_bar(value, max_val, width=40): 2 filled = int((value / max_val) * width) 3 return '█' * filled 4 5# Example output: 6# cohorts ████████████████████████████████████████ 194 7# ai-whisper █████████████████████████████████████▋ 183

Usage

  1. User asks for analytics: "покажи статистику cc", "weekly report", "что делал за неделю"
  2. Run Python script to collect data
  3. Generate HTML with template
  4. Save to ~/claude-analytics.html
  5. Open in browser: open ~/claude-analytics.html

Customization

  • Period: Change days = 7 to desired range
  • Output path: Change save location
  • Colors: Adjust CSS variables
  • Columns: Add/remove metrics in grid

Related Skills

Looking for an alternative to cc-analytics or building a Community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

testing

Logo of lobehub
lobehub

Testing is a process for verifying AI agent functionality using commands like bunx vitest run and optimizing workflows with targeted test runs.

73.3k
0
Communication

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication