cc-analytics — community cc-analytics, ris-claude-code, community, ide skills, Claude Code, Cursor, Windsurf

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 AIエージェント是一种代码分析和优化工具,帮助开发者提高代码质量和性能

serejaris serejaris
[0]
[0]
Updated: 2/24/2026

Agent Capability Analysis

The cc-analytics skill by serejaris is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

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

Core Value

Empowers agents to parse `~/.claude/history.jsonl` files, leveraging Git data to generate comprehensive HTML reports with ASCII art headers, summary statistics, and bar charts, utilizing Python scripting for automation.

Capabilities Granted for cc-analytics

Generating HTML reports of Claude Code usage for project analysis
Analyzing commit counts and project activity from Git data
Creating visualizations of Claude Code usage patterns with ASCII bar charts

! Prerequisites & Limits

  • Requires access to `~/.claude/history.jsonl` files
  • Needs Git data for remote URLs and commit counts
  • Python scripting environment required for report generation
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

cc-analytics

Install cc-analytics, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

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

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is cc-analytics?

Perfect for Python Analysis Agents needing advanced Claude Code usage analytics and HTML report generation capabilities. cc-analytics AIエージェント是一种代码分析和优化工具,帮助开发者提高代码质量和性能

How do I install cc-analytics?

Run the command: npx killer-skills add serejaris/ris-claude-code. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for cc-analytics?

Key use cases include: Generating HTML reports of Claude Code usage for project analysis, Analyzing commit counts and project activity from Git data, Creating visualizations of Claude Code usage patterns with ASCII bar charts.

Which IDEs are compatible with cc-analytics?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for cc-analytics?

Requires access to `~/.claude/history.jsonl` files. Needs Git data for remote URLs and commit counts. Python scripting environment required for report generation.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add serejaris/ris-claude-code. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use cc-analytics immediately in the current project.

Related Skills

Looking for an alternative to cc-analytics or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

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
AI

data-fetching

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
AI