cwd-rollup

cwd-rollup is a skill for Claude Code, Codex from hoangsonww/Claude-Code-Agent-Monitor. It costs 59 tokens per session (648 once invoked), scanned A, original, MIT.

A report that groups Claude Code sessions by their working directory, which is the project folder where each session ran. It totals session count, cost, token use, and last activity for each project.

In plain words
What is it for?
Use it to compare project activity, filter by a project name or path, and list the highest-cost or most active projects.
Why use it?
It shows where coding-agent time and spending went across projects instead of leaving that information scattered across individual sessions.

Skill for Claude CodeCodex

Written for Claude Code and Codex: $ARGUMENTS substitution, but also agents/openai.yaml present. Also seen: mentions Claude Code.

Part of the ccam-sessions plugin — 5 skills, 3 commands, 1 agent shipped together

Good fit Use it to compare project activity, filter by a project name or path, and list the highest-cost or most active projects.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoangsonww/claude-code-agent-monitor/cwd-rollup
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 hoangsonww/Claude-Code-Agent-Monitor --skill cwd-rollup
Clone the repo
git clone --depth 1 https://github.com/hoangsonww/Claude-Code-Agent-Monitor

Made for: Claude Code, Codex.

Or install ccam-sessions, the plugin that ships this one along with the rest of its 5 skills, 3 commands, 1 agent.

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 cwd-rollup

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangsonww/claude-code-agent-monitor/cwd-rollup/github.svg)](https://agentmods.dev/skills/hoangsonww/claude-code-agent-monitor/cwd-rollup)
Your own site
<a href="https://agentmods.dev/skills/hoangsonww/claude-code-agent-monitor/cwd-rollup"><img src="https://agentmods.dev/badge/skills/hoangsonww/claude-code-agent-monitor/cwd-rollup/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 cwd-rollup

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoangsonww/claude-code-agent-monitor/cwd-rollup"><img src="https://agentmods.dev/badge/skills/hoangsonww/claude-code-agent-monitor/cwd-rollup.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 648 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00648
Opus 5 $0.00030 $0.00324
Sonnet 5 $0.00012 $0.00130
Haiku 4.5 $0.00006 $0.00065

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

Security

Grade A, and why

cwd-rollup 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 9d 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.

plugins/ccam-sessions/skills/cwd-rollup/SKILL.md · 64 lines

How it starts

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

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

Endpoint Returns
GET /api/run/cwds the distinct working directories that have sessions — the rollup key set
GET /api/sessions?limit=N session list: id, status, model, cwd, started_at, ended_at, cost, metadata (usage_extras with token counts)
GET /api/pricing/cost fleet 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.

Read the full file on GitHub · 64 lines

Files

What ships with it

1 file 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. 9d ago First seen · 64 lines · 59 tokens per session scan A 68b5f0c7a319

Subscribe to this mod's changes

cwd-rollup is a skill published in the GitHub repository hoangsonww/Claude-Code-Agent-Monitor (991 stars, last pushed 3d ago), licensed MIT. It adds 59 tokens to every session and 648 once invoked, about $0.0003 per session on Opus 5. 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-09-03.

Related

Other skills, from other repositories

git-flow

Use when committing, branching, opening PRs, or deciding merge/branch strategy.

fusengine/agents · 20 tokens

radin-execute

Work through a project's whole backlog: prioritize every task, execute each via a sub-agent, commit after each. Use when the user wants the entire backlog processed ("work through my backlog"), not one named task. Delegates all implementation to sub-agents; clarifies ambiguity by asking the user rather than guessing.

shortcuts/radin · 71 tokens

radin-record

Log feedback, bugs, follow-ups, or ideas raised mid-session as structured backlog entries, so they survive past the conversation. Use for /radin-record, "log this to the backlog", "add as follow-up/bug/idea", "record what we just found", "note this for later", "add findings to backlog". Triggers even on vague asks…

shortcuts/radin · 99 tokens

radin-show

Print the current project's backlog to the terminal. Use for /radin-show, "show me the backlog", "what's in the backlog", "list backlog items", "print the backlog".

shortcuts/radin · 44 tokens

managing-product

Extracts product requirements and produces a PRD. Use when a user wants to build software and needs to define what to build before architecture or implementation, when scoping an MVP, or when translating a vague idea into a buildable specification.

isvlasov/rageatc-oss · 52 tokens

orchestrating-work

Principles for multi-agent workflow execution. Use when coordinating agents, accepting or rejecting agent work, executing producer-critic cycles, or running any multi-phase orchestrated task.

isvlasov/rageatc-oss · 39 tokens