agentsclimarketplace

Session search

Skill hoangsonww/Claude-Code-Agent-Monitor/plugins/ccam-sessions/skills/session-search

πŸš€ A real-time monitoring dashboard for Claude Code, built with SQLite3, Node.js, Express, React, Vite, TailwindCSS, and WebSockets. It tracks sessions, agent activity, tool usage, and subagent orchestration, providing live analytics, a Kanban status board, status notifications, a cute buddy, and an interactive web UI/MacOS/Windows native app.

Install
npx -y skills add hoangsonww/Claude-Code-Agent-Monitor --skill session-search

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Find Claude Code sessions tracked by the Agent Monitor by project (cwd), model, status, or date, then rank the matches by cost or recency. Pulls the session list and the distinct cwd / facet values so filters use real values rather than guesses. Use when locating a session β€” "find my EstateWise sessions", "which Opus runs errored this week", "most expensive sessions in /repo".

SKILL.md

2.8 KB, 612 tokens by cl100k_base, as published. Nobody here has run it

Session Search

Locate Claude Code sessions in the Agent Monitor by project, model, status, or date.

Input

The user provides: $ARGUMENTS

A free-form query naming any combination of:

  • project / cwd β€” a working-directory path or basename (e.g. EstateWise, /Users/.../repo)
  • model β€” opus, sonnet, haiku, or a full model id substring
  • status β€” active, working, completed, error
  • date β€” today, this week, or an ISO date / range matched against started_at
  • ranking β€” by cost (default when cost is mentioned) or recent (default otherwise)

If the query is empty, return the most recent sessions ranked by recency.

Data Sources

EndpointReturns
GET /api/sessions?limit=Nsession list: id, status, model, cwd, started_at, ended_at, cost, metadata (thinking_blocks, turn_count, total_turn_duration_ms, usage_extras)
GET /api/run/cwdsthe distinct working directories that have sessions β€” use to resolve a fuzzy project name to exact cwd values
GET /api/events/facetsdistinct facet values (event types, tool names, models, statuses) for validating filters

Report Sections

1. Resolve filters

Fetch /api/run/cwds and /api/events/facets to map the user's loose terms to real values: pick the cwd(s) whose path contains the project term, confirm the model substring exists, and validate the status against known statuses. State which concrete filters you settled on.

2. Pull candidates

GET /api/sessions?limit=200 (raise the limit if the date window is wide). Filter in-memory by cwd, model (substring, case-insensitive), status, and started_at date window.

3. Rank

Sort by cost descending when the user asked "by cost"; otherwise by started_at descending (most recent first). Keep the top 20 unless the user asked for more.

4. Matches

One row per session.

5. Summary

Count of matches, summed cost across matches, and the model / status distribution.

Output

Markdown table: # | id (short) | status | model | cwd (basename) | started_at | cost. Currency as USD to 4 decimal places; token / count fields with thousands separators. If a filter resolved to zero rows, say so and show the closest available values (e.g. the cwds that do exist) rather than fabricating results. If the dashboard is unreachable, tell the user to start it with npm start from the repo root.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.