Roll up Claude Code sessions by working directory (project) from Agent Monitor data — session count, total cost, total tokens, and last-active timestamp per cwd — so per-project activity can be…

MITAuto-check passed

Install Cwd Rollup

skills CLI
$ npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cwd-rollup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hoangsonww/Claude-Code-Agent-Monitor cwd-rollup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hoangsonww/Claude-Code-Agent-Monitor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ccam-sessions/skills/cwd-rollup .claude/skills/cwd-rollup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cwd-rollup
GitHub stars
1.1k
Token cost
~648 tokens
SKILL.md length
305 words
Files
2
Skills in repo
78
Repo updated
First seen
Licence
MIT

At a glance

Roll up Claude Code sessions by working directory (project) from Agent Monitor data — session count, total cost, total tokens, and last-active timestamp per cwd — so per-project activity can be…

  • Works in 5 steps: Key set → Pull sessions → Aggregate per cwd → …
  • Summarizing where effort and spend went across projects
  • SKILL.md covers Input, Data Sources, Report Sections and Output
  • Calls npm

What it does

Cwd Rollup is an agent skill from hoangsonww/Claude-Code-Agent-Monitor. Roll up Claude Code sessions by working directory (project) from Agent Monitor data — session count, total cost, total tokens, and last-active timestamp per cwd — so per-project activity can be compared at a glance. Use when summarizing where effort and spend went across projects.

Its SKILL.md is about 650 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

The repository describes itself as: 🚀 A real-time monitoring dashboard for Claude Code & Codex, built with SQLite3, Node.js, Express, React, Vite, TailwindCSS, & WebSockets. It tracks sessions, agent activity… The licence is MIT.

When your agent uses it

  • Summarizing where effort and spend went across projects

Example prompts

  • “/cwd-rollup”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Key set
  2. Pull sessions
  3. Aggregate per cwd
  4. Share of fleet
  5. Ranking

What it can do on your machine

Read from SKILL.md and the folder at commit a06db03. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cwd Rollup loads about 648 tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 305 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~648

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hoangsonww/Claude-Code-Agent-Monitor at commit a06db03, republished under its MIT licence (© hoangsonww). 305 words, ~648 tokens.

Download SKILL.mdSave it as .claude/skills/cwd-rollup/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
cwd-rollup
description
Roll up Claude Code sessions by working directory (project) from Agent Monitor data — session count, total cost, total tokens, and last-active timestamp per cwd — so per-project activity can be compared at a glance. Use when summarizing where effort and spend went across projects.

CWD Rollup

Aggregate session activity per working directory (project).

Input

The user provides: $ARGUMENTS

  • Empty → roll up all working directories.
  • A path / project substring → restrict the rollup to matching cwds.
  • top N → keep only the N highest-cost (or highest-count) projects.

Data Sources

