mcpbeat Sign in

Cwd Rollup Skill for Claude

> 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.

650 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
867
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/hoangsonww/Claude-Code-Agent-Monitor --skill cwd-rollup

The instruction itself

10 sections, as written by the author

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.

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ×10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Skill Creator
by vercel-labs
vendor ×10

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

12k tokens scripts
Skill Creator
by JayZeeDesign
×9

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

10k tokens scripts
Template Skill
by JayZeeDesign
×7

Replace with description of the skill and when Claude should use it.

35 tokens
Dispatching Parallel Agents
by ZhanlinCui
×5

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

2k tokens
Skill Development
by anthropics
vendor ×4

This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.

9k tokens
Find Skills
by sanity-io
vendor ×4

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

1k tokens
Writing Skills
by ZhanlinCui
×4

Use when creating new skills, editing existing skills, or verifying skills work before deployment

26k tokens scripts

How to use it

Copy the folder

Take hoangsonww/cwd-rollup from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.