cc-analytics

cc-analytics is a skill for Claude Code from serejaris/personal-corp-os. It costs 59 tokens per session (1,702 once invoked), scanned A, original, MIT.

A report generator for Claude Code activity. It reads Claude Code's local history, project Git information, and recent commit counts, then creates one HTML usage report.

In plain words
What is it for?
Use it to create weekly usage summaries, review project activity, count prompts and commits, and link projects to their Git remotes.
Why use it?
It turns scattered prompts and repository activity into a single view of recent work. This makes it easier to review which projects were active and what work was completed.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the personal-corp-os plugin — 33 skills shipped together

Good fit Use it to create weekly usage summaries, review project activity, count prompts and commits, and link projects to their Git remotes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/serejaris/personal-corp-os/cc-analytics
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add serejaris/personal-corp-os --skill cc-analytics
Clone the repo
git clone --depth 1 https://github.com/serejaris/personal-corp-os

Made for: Claude Code.

Or install personal-corp-os, the plugin that ships this one along with the rest of its 33 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cc-analytics

README.md
[![agentmods](https://agentmods.dev/badge/skills/serejaris/personal-corp-os/cc-analytics/github.svg)](https://agentmods.dev/skills/serejaris/personal-corp-os/cc-analytics)
Your own site
<a href="https://agentmods.dev/skills/serejaris/personal-corp-os/cc-analytics"><img src="https://agentmods.dev/badge/skills/serejaris/personal-corp-os/cc-analytics/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cc-analytics

Your own site · 80×15
<a href="https://agentmods.dev/skills/serejaris/personal-corp-os/cc-analytics"><img src="https://agentmods.dev/badge/skills/serejaris/personal-corp-os/cc-analytics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,702 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.01702
Opus 5 $0.00030 $0.00851
Sonnet 5 $0.00012 $0.00340
Haiku 4.5 $0.00006 $0.00170

Measured 10d ago against content hash 800526029152, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

cc-analytics scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(['git', '-C', path, 'remote', 'get-url', 'origin'],
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/cc-analytics/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

import json
import os
import subprocess
from datetime import datetime, timedelta
from collections import defaultdict

def get_git_info(path):
    if not os.path.isdir(path) or not os.path.exists(os.path.join(path, '.git')):
        return None, 0
    try:
        result = subprocess.run(['git', '-C', path, 'remote', 'get-url', 'origin'],
                                capture_output=True, text=True, timeout=5)
        remote = result.stdout.strip() if result.returncode == 0 else None
        if remote:
            remote = remote.replace('[email protected]:', 'github.com/').replace('.git', '').replace('https://', '')

        week_ago = (datetime.now() - timedelta(days=7)).strftime('%Y-%m-%d')
        result = subprocess.run(['git', '-C', path, 'rev-list', '--count', f'--since={week_ago}', 'HEAD'],
                                capture_output=True, text=True, timeout=5)
        commits = int(result.stdout.strip()) if result.returncode == 0 else 0
        return remote, commits
    except:
        return None, 0

# Parse history
history = []
with open(os.path.expanduser('~/.claude/history.jsonl'), 'r') as f:
    for line in f:
        try:
            history.append(json.loads(line))
        except:
            pass

# Filter last N days (default 7)
days = 7
now = datetime.now()
cutoff = (now - timedelta(days=days)).timestamp() * 1000

projects = defaultdict(lambda: {'prompts': [], 'sessions': set()})
for entry in history:
    ts = entry.get('timestamp', 0)
    if ts >= cutoff:
        project = entry.get('project', 'unknown')
        projects[project]['prompts'].append(entry)
        projects[project]['sessions'].add(datetime.fromtimestamp(ts/1000).strftime('%Y-%m-%d'))

# Collect data
results = []
total_commits = 0
for project, data in projects.items():
    remote, commits = get_git_info(project)
    total_commits += commits
    results.append({
        'name': os.path.basename(project) or project.replace('/Users/ris/', '~/'),
        'folder': project.replace('/Users/ris/', '~/'),
        'remote': remote,
        'prompts': len(data['prompts']),
        'sessions': len(data['sessions']),
        'commits': commits
    })

results.sort(key=lambda x: -x['prompts'])
max_prompts = results[0]['prompts'] if results else 1

Read the full file on GitHub · 185 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 185 lines · 59 tokens per session scan A 800526029152

Subscribe to this mod's changes

cc-analytics is a skill published in the GitHub repository serejaris/personal-corp-os (225 stars, last pushed 14d ago), licensed MIT. It adds 59 tokens to every session and 1,702 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

concept-to-video

Turn concepts into animated explainer videos using Manim (Python) with MP4/GIF output, audio overlay, multi-scene composition. Triggers on: "create a video", "animate this", "make an explainer", "manim animation", "motion graphic". NOT for React video, use remotion-video.

Mathews-Tom/armory · 70 tokens

manuscript-provenance

Computational provenance audit verifying every number, table, and figure in a manuscript derives from code, not manual entry. Triggers on: "check provenance", "verify reproducibility", "audit my pipeline", "are my numbers from code", "provenance audit". Companion to manuscript-review (prose audit).

Mathews-Tom/armory · 70 tokens

manuscript-review

Pre-publication manuscript audit producing a section-level refactoring report with citation hygiene and submission-readiness checks. Triggers on: "review my paper", "check before submission", "is this ready to submit", "pre-pub checklist", "refactor my paper", "check my references", "does the abstract work".

Mathews-Tom/armory · 70 tokens

figure-rhetoric

Evaluate whether figures and plots in a manuscript effectively communicate the claims they support. Audits chart-type fit, axis design, visual hierarchy, data density, caption interpretation, perceptual accuracy, and narrative arc across 8 dimensions. Triggers on: "do my figures work", "check my plots", "are my graphs…

Mathews-Tom/armory · 123 tokens

humanize

Detects and removes AI-generated writing patterns while preserving meaning and facts. Triggers on: "humanize text", "make this sound human", "remove AI patterns", "rewrite to sound natural", "make this less AI", "de-slop this", "not sound like ChatGPT", "human pass".

Mathews-Tom/armory · 66 tokens

notebooklm

Full NotebookLM API via notebooklm-py CLI: create notebooks, add sources, generate podcasts, videos, infographics, slides, quizzes, flashcards, mind maps. Triggers on: "notebooklm", "create a podcast", "audio overview", "generate flashcards", "generate infographic", "/notebooklm".

Mathews-Tom/armory · 71 tokens