EndpointReturns
GET /api/run/cwdsthe distinct working directories that have sessions — the rollup key set
GET /api/sessions?limit=Nsession list: id, status, model, cwd, started_at, ended_at, cost, metadata (usage_extras with token counts)
GET /api/pricing/costfleet cost: total_cost, breakdown[{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] — for the fleet total to compute each cwd's share

Report Sections

1. Key set

GET /api/run/cwds for the canonical list of working directories. Apply the $ARGUMENTS filter (substring match) if one was given.

2. Pull sessions

GET /api/sessions?limit=1000. Bucket sessions by cwd.

3. Aggregate per cwd

For each working directory compute:

  • sessions — count.
  • cost — sum of the inline cost field across the bucket.
  • tokens — sum of input / output / cache-read / cache-write from each session's metadata usage_extras (sum the four into a total, and keep input + output as the "billable text" subtotal).
  • last active — the max started_at (or ended_at) in the bucket.
  • models — the distinct models seen.
4. Share of fleet

GET /api/pricing/cost for total_cost; show each cwd's cost as a percentage of the fleet total.

5. Ranking

Sort by cost descending by default (or count if the user asked); apply top N.

Output

Markdown table: project (cwd basename) | sessions | total tokens | cost | % of fleet | last active | models. Currency as USD to 4 decimal places; token counts with thousands separators; sort cost-descending. Add a final TOTAL row summing the columns. Only count tokens that the session metadata actually carries — if usage_extras is absent for a session, note it as excluded rather than guessing. If the dashboard is unreachable, tell the user to start it with npm start from the repo root.

© hoangsonww, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in plugins/ccam-sessions/skills/cwd-rollup of hoangsonww/Claude-Code-Agent-Monitor.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit a06db03

Compare with similar skills

Cwd Rollup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cwd Rollup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cwd Rollup this skillhoangsonww/Claude-Code-Agent-Monitor1.1k—~648Automated safety check: PassMIT
Session Handoffsickn33/agentic-awesome-skills47k—~1.8kAutomated safety check: NotesMIT
Sessionanthropics/claude-for-legal9.6k3 repos~478Automated safety check: PassApache-2.0
Session History Searchslopus/happy24k—~3.1kAutomated safety check: PassMIT
Session Handoffdavila7/claude-code-templates33k2 repos~1.6kAutomated safety check: PassMIT
Read Sessionasgeirtj/system_prompts_leaks69k—~2.4kAutomated safety check: PassCC0-1.0

Similar skills

  • Session Handoff

    sickn33/agentic-awesome-skills

    A skill your agent uses when context approaches capacity, before /clear or /compact, when switching tasks, or when ending a coding session: produces a structured handoff artifact for the next session.

    47k GitHub stars~1.8k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check: notes
  • Session

    anthropics/claude-for-legal

    Official

    Run a focused N-question study session on a subject — MBE, essay, or flashcards.

    9.6k GitHub starsUsed in 3 repos~478 tokens
    EducationAuto-check passed
  • Searches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs.

    24k GitHub stars~3.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Session Handoff

    davila7/claude-code-templates

    Creates comprehensive handoff documents for seamless AI agent session transfers.

    33k GitHub starsUsed in 2 repos~1.6k tokens
    Agent WorkflowsAuto-check passed
  • Read Session

    asgeirtj/system_prompts_leaks

    Locate and read Muse Code's OWN session logs — the current session or a prior one.

    69k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Coding Agent Session Finder

    code-yeongyu/oh-my-openagent

    Finds, reads and reconstructs past coding-agent sessions across Codex, Claude, OpenCode, Senpi and many other local agent logs.

    70k GitHub stars~2.8k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from hoangsonww/Claude-Code-Agent-Monitor

All 78 skills in this repo
  • Version Release

    hoangsonww/Claude-Code-Agent-Monitor

    Choose and apply the correct semantic version bump for this repository.

    1.1k GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Budget Set

    hoangsonww/Claude-Code-Agent-Monitor

    Define a spend budget for Claude Code and, optionally, create a cost alert rule that fires when usage crosses the limit, via POST /api/alerts/rules on the Agent Monitor dashboard.

    1.1k GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Cache Efficiency

    hoangsonww/Claude-Code-Agent-Monitor

    Analyze prompt-cache effectiveness for Claude Code usage from the Agent Monitor dashboard — cache hit rate (totalcacheread / (totalcacheread + totalinput)), cachewrite vs cacheread reuse, cache-read…

    1.1k GitHub stars~966 tokensUpdated yesterday
    Auto-check passed
  • Cost Breakdown

    hoangsonww/Claude-Code-Agent-Monitor

    Break down Claude Code costs using the Agent Monitor pricing engine.

    1.1k GitHub stars~845 tokensUpdated yesterday
    Auto-check passed
  • Dag Map

    hoangsonww/Claude-Code-Agent-Monitor

    Render the multi-agent orchestration DAG for a session — parent→child subagent edges, tree depth, and fan-out — from the Agent Monitor workflow intelligence API.

    1.1k GitHub stars~564 tokensUpdated yesterday
    Auto-check passed
  • Dashboard Status

    hoangsonww/Claude-Code-Agent-Monitor

    Quick dashboard health and status overview — checks the Agent Monitor API (port 4820), reports session/agent/event counts from /api/stats, confirms WebSocket connectivity, reads the redacted hook…

    1.1k GitHub stars~600 tokensUpdated yesterday
    Auto-check passed

Questions about Cwd Rollup

What does Cwd Rollup do?

Roll up Claude Code sessions by working directory (project) from Agent Monitor data — session count, total cost, total tokens, and last-active timestamp per cwd — so per-project activity can be…. Cwd Rollup is an agent skill from hoangsonww/Claude-Code-Agent-Monitor. Roll up Claude Code sessions by working directory (project) from Agent Monitor data — session count, total cost, total tokens, and last-active timestamp per cwd — so per-project activity can be compared at a glance.

When should I use Cwd Rollup?

Cwd Rollup fits situations like: summarizing where effort and spend went across projects.

How do I install Cwd Rollup in Claude Code?

Run `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cwd-rollup -a claude-code`. Or copy the skill folder (plugins/ccam-sessions/skills/cwd-rollup in hoangsonww/Claude-Code-Agent-Monitor) into .claude/skills/cwd-rollup in your project. Claude Code loads it when a task matches its description.

How do I install Cwd Rollup in Codex?

Run `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cwd-rollup -a codex`. Or copy the skill folder (plugins/ccam-sessions/skills/cwd-rollup in hoangsonww/Claude-Code-Agent-Monitor) into .agents/skills/cwd-rollup in your project. Codex loads it when a task matches its description.

Can I use Cwd Rollup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cwd-rollup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cwd-rollup, .gemini/skills/cwd-rollup, .github/skills/cwd-rollup and .opencode/skills/cwd-rollup in your project.

What does Cwd Rollup need to run?

Going by SKILL.md and its folder, Cwd Rollup needs the command-line tools its instructions call (npm).

Does Cwd Rollup access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Cwd Rollup safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cwd Rollup use?

Cwd Rollup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cwd Rollup use?

About 648 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cwd Rollup?

Skills that share tags, products or a category with Cwd Rollup: Session Handoff (sickn33/agentic-awesome-skills, 47k stars), Session (anthropics/claude-for-legal, 9.6k stars), Session History Search (slopus/happy, 24k stars) and Session Handoff (davila7/claude-code-templates, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cwd Rollup?

hoangsonww (a GitHub user) maintains it in hoangsonww/Claude-Code-Agent-Monitor, which has 1,058 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 10, 2026.

Source: hoangsonww/Claude-Code-Agent-Monitor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.