session-report

session-report is a command for Claude Code from tdimino/claude-code-minoan. It costs 0 tokens per session (2,541 once invoked), scanned A, original, MIT.

A command that creates a Markdown dashboard of recent Claude Code sessions, including their Git activity, commits, and tracked repositories.

In plain words
What is it for?
Use it to review activity from the last day, a custom number of hours or days, or a selected repository path.
Why use it?
It gives a quick view of recent coding work without opening each session individually.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions Claude Code.

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.

agentmods
npx agentmods add commands/tdimino/claude-code-minoan/session-report
Clone the repo
git clone --depth 1 https://github.com/tdimino/claude-code-minoan

Made for: Claude Code.

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 session-report

README.md
[![agentmods](https://agentmods.dev/badge/commands/tdimino/claude-code-minoan/session-report.svg)](https://agentmods.dev/commands/tdimino/claude-code-minoan/session-report)
Your own site
<a href="https://agentmods.dev/commands/tdimino/claude-code-minoan/session-report"><img src="https://agentmods.dev/badge/commands/tdimino/claude-code-minoan/session-report.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,541 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00000 $0.02541
Opus 5 $0.00000 $0.01270
Sonnet 5 $0.00000 $0.00508
Haiku 4.5 $0.00000 $0.00254

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

Security

Grade A, and why

session-report scanned grade A with 0 findings 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/session-report.md · 281 lines

How it starts

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

Session Report

Generate a Markdown dashboard of recent Claude Code sessions with git activity, commits, and repo tracking.

Usage:

  • /session-report - Show last 24 hours
  • /session-report 48h - Show last 48 hours
  • /session-report 7d - Show last 7 days
  • /session-report ~/Desktop/Programming/knossot - Filter by repo path

Arguments

$ARGUMENTS

Instructions

node -e "
const os = require('os');
const path = require('path');
const fs = require('fs');
const utils = require(os.homedir() + '/.claude/lib/tracker-utils.js');

// Parse arguments
const args = '$ARGUMENTS'.trim();
let hours = 24;
let filterRepo = null;

if (args) {
  // Parse time window: 48h, 7d, etc.
  const timeMatch = args.match(/^(\d+)(h|d)$/);
  if (timeMatch) {
    hours = parseInt(timeMatch[1]) * (timeMatch[2] === 'd' ? 24 : 1);
  } else if (args.startsWith('/') || args.startsWith('~') || args.startsWith('.')) {
    // Repo path filter
    filterRepo = args.replace(/^~/, os.homedir());
    filterRepo = path.resolve(filterRepo);
  }
}

const cutoffDate = new Date(Date.now() - hours * 3600000);

// Load data sources
const tracking = utils.loadGitTracking();
const summaryCache = utils.loadSummaryCache();
const allFiles = utils.getAllSessionFiles();
const statusData = utils.buildSessionStatus(allFiles, { maxSessions: 30 });

// If filtering by repo, get relevant session IDs
let repoSessionFilter = null;
if (filterRepo) {
  const repoSessions = utils.getSessionsForRepo(filterRepo);
  if (repoSessions.length > 0) {
    repoSessionFilter = new Set(repoSessions);
  }
}

// Build session report data
const sessions = [];
for (const s of statusData.sessions) {
  // Time filter
  if (s.timestamp && new Date(s.timestamp) < cutoffDate) continue;

  // Repo filter
  if (repoSessionFilter && !repoSessionFilter.has(s.fullId) && !repoSessionFilter.has(s.id)) continue;

  const repos = utils.getReposForSession(s.fullId || s.id);
  const summary = summaryCache[s.fullId] || summaryCache[s.id] || {};

  sessions.push({
    ...s,
    repos,
    summaryData: summary,
  });
}

// Header
const now = new Date().toISOString().replace(/\.\d+Z$/, '');
const windowStr = hours >= 24 ? (hours / 24) + 'd' : hours + 'h';
console.log('# Session Report');
console.log('Generated: ' + now + ' | Window: ' + windowStr);
if (filterRepo) {
  console.log('Filter: ' + filterRepo.replace(os.homedir(), '~'));
}
console.log('');

// Count running vs inactive
const running = sessions.filter(s => s.isRunning).length;
const inactive = sessions.length - running;
const vsCode = sessions.filter(s => s.isInVSCode).length;

if (sessions.length === 0) {
  console.log('_No sessions found in the last ' + windowStr + '._');
  console.log('');
} else {
  console.log('## Sessions (' + running + ' running, ' + inactive + ' inactive' + (vsCode ? ', ' + vsCode + ' in VS Code' : '') + ')');
  console.log('');

  sessions.forEach((s, i) => {
    // Determine project name
    const projectName = s.projectName || path.basename(s.projectPath || s.cwd || '?');

    // Status badges
    const badges = [];
    if (s.isRunning) badges.push('RUNNING');
    if (s.isInVSCode) badges.push('VS Code');
    if (!s.isRunning && !s.isInVSCode) badges.push('INACTIVE');
    const badgeStr = badges.join(', ');

    console.log('### [' + (i + 1) + '] ' + projectName + ' — ' + badgeStr);

    // Session info
    const slug = s.sessionSlug || s.slug || '';
    const shortId = (s.fullId || s.id || '').substring(0, 8);
    if (slug) {
      console.log('- **Session**: ' + slug + ' (\`' + shortId + '\`)');
    } else {
      console.log('- **Session**: \`' + shortId + '\`');
    }

    // Time info
    const age = s.timestamp ? utils.formatAge(s.timestamp) : '?';
    const model = s.summaryData.model || s.model || '';
    const turns = s.summaryData.num_turns || '';
    const cost = s.summaryData.total_cost_usd ? '\$' + s.summaryData.total_cost_usd.toFixed(2) : '';
    const infoParts = ['Started: ' + age];
    if (model) infoParts.push('Model: ' + model);
    if (turns) infoParts.push('Turns: ' + turns);
    if (cost) infoParts.push('Cost: ' + cost);
    console.log('- ' + infoParts.join(' | '));

    // Summary
    const title = s.summaryData.title || s.sessionSummary || '';
    if (title) {
      console.log('- **Summary**: ' + title);
    }

    // Repos touched (from git tracking)
    const repoEntries = Object.entries(s.repos || {});
    if (repoEntries.length > 0) {
      const repoStrs = repoEntries.map(([rpath, rdata]) => {
        const shortPath = rpath.replace(os.homedir(), '~');
        const repoName = path.basename(rpath);
        const branch = (rdata.branches || [])[0] || '';
        const commitCount = (rdata.commits || []).length;
        const ops = rdata.operations || [];
        const isReadOnly = !ops.some(op => ['commit', 'push', 'add', 'merge', 'rebase'].includes(op));

        let desc = repoName;
        if (branch) desc += ' (' + branch + ')';
        if (commitCount > 0) desc += ', ' + commitCount + ' commit' + (commitCount > 1 ? 's' : '');
        else if (isReadOnly) desc += ', read-only';
        return desc;
      });
      console.log('- **Repos**: ' + repoStrs.join(' | '));

      // Show commits
      const allCommits = [];
      for (const [rpath, rdata] of repoEntries) {
        for (const commit of (rdata.commits || [])) {
          allCommits.push({
            ...commit,
            repoName: path.basename(rpath),
          });
        }
      }
      allCommits.sort((a, b) => (b.ts || '').localeCompare(a.ts || ''));

      if (allCommits.length > 0) {
        console.log('- **Commits**:');
        allCommits.slice(0, 5).forEach(c => {
          const commitAge = c.ts ? utils.formatAge(c.ts) : '';
          const msg = c.msg ? c.msg.substring(0, 80) : '';
          console.log('  - \`' + (c.hash || '?').substring(0, 7) + '\` ' + msg + (commitAge ? ' (' + c.repoName + ', ' + commitAge + ')' : ''));
        });
      }
    }

    // Git remote
    const gitRemote = s.gitRemote || '';
    if (gitRemote) {
      console.log('- **Remote**: ' + gitRemote);
    }

    // Resume command
    const fullId = s.fullId || s.id || '';
    if (fullId) {
      console.log('- **Resume**: \`claude --resume ' + fullId + '\`');
    }

    console.log('');
  });
}

// Git Activity Timeline
const events = utils.getRecentGitEvents({ hours, maxEvents: 30 });
if (events.length > 0) {
  console.log('## Git Activity Timeline');
  console.log('');
  console.log('| Time | Repo | Session | Op | Details |');
  console.log('|------|------|---------|----|---------|');

  events.forEach(e => {
    if (e.type === 'result') return; // Skip enrichment lines in timeline
    const time = (e.ts || '').substring(11, 16) || '?';
    const repoName = path.basename(e.repo || '?');
    const shortSid = (e.short || (e.sid || '').substring(0, 8));
    const ops = e.ops || '';
    let details = '';

    // Look for enrichment data
    if (ops.includes('commit') && e.msg) {
      details = e.msg.substring(0, 60);
    } else if (e.cmd) {
      details = e.cmd.substring(0, 60);
    }

    console.log('| ' + time + ' | ' + repoName + ' | \`' + shortSid + '\` | ' + ops + ' | ' + details + ' |');
  });
  console.log('');
}

// Repo Summary
const repoIndex = tracking.repo_index || {};
const repoEntries = Object.entries(repoIndex);
if (repoEntries.length > 0) {
  console.log('## Repo Summary');
  console.log('');
  console.log('| Repo | Branches | Sessions | Commits | Last Activity |');
  console.log('|------|----------|----------|---------|---------------|');

  // Collect repo stats
  const repoStats = [];
  for (const [rpath, sids] of repoEntries) {
    const repoName = path.basename(rpath);
    const branches = new Set();
    let totalCommits = 0;
    let lastActivity = '';

    for (const sid of sids) {
      const session = (tracking.sessions || {})[sid];
      if (!session) continue;
      const repoData = (session.repos || {})[rpath];
      if (!repoData) continue;

      (repoData.branches || []).forEach(b => branches.add(b));
      totalCommits += (repoData.commits || []).length;
      if (repoData.last_seen && repoData.last_seen > lastActivity) {
        lastActivity = repoData.last_seen;
      }
    }

    repoStats.push({ repoName, rpath, branches: [...branches], sessionCount: sids.length, totalCommits, lastActivity });
  }

  // Sort by last activity
  repoStats.sort((a, b) => b.lastActivity.localeCompare(a.lastActivity));

  repoStats.forEach(r => {
    const age = r.lastActivity ? utils.formatAge(r.lastActivity) : '?';
    console.log('| ' + r.repoName + ' | ' + r.branches.join(', ') + ' | ' + r.sessionCount + ' | ' + r.totalCommits + ' | ' + age + ' |');
  });
  console.log('');
}

console.log('---');
console.log('_Run \`/session-report\` to refresh. Resume with \`claude --resume <id>\`._');
"

Read the full file on GitHub · 281 lines

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. 6d ago First seen · 281 lines · 0 tokens per session scan A 45984d127b12

Subscribe to this mod's changes

session-report is a command published in the GitHub repository tdimino/claude-code-minoan (41 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,541 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.