{"items":[{"id":"cmugyng2z03a7qu06nsmdepty","slug":"hoangsonww-claude-code-agent-monitor-config-audit","name":"config-audit","description":"Run a full audit of the user's Claude Code configuration via the Agent Monitor Config Explorer API: counts per surface (user vs project), duplicate or overlapping skills and subagents, hooks that run shell commands, and which surfaces are read-only vs mutable. Reads /api/cc-config/overview, /skills, /agents, /commands, /hooks, and /settings. Use when reviewing your Claude Code setup for sprawl, duplication, or risk.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"config-audit","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Run a full audit of the user's Claude Code configuration via the Agent Monitor Config Explorer API: counts per surface (user vs project), duplicate or overlapping skills and subagents, hooks that run shell commands, and which surfaces are read-only vs mutable. Reads /api/cc-config/overview, /skills, /agents, /commands, /hooks, and /settings. Use when reviewing your Claude Code setup for sprawl, duplication, or risk.","permissions":[],"systemPrompt":"# Config Audit\n\nProduce a complete, data-backed audit of how the user's `~/.claude`\nconfiguration has grown, what overlaps, and what is risky — all read through\nthe Agent Monitor dashboard at `http://localhost:4820`.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be:\n- empty or \"full\" — audit every surface (default).\n- \"skills\" / \"agents\" / \"commands\" / \"hooks\" / \"settings\" — scope the audit to\n  one surface only.\n- a project path passed as `?cwd=` — to audit a project other than the\n  dashboard server's own working directory.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/cc-config/overview` | `roots` + `counts` for every surface, split `{user,project}` where applicable (skills, agents, commands, outputStyles, plugins, mcpServers, hooks, memory, settingsFiles) |\n| `GET /api/cc-config/skills` | `{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] }` |\n| `GET /api/cc-config/agents` | `{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] }` |\n| `GET /api/cc-config/commands` | `{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] }` |\n| `GET /api/cc-config/hooks` | `{ items:[{ scope, file, exists, hooks:{ <Event>:[{matcher,type,command,timeout}] } }] }` |\n| `GET /api/cc-config/settings` | `{ items:[{ scope, file, exists, data(redacted), raw_size }] }` |\n\n## Report Sections\n\n### 1. Surface inventory (user vs project)\nFrom `/overview` `counts`, print a table: one row per surface with `user`,\n`project`, and `total` columns. Cover skills, agents, commands, output-styles,\nplugins (with enabled/disabled), marketplaces, MCP servers, hooks\n(user/project/project-local), memory, and settings files. Echo the resolved\n`roots` so the user knows which `claudeHome`/project was inspected.\n\n### 2. Duplicate & overlapping skills + agents\nFetch `/skills` and `/agents`. Detect:\n- **Name collisions across scope** — same `name` at both user and project\n  scope (project shadows user). List both `file` paths.\n- **Near-duplicates** — entries whose `frontmatter.description` / `preview`\n  describe the same job. Group them and recommend keeping one.\n\n### 3. Hooks that run shell commands\nFlatten `/hooks` to `(scope, file, Event, matcher, type, command, timeout)`.\nFlag every `type: \"command\"` entry. Within those, escalate ones that contain\nnetwork egress (`curl`, `wget`, `http`, `nc`) or run unbounded with no\n`timeout`. Print the raw `command` so the user can review it.\n\n### 4. Read-only vs mutable surfaces\nState which surfaces the Config Explorer can mutate (skills, agents, commands,\noutput-styles, user/project CLAUDE.md, and per-project `auto-memory` files via\n`PUT`/`DELETE /api/cc-config/file`) versus those that are read-only by design\n(plugins, MCP servers, settings.json and its in-file hooks — written\nconcurrently by the running CLI). Direct cleanup suggestions only at mutable\nsurfaces; for read-only ones, name the source `file` to edit by hand.\n\n## Output\n\n- A one-line verdict first: CLEAN / SPRAWL DETECTED / RISKY HOOKS.\n- Section 1 as a Markdown table (`Surface | User | Project | Total`).\n- Section 2 as grouped lists with `file` paths.\n- Section 3 as a table (`Scope | Event | Matcher | Command | Risk`).\n- Sizes in KB; any cost in USD to 4 decimals; use ▲/▼ for scope deltas.\n- Cite only fields the API returned — never fabricate counts or commands.\n- If the dashboard is unreachable at `http://localhost:4820`, say so and tell\n  the user to start it with `npm start` from the repo root.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-config/skills/config-audit","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-config/skills/config-audit/SKILL.md","defaultBranch":"master"},"readme":"# Config Audit\n\nProduce a complete, data-backed audit of how the user's `~/.claude`\nconfiguration has grown, what overlaps, and what is risky — all read through\nthe Agent Monitor dashboard at `http://localhost:4820`.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be:\n- empty or \"full\" — audit every surface (default).\n- \"skills\" / \"agents\" / \"commands\" / \"hooks\" / \"settings\" — scope the audit to\n  one surface only.\n- a project path passed as `?cwd=` — to audit a project other than the\n  dashboard server's own working directory.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/cc-config/overview` | `roots` + `counts` for every surface, split `{user,project}` where applicable (skills, agents, commands, outputStyles, plugins, mcpServers, hooks, memory, settingsFiles) |\n| `GET /api/cc-config/skills` | `{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] }` |\n| `GET /api/cc-config/agents` | `{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] }` |\n| `GET /api/cc-config/commands` | `{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] }` |\n| `GET /api/cc-config/hooks` | `{ items:[{ scope, file, exists, hooks:{ <Event>:[{matcher,type,command,timeout}] } }] }` |\n| `GET /api/cc-config/settings` | `{ items:[{ scope, file, exists, data(redacted), raw_size }] }` |\n\n## Report Sections\n\n### 1. Surface inventory (user vs project)\nFrom `/overview` `counts`, print a table: one row per surface with `user`,\n`project`, and `total` columns. Cover skills, agents, commands, output-styles,\nplugins (with enabled/disabled), marketplaces, MCP servers, hooks\n(user/project/project-local), memory, and settings files. Echo the resolved\n`roots` so the user knows which `claudeHome`/project was inspected.\n\n### 2. Duplicate & overlapping skills + agents\nFetch `/skills` and `/agents`. Detect:\n- **Name collisions across scope** — same `name` at both user and project\n  scope (project shadows user). List both `file` paths.\n- **Near-duplicates** — entries whose `frontmatter.description` / `preview`\n  describe the same job. Group them and recommend keeping one.\n\n### 3. Hooks that run shell commands\nFlatten `/hooks` to `(scope, file, Event, matcher, type, command, timeout)`.\nFlag every `type: \"command\"` entry. Within those, escalate ones that contain\nnetwork egress (`curl`, `wget`, `http`, `nc`) or run unbounded with no\n`timeout`. Print the raw `command` so the user can review it.\n\n### 4. Read-only vs mutable surfaces\nState which surfaces the Config Explorer can mutate (skills, agents, commands,\noutput-styles, user/project CLAUDE.md, and per-project `auto-memory` files via\n`PUT`/`DELETE /api/cc-config/file`) versus those that are read-only by design\n(plugins, MCP servers, settings.json and its in-file hooks — written\nconcurrently by the running CLI). Direct cleanup suggestions only at mutable\nsurfaces; for read-only ones, name the source `file` to edit by hand.\n\n## Output\n\n- A one-line verdict first: CLEAN / SPRAWL DETECTED / RISKY HOOKS.\n- Section 1 as a Markdown table (`Surface | User | Project | Total`).\n- Section 2 as grouped lists with `file` paths.\n- Section 3 as a table (`Scope | Event | Matcher | Command | Risk`).\n- Sizes in KB; any cost in USD to 4 decimals; use ▲/▼ for scope deltas.\n- Cite only fields the API returned — never fabricate counts or commands.\n- If the dashboard is unreachable at `http://localhost:4820`, say so and tell\n  the user to start it with `npm start` from the repo root.","createdAt":"2026-09-25T12:52:19.883Z","updatedAt":"2026-09-25T12:52:19.883Z"},{"id":"cmugyng3a03aaqu06k5bkmih8","slug":"hoangsonww-claude-code-agent-monitor-hook-inventory","name":"hook-inventory","description":"Inventory hooks across the user, project, and project-local settings plus the ~/.claude/hooks scripts directory — read through the Agent Monitor Config Explorer API — and flag hooks that POST to the network or run arbitrary commands. Reads /api/cc-config/hooks and /api/cc-config/hook-scripts. Use when auditing hook safety.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"hook-inventory","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Inventory hooks across the user, project, and project-local settings plus the ~/.claude/hooks scripts directory — read through the Agent Monitor Config Explorer API — and flag hooks that POST to the network or run arbitrary commands. Reads /api/cc-config/hooks and /api/cc-config/hook-scripts. Use when auditing hook safety.","permissions":[],"systemPrompt":"# Hook Inventory\n\nCatalogue every Claude Code hook the user has configured and assess its safety —\nread through the Agent Monitor dashboard at `http://localhost:4820`.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be:\n- empty — inventory all hooks across every scope (default).\n- an event name (`PreToolUse`, `PostToolUse`, `Stop`, `SubagentStop`,\n  `SessionStart`, `SessionEnd`, `UserPromptSubmit`, `Notification`,\n  `PreCompact`) — restrict to that event.\n- \"scripts\" — focus on the `~/.claude/hooks` handler scripts dir.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/cc-config/hooks` | `{ items:[{ scope:\"user\"\\|\"project\"\\|\"project-local\", file, exists, hooks:{ <Event>:[{ matcher, type, command, timeout }] } }] }` |\n| `GET /api/cc-config/hook-scripts` | `{ dir, items:[{ name, file, size, mtime }] }` — the handler scripts under `~/.claude/hooks/` |\n\n## Report Sections\n\n### 1. Configured hooks by scope\nFrom `/hooks`, flatten each source into `(scope, file, Event, matcher, type,\ncommand, timeout)`. Group by `scope` (user, project, project-local). Show the\nevent, matcher, hook `type`, and the raw `command`. Note which `file` each came\nfrom so the user can edit the right one.\n\n### 2. Hook scripts on disk\nFrom `/hook-scripts`, list each file in `~/.claude/hooks/` with `name`, `size`\n(KB), and `mtime`. Cross-reference: flag scripts referenced by a hook `command`\nbut missing from disk, and scripts on disk that no configured hook calls\n(orphaned).\n\n### 3. Safety flags\nFor every `type: \"command\"` entry escalate:\n- **Network egress (P0)** — the command contains `curl`, `wget`, `http`,\n  `https`, `nc`, or pipes output off-box. Print the destination if visible.\n- **Arbitrary execution (P1)** — pipes to `sh`/`bash`, evaluates downloaded\n  content, or runs an unpinned interpreter on attacker-influenceable input.\n- **No timeout (P2)** — a `command` hook with `timeout: null`; it can hang a\n  session indefinitely.\n- **Broad matcher (P3)** — `matcher: \"*\"` or empty on a destructive command.\n\n## Output\n\n- Section 1 as a table (`Scope | Event | Matcher | Type | Command | Timeout`).\n- Section 3 as a findings table (`Hook | Risk | Severity | Detail`) with a\n  one-line verdict first (SAFE / REVIEW NEEDED / RISKY HOOKS).\n- Print raw commands verbatim — do not paraphrase a command you are flagging.\n- Cite only fields the API returned — never fabricate hooks or commands.\n- Note: hooks live inside settings.json and are read-only via the Config\n  Explorer; edit them in the `file` named by the source, then reinstall with\n  the dashboard's hook setup if needed.\n- If the dashboard is unreachable at `http://localhost:4820`, say so and tell\n  the user to start it with `npm start` from the repo root.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-config/skills/hook-inventory","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-config/skills/hook-inventory/SKILL.md","defaultBranch":"master"},"readme":"# Hook Inventory\n\nCatalogue every Claude Code hook the user has configured and assess its safety —\nread through the Agent Monitor dashboard at `http://localhost:4820`.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be:\n- empty — inventory all hooks across every scope (default).\n- an event name (`PreToolUse`, `PostToolUse`, `Stop`, `SubagentStop`,\n  `SessionStart`, `SessionEnd`, `UserPromptSubmit`, `Notification`,\n  `PreCompact`) — restrict to that event.\n- \"scripts\" — focus on the `~/.claude/hooks` handler scripts dir.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/cc-config/hooks` | `{ items:[{ scope:\"user\"\\|\"project\"\\|\"project-local\", file, exists, hooks:{ <Event>:[{ matcher, type, command, timeout }] } }] }` |\n| `GET /api/cc-config/hook-scripts` | `{ dir, items:[{ name, file, size, mtime }] }` — the handler scripts under `~/.claude/hooks/` |\n\n## Report Sections\n\n### 1. Configured hooks by scope\nFrom `/hooks`, flatten each source into `(scope, file, Event, matcher, type,\ncommand, timeout)`. Group by `scope` (user, project, project-local). Show the\nevent, matcher, hook `type`, and the raw `command`. Note which `file` each came\nfrom so the user can edit the right one.\n\n### 2. Hook scripts on disk\nFrom `/hook-scripts`, list each file in `~/.claude/hooks/` with `name`, `size`\n(KB), and `mtime`. Cross-reference: flag scripts referenced by a hook `command`\nbut missing from disk, and scripts on disk that no configured hook calls\n(orphaned).\n\n### 3. Safety flags\nFor every `type: \"command\"` entry escalate:\n- **Network egress (P0)** — the command contains `curl`, `wget`, `http`,\n  `https`, `nc`, or pipes output off-box. Print the destination if visible.\n- **Arbitrary execution (P1)** — pipes to `sh`/`bash`, evaluates downloaded\n  content, or runs an unpinned interpreter on attacker-influenceable input.\n- **No timeout (P2)** — a `command` hook with `timeout: null`; it can hang a\n  session indefinitely.\n- **Broad matcher (P3)** — `matcher: \"*\"` or empty on a destructive command.\n\n## Output\n\n- Section 1 as a table (`Scope | Event | Matcher | Type | Command | Timeout`).\n- Section 3 as a findings table (`Hook | Risk | Severity | Detail`) with a\n  one-line verdict first (SAFE / REVIEW NEEDED / RISKY HOOKS).\n- Print raw commands verbatim — do not paraphrase a command you are flagging.\n- Cite only fields the API returned — never fabricate hooks or commands.\n- Note: hooks live inside settings.json and are read-only via the Config\n  Explorer; edit them in the `file` named by the source, then reinstall with\n  the dashboard's hook setup if needed.\n- If the dashboard is unreachable at `http://localhost:4820`, say so and tell\n  the user to start it with `npm start` from the repo root.","createdAt":"2026-09-25T12:52:19.895Z","updatedAt":"2026-09-25T12:52:19.895Z"},{"id":"cmugyng3m03adqu0689pcidng","slug":"hoangsonww-claude-code-agent-monitor-mcp-audit","name":"mcp-audit","description":"Audit the configured MCP servers (user + project scope) via the Agent Monitor Config Explorer API: transport (stdio vs http), command/args and env variable names, headers, and the source file each definition came from. Reads /api/cc-config/mcp. Use when reviewing MCP integrations for hygiene, duplication, or unexpected transports.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"mcp-audit","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Audit the configured MCP servers (user + project scope) via the Agent Monitor Config Explorer API: transport (stdio vs http), command/args and env variable names, headers, and the source file each definition came from. Reads /api/cc-config/mcp. Use when reviewing MCP integrations for hygiene, duplication, or unexpected transports.","permissions":[],"systemPrompt":"# MCP Audit\n\nInventory and audit every Model Context Protocol server the user has\nconfigured — both user-scope and project-scope — read through the Agent Monitor\ndashboard at `http://localhost:4820`.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be:\n- empty — audit all MCP servers (default).\n- a server name fragment — focus on matching servers.\n- \"stdio\" / \"http\" — restrict to one transport kind.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/cc-config/mcp` | `{ user:[…], projectScoped:[…] }`. Each server: `{ name, source, kind }` where `kind` is `stdio` (with `command, args, envNames`), `http` (with `url, headers`), or `unknown`. `source` names the file the definition came from (e.g. `~/.claude.json (top-level)`, `~/.claude.json (projects[<root>])`, `~/.claude/settings.json`) |\n\n## Report Sections\n\n### 1. Server inventory\nList every server from `user` and `projectScoped`. For each show `name`,\n`source`, `kind`, and the transport detail:\n- **stdio** — the `command`, its `args`, and the `envNames` (names only — values\n  are not exposed by the API).\n- **http** — the `url` and the `headers` key names (values not exposed).\n- **unknown** — a definition the server could not classify; flag it for review.\n\n### 2. Scope split & duplication\nSeparate user-scope from project-scope servers. Flag any `name` that appears in\nboth scopes (project may shadow user) and any duplicate definitions across\nsource files.\n\n### 3. Hygiene flags\n- **Unknown transport** — servers with `kind: \"unknown\"` (malformed or\n  unsupported definition).\n- **Env reliance** — stdio servers with many `envNames`; note they depend on\n  environment variables being present at launch.\n- **Remote endpoints** — http servers; surface the `url` host so the user can\n  confirm they trust the remote.\n\n## Output\n\n- Section 1 as a table (`Scope | Name | Kind | Transport detail | Source`).\n- Env names and header names listed by name only — never invent or print values\n  (the API does not expose them).\n- Cite only fields the API returned — never fabricate servers, commands, or\n  hosts.\n- Note: MCP servers are read-only via the Config Explorer (they are written\n  concurrently by the running CLI); edit their definitions in the source file\n  named by `source`.\n- If the dashboard is unreachable at `http://localhost:4820`, say so and tell\n  the user to start it with `npm start` from the repo root.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-config/skills/mcp-audit","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-config/skills/mcp-audit/SKILL.md","defaultBranch":"master"},"readme":"# MCP Audit\n\nInventory and audit every Model Context Protocol server the user has\nconfigured — both user-scope and project-scope — read through the Agent Monitor\ndashboard at `http://localhost:4820`.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be:\n- empty — audit all MCP servers (default).\n- a server name fragment — focus on matching servers.\n- \"stdio\" / \"http\" — restrict to one transport kind.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/cc-config/mcp` | `{ user:[…], projectScoped:[…] }`. Each server: `{ name, source, kind }` where `kind` is `stdio` (with `command, args, envNames`), `http` (with `url, headers`), or `unknown`. `source` names the file the definition came from (e.g. `~/.claude.json (top-level)`, `~/.claude.json (projects[<root>])`, `~/.claude/settings.json`) |\n\n## Report Sections\n\n### 1. Server inventory\nList every server from `user` and `projectScoped`. For each show `name`,\n`source`, `kind`, and the transport detail:\n- **stdio** — the `command`, its `args`, and the `envNames` (names only — values\n  are not exposed by the API).\n- **http** — the `url` and the `headers` key names (values not exposed).\n- **unknown** — a definition the server could not classify; flag it for review.\n\n### 2. Scope split & duplication\nSeparate user-scope from project-scope servers. Flag any `name` that appears in\nboth scopes (project may shadow user) and any duplicate definitions across\nsource files.\n\n### 3. Hygiene flags\n- **Unknown transport** — servers with `kind: \"unknown\"` (malformed or\n  unsupported definition).\n- **Env reliance** — stdio servers with many `envNames`; note they depend on\n  environment variables being present at launch.\n- **Remote endpoints** — http servers; surface the `url` host so the user can\n  confirm they trust the remote.\n\n## Output\n\n- Section 1 as a table (`Scope | Name | Kind | Transport detail | Source`).\n- Env names and header names listed by name only — never invent or print values\n  (the API does not expose them).\n- Cite only fields the API returned — never fabricate servers, commands, or\n  hosts.\n- Note: MCP servers are read-only via the Config Explorer (they are written\n  concurrently by the running CLI); edit their definitions in the source file\n  named by `source`.\n- If the dashboard is unreachable at `http://localhost:4820`, say so and tell\n  the user to start it with `npm start` from the repo root.","createdAt":"2026-09-25T12:52:19.906Z","updatedAt":"2026-09-25T12:52:19.906Z"},{"id":"cmugyng3u03agqu06fduiq7mr","slug":"hoangsonww-claude-code-agent-monitor-memory-review","name":"memory-review","description":"Review the file-based memory store via the Agent Monitor Config Explorer API: the user and project CLAUDE.md plus per-project auto-memory files under ~/.claude/projects/<slug>/memory/*.md. Groups by project, shows the index (MEMORY.md) vs per-fact files, and flags stale or oversized facts. Reads /api/cc-config/memory and /api/cc-config/file?path=. Use when curating agent memory.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"memory-review","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Review the file-based memory store via the Agent Monitor Config Explorer API: the user and project CLAUDE.md plus per-project auto-memory files under ~/.claude/projects/<slug>/memory/*.md. Groups by project, shows the index (MEMORY.md) vs per-fact files, and flags stale or oversized facts. Reads /api/cc-config/memory and /api/cc-config/file?path=. Use when curating agent memory.","permissions":[],"systemPrompt":"# Memory Review\n\nCurate the user's file-based agent memory: the long-form CLAUDE.md files plus\nthe per-project auto-memory store — read through the Agent Monitor dashboard at\n`http://localhost:4820`.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be:\n- empty — review the whole memory store across every project (default).\n- a project slug (e.g. `-Users-david-WebstormProjects-foo`) — restrict the\n  review to that one project's auto-memory dir.\n- \"claude-md\" — review only the user/project CLAUDE.md files.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/cc-config/memory` | `{ items:[…] }`. CLAUDE.md entries: `{ scope:\"user\"\\|\"project\", file, size, mtime, preview }`. Auto-memory entries: `{ scope:\"auto-memory\", project, name, isIndex, file, size, mtime, frontmatter, preview }` |\n| `GET /api/cc-config/file?path=<abs>` | full body of one file: `{ ok, file, size, mtime, truncated, text }` — use to read a fact in full before recommending an edit |\n\n## Report Sections\n\n### 1. CLAUDE.md overview\nList the user and project CLAUDE.md entries with `scope`, `size` (KB), and\nlast-modified (`mtime`). Note any that are `truncated` (over 256 KB) — these\nare oversized and worth splitting into auto-memory facts.\n\n### 2. Per-project auto-memory, grouped\nGroup `scope: \"auto-memory\"` items by `project`. For each project show the\n**index** (`isIndex: true`, typically `MEMORY.md`) first, then the per-fact\nfiles. For each fact show `name`, `frontmatter.description` if present, `size`,\nand `mtime`.\n\n### 3. Index vs per-fact consistency\nWithin each project, compare the index (`MEMORY.md`) against the per-fact files\npresent. Flag facts that exist on disk but are not referenced by the index, and\nindex entries that point at files which no longer appear in `/memory`.\n\n### 4. Stale & oversized facts\nFlag facts whose `mtime` is old relative to the rest of the store (stale —\ncandidates to confirm or retire) and facts whose `size` is large (oversized —\ncandidates to split into smaller, single-fact files). When the user wants to\nact on one, fetch its full body with `GET /api/cc-config/file?path=<file>`\nbefore recommending changes.\n\n## Editing memory (mutations)\n\nAuto-memory files are editable through the Config Explorer. To create/overwrite\na fact:\n\n```bash\ncurl -s -X PUT http://localhost:4820/api/cc-config/file \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scope\":\"auto-memory\",\"type\":\"auto-memory\",\"project\":\"<slug>\",\"name\":\"<fact>.md\",\"content\":\"...\"}'\n```\n\nTo delete a fact:\n\n```bash\ncurl -s -X DELETE http://localhost:4820/api/cc-config/file \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scope\":\"auto-memory\",\"type\":\"auto-memory\",\"project\":\"<slug>\",\"name\":\"<fact>.md\"}'\n```\n\nA timestamped backup is written automatically before any edit or delete.\nThe user/project CLAUDE.md uses `type:\"memory\"` with a `scope` and no `name`.\n**Never edit or delete a memory file without explicit per-action confirmation\nfrom the user** — default to read-only review.\n\n## Output\n\n- Section 1 as a short table (`Scope | File | Size | Modified | Truncated`).\n- Section 2 grouped by project, index first, then facts.\n- Sizes in KB; timestamps as relative age; use ▲ for oversized / stale flags.\n- Cite only fields the API returned — never invent facts, names, or sizes.\n- If the dashboard is unreachable at `http://localhost:4820`, say so and tell\n  the user to start it with `npm start` from the repo root.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-config/skills/memory-review","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-config/skills/memory-review/SKILL.md","defaultBranch":"master"},"readme":"# Memory Review\n\nCurate the user's file-based agent memory: the long-form CLAUDE.md files plus\nthe per-project auto-memory store — read through the Agent Monitor dashboard at\n`http://localhost:4820`.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be:\n- empty — review the whole memory store across every project (default).\n- a project slug (e.g. `-Users-david-WebstormProjects-foo`) — restrict the\n  review to that one project's auto-memory dir.\n- \"claude-md\" — review only the user/project CLAUDE.md files.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/cc-config/memory` | `{ items:[…] }`. CLAUDE.md entries: `{ scope:\"user\"\\|\"project\", file, size, mtime, preview }`. Auto-memory entries: `{ scope:\"auto-memory\", project, name, isIndex, file, size, mtime, frontmatter, preview }` |\n| `GET /api/cc-config/file?path=<abs>` | full body of one file: `{ ok, file, size, mtime, truncated, text }` — use to read a fact in full before recommending an edit |\n\n## Report Sections\n\n### 1. CLAUDE.md overview\nList the user and project CLAUDE.md entries with `scope`, `size` (KB), and\nlast-modified (`mtime`). Note any that are `truncated` (over 256 KB) — these\nare oversized and worth splitting into auto-memory facts.\n\n### 2. Per-project auto-memory, grouped\nGroup `scope: \"auto-memory\"` items by `project`. For each project show the\n**index** (`isIndex: true`, typically `MEMORY.md`) first, then the per-fact\nfiles. For each fact show `name`, `frontmatter.description` if present, `size`,\nand `mtime`.\n\n### 3. Index vs per-fact consistency\nWithin each project, compare the index (`MEMORY.md`) against the per-fact files\npresent. Flag facts that exist on disk but are not referenced by the index, and\nindex entries that point at files which no longer appear in `/memory`.\n\n### 4. Stale & oversized facts\nFlag facts whose `mtime` is old relative to the rest of the store (stale —\ncandidates to confirm or retire) and facts whose `size` is large (oversized —\ncandidates to split into smaller, single-fact files). When the user wants to\nact on one, fetch its full body with `GET /api/cc-config/file?path=<file>`\nbefore recommending changes.\n\n## Editing memory (mutations)\n\nAuto-memory files are editable through the Config Explorer. To create/overwrite\na fact:\n\n```bash\ncurl -s -X PUT http://localhost:4820/api/cc-config/file \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scope\":\"auto-memory\",\"type\":\"auto-memory\",\"project\":\"<slug>\",\"name\":\"<fact>.md\",\"content\":\"...\"}'\n```\n\nTo delete a fact:\n\n```bash\ncurl -s -X DELETE http://localhost:4820/api/cc-config/file \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"scope\":\"auto-memory\",\"type\":\"auto-memory\",\"project\":\"<slug>\",\"name\":\"<fact>.md\"}'\n```\n\nA timestamped backup is written automatically before any edit or delete.\nThe user/project CLAUDE.md uses `type:\"memory\"` with a `scope` and no `name`.\n**Never edit or delete a memory file without explicit per-action confirmation\nfrom the user** — default to read-only review.\n\n## Output\n\n- Section 1 as a short table (`Scope | File | Size | Modified | Truncated`).\n- Section 2 grouped by project, index first, then facts.\n- Sizes in KB; timestamps as relative age; use ▲ for oversized / stale flags.\n- Cite only fields the API returned — never invent facts, names, or sizes.\n- If the dashboard is unreachable at `http://localhost:4820`, say so and tell\n  the user to start it with `npm start` from the repo root.","createdAt":"2026-09-25T12:52:19.914Z","updatedAt":"2026-09-25T12:52:19.914Z"},{"id":"cmugyng4303ajqu06xai838ai","slug":"hoangsonww-claude-code-agent-monitor-skill-inventory","name":"skill-inventory","description":"Inventory the installed skills and which plugins contribute them, then flag overlap with the user's own skills — read through the Agent Monitor Config Explorer API. Reads /api/cc-config/skills and /api/cc-config/plugins. Use when managing skills: deduping, deciding what to keep, or tracing a skill back to the plugin that ships it.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"skill-inventory","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Inventory the installed skills and which plugins contribute them, then flag overlap with the user's own skills — read through the Agent Monitor Config Explorer API. Reads /api/cc-config/skills and /api/cc-config/plugins. Use when managing skills: deduping, deciding what to keep, or tracing a skill back to the plugin that ships it.","permissions":[],"systemPrompt":"# Skill Inventory\n\nMap every skill available to the user — both their own (user/project scope) and\nthe ones contributed by installed plugins — read through the Agent Monitor\ndashboard at `http://localhost:4820`.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be:\n- empty — inventory all skills (default).\n- a skill name fragment — focus on skills whose `name` matches.\n- a plugin name — show only the skills that plugin contributes.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/cc-config/skills` | `{ items:[{ scope:\"user\"\\|\"project\", name, path, file, size, mtime, frontmatter, preview }] }` — the user's own skill directories |\n| `GET /api/cc-config/plugins` | `{ manifestPath, manifestExists, plugins:[{ key, name, marketplace, scope, version, enabled, installPath, contributes:{ skills, agents, commands, outputStyles, hooks } }] }` |\n\n## Report Sections\n\n### 1. User & project skills\nFrom `/skills`, list each skill with `scope`, `name`, `size` (KB), and\n`frontmatter.description` (or the start of `preview`). Separate user-scope from\nproject-scope skills.\n\n### 2. Plugin-contributed skills\nFrom `/plugins`, list each plugin with `enabled` state and its\n`contributes.skills` count. Note that `/skills` reports only the user's own\nskill dirs — plugin skills are counted via `contributes`, so reconcile: total\navailable skills ≈ user skills + Σ enabled-plugin `contributes.skills`.\n\n### 3. Overlap & duplication\nFlag where a plugin name or a plugin's contributed-skill domain overlaps with a\nuser-authored skill of the same `name` or purpose (compare against\n`frontmatter.description` from `/skills`). Recommend keeping one source of truth\n— prefer the plugin version if it is maintained upstream, or the user version\nif it is customized.\n\n### 4. Disabled / orphaned plugins\nFlag plugins with `enabled: false` (their skills are inert) and any whose\n`installPathExists` is false (manifest references a missing install) — these are\ndead weight to clean up via the Claude Code plugin manager.\n\n## Output\n\n- Section 1 as a table (`Scope | Name | Size | Description`).\n- Section 2 as a table (`Plugin | Enabled | Skills | Agents | Commands`).\n- A reconciliation line: user skills + plugin skills = total available.\n- Cite only fields the API returned — never fabricate skills or counts.\n- Note: plugins are read-only via the Config Explorer; manage them with the\n  Claude Code plugin commands, not this dashboard.\n- If the dashboard is unreachable at `http://localhost:4820`, say so and tell\n  the user to start it with `npm start` from the repo root.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-config/skills/skill-inventory","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-config/skills/skill-inventory/SKILL.md","defaultBranch":"master"},"readme":"# Skill Inventory\n\nMap every skill available to the user — both their own (user/project scope) and\nthe ones contributed by installed plugins — read through the Agent Monitor\ndashboard at `http://localhost:4820`.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be:\n- empty — inventory all skills (default).\n- a skill name fragment — focus on skills whose `name` matches.\n- a plugin name — show only the skills that plugin contributes.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/cc-config/skills` | `{ items:[{ scope:\"user\"\\|\"project\", name, path, file, size, mtime, frontmatter, preview }] }` — the user's own skill directories |\n| `GET /api/cc-config/plugins` | `{ manifestPath, manifestExists, plugins:[{ key, name, marketplace, scope, version, enabled, installPath, contributes:{ skills, agents, commands, outputStyles, hooks } }] }` |\n\n## Report Sections\n\n### 1. User & project skills\nFrom `/skills`, list each skill with `scope`, `name`, `size` (KB), and\n`frontmatter.description` (or the start of `preview`). Separate user-scope from\nproject-scope skills.\n\n### 2. Plugin-contributed skills\nFrom `/plugins`, list each plugin with `enabled` state and its\n`contributes.skills` count. Note that `/skills` reports only the user's own\nskill dirs — plugin skills are counted via `contributes`, so reconcile: total\navailable skills ≈ user skills + Σ enabled-plugin `contributes.skills`.\n\n### 3. Overlap & duplication\nFlag where a plugin name or a plugin's contributed-skill domain overlaps with a\nuser-authored skill of the same `name` or purpose (compare against\n`frontmatter.description` from `/skills`). Recommend keeping one source of truth\n— prefer the plugin version if it is maintained upstream, or the user version\nif it is customized.\n\n### 4. Disabled / orphaned plugins\nFlag plugins with `enabled: false` (their skills are inert) and any whose\n`installPathExists` is false (manifest references a missing install) — these are\ndead weight to clean up via the Claude Code plugin manager.\n\n## Output\n\n- Section 1 as a table (`Scope | Name | Size | Description`).\n- Section 2 as a table (`Plugin | Enabled | Skills | Agents | Commands`).\n- A reconciliation line: user skills + plugin skills = total available.\n- Cite only fields the API returned — never fabricate skills or counts.\n- Note: plugins are read-only via the Config Explorer; manage them with the\n  Claude Code plugin commands, not this dashboard.\n- If the dashboard is unreachable at `http://localhost:4820`, say so and tell\n  the user to start it with `npm start` from the repo root.","createdAt":"2026-09-25T12:52:19.923Z","updatedAt":"2026-09-25T12:52:19.923Z"},{"id":"cmugyng4c03amqu06ho3jpw5z","slug":"hoangsonww-claude-code-agent-monitor-budget-set","name":"budget-set","description":"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. Reads current spend from /api/pricing/cost to size the budget sensibly and explains every rule field before writing. Use when setting a spend limit or wiring up a budget guardrail.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"budget-set","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"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. Reads current spend from /api/pricing/cost to size the budget sensibly and explains every rule field before writing. Use when setting a spend limit or wiring up a budget guardrail.","permissions":[],"systemPrompt":"# Budget Set\n\nHelp the user define a spend budget and turn it into a live cost guardrail on the\nAgent Monitor dashboard.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis is the budget to set — e.g. `\"$50/month\"`, `\"$10/week\"`, or `\"200000 tokens\"`.\nIf a period is omitted, treat it as a monthly budget and say so. If no number is\ngiven, read current spend first and propose a target.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — current spend, used to size the budget and compute the blended $/token rate |\n| `GET /api/alerts/rules` | `{ rules: [{ id, name, rule_type, config, enabled, cooldown_seconds }] }` — existing rules, so you don't create a duplicate guardrail |\n| `POST /api/alerts/rules` | Create a rule. Body: `{ name, rule_type, config, enabled?, cooldown_seconds? }`. Returns `{ rule }` |\n\n## How a budget becomes a rule\n\nThe dashboard's alerting engine fires on **tokens**, not dollars. The spend-relevant\nrule type is **`token_threshold`**, whose config is `{ total_tokens }` — it fires when\na session's cumulative tokens (input + output + cache_read + cache_write) cross the\nthreshold. To turn a **dollar** budget into a token ceiling:\n\n```\nblended_rate_per_token = total_cost / total_tokens          # from /api/pricing/cost\ntoken_ceiling          = budget_dollars / blended_rate_per_token\n```\n\nCompute `total_tokens` by summing the four token columns across the cost `breakdown`.\n\n### Rule fields explained\n\n| Field | Meaning |\n|-------|---------|\n| `name` | Human label shown in the alert feed (e.g. `\"Monthly $50 budget\"`). Required, non-empty. |\n| `rule_type` | `\"token_threshold\"` for a spend guardrail. (Other types: `event_pattern`, `inactivity`, `status_duration` — not spend-related.) |\n| `config.total_tokens` | Positive integer token ceiling. A session crossing it fires the alert. Derive from the dollar budget as above. |\n| `enabled` | `true` to arm immediately (default), `false` to stage it. |\n| `cooldown_seconds` | Minimum seconds between re-fires for the same scope. Default `300`. Raise it (e.g. `3600`) so a single overspending session doesn't spam the feed. |\n\n## Report Sections\n\n### 1. Current spend snapshot\nFrom `/api/pricing/cost`: `total_cost`, total tokens, and the blended $/Mtok rate. State how much of the proposed budget is already consumed.\n\n### 2. Budget interpretation\nRestate the parsed budget (amount + period). If converting dollars → tokens, show the blended rate and the `token_ceiling` arithmetic.\n\n### 3. Existing guardrails\nList any `token_threshold` rules from `/api/alerts/rules` so the user sees what is already in place; warn before creating a near-duplicate.\n\n### 4. Proposed alert rule\nShow the exact JSON body you would POST, with each field annotated. Then give the ready-to-run command (only run it on explicit confirmation):\n\n```\ncurl -s -X POST http://localhost:4820/api/alerts/rules \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"Monthly $50 budget\",\"rule_type\":\"token_threshold\",\"config\":{\"total_tokens\":12500000},\"cooldown_seconds\":3600}'\n```\n\n### 5. Confirmation\nOn success, echo the returned `rule` (id, name, config). Remind the user that the rule is per-session token usage — to track a whole-period dollar budget, pair it with `/ccam-cost-guard:forecast` and the `spend-forecast` skill.\n\n## Output\n\nMarkdown with the snapshot, the conversion math, and the annotated rule body. Currency as USD to 4 decimal places; token counts with thousands separators. Only POST after the user confirms — never create a rule silently.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-cost-guard/skills/budget-set","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-cost-guard/skills/budget-set/SKILL.md","defaultBranch":"master"},"readme":"# Budget Set\n\nHelp the user define a spend budget and turn it into a live cost guardrail on the\nAgent Monitor dashboard.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis is the budget to set — e.g. `\"$50/month\"`, `\"$10/week\"`, or `\"200000 tokens\"`.\nIf a period is omitted, treat it as a monthly budget and say so. If no number is\ngiven, read current spend first and propose a target.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — current spend, used to size the budget and compute the blended $/token rate |\n| `GET /api/alerts/rules` | `{ rules: [{ id, name, rule_type, config, enabled, cooldown_seconds }] }` — existing rules, so you don't create a duplicate guardrail |\n| `POST /api/alerts/rules` | Create a rule. Body: `{ name, rule_type, config, enabled?, cooldown_seconds? }`. Returns `{ rule }` |\n\n## How a budget becomes a rule\n\nThe dashboard's alerting engine fires on **tokens**, not dollars. The spend-relevant\nrule type is **`token_threshold`**, whose config is `{ total_tokens }` — it fires when\na session's cumulative tokens (input + output + cache_read + cache_write) cross the\nthreshold. To turn a **dollar** budget into a token ceiling:\n\n```\nblended_rate_per_token = total_cost / total_tokens          # from /api/pricing/cost\ntoken_ceiling          = budget_dollars / blended_rate_per_token\n```\n\nCompute `total_tokens` by summing the four token columns across the cost `breakdown`.\n\n### Rule fields explained\n\n| Field | Meaning |\n|-------|---------|\n| `name` | Human label shown in the alert feed (e.g. `\"Monthly $50 budget\"`). Required, non-empty. |\n| `rule_type` | `\"token_threshold\"` for a spend guardrail. (Other types: `event_pattern`, `inactivity`, `status_duration` — not spend-related.) |\n| `config.total_tokens` | Positive integer token ceiling. A session crossing it fires the alert. Derive from the dollar budget as above. |\n| `enabled` | `true` to arm immediately (default), `false` to stage it. |\n| `cooldown_seconds` | Minimum seconds between re-fires for the same scope. Default `300`. Raise it (e.g. `3600`) so a single overspending session doesn't spam the feed. |\n\n## Report Sections\n\n### 1. Current spend snapshot\nFrom `/api/pricing/cost`: `total_cost`, total tokens, and the blended $/Mtok rate. State how much of the proposed budget is already consumed.\n\n### 2. Budget interpretation\nRestate the parsed budget (amount + period). If converting dollars → tokens, show the blended rate and the `token_ceiling` arithmetic.\n\n### 3. Existing guardrails\nList any `token_threshold` rules from `/api/alerts/rules` so the user sees what is already in place; warn before creating a near-duplicate.\n\n### 4. Proposed alert rule\nShow the exact JSON body you would POST, with each field annotated. Then give the ready-to-run command (only run it on explicit confirmation):\n\n```\ncurl -s -X POST http://localhost:4820/api/alerts/rules \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"Monthly $50 budget\",\"rule_type\":\"token_threshold\",\"config\":{\"total_tokens\":12500000},\"cooldown_seconds\":3600}'\n```\n\n### 5. Confirmation\nOn success, echo the returned `rule` (id, name, config). Remind the user that the rule is per-session token usage — to track a whole-period dollar budget, pair it with `/ccam-cost-guard:forecast` and the `spend-forecast` skill.\n\n## Output\n\nMarkdown with the snapshot, the conversion math, and the annotated rule body. Currency as USD to 4 decimal places; token counts with thousands separators. Only POST after the user confirms — never create a rule silently.","createdAt":"2026-09-25T12:52:19.932Z","updatedAt":"2026-09-25T12:52:19.932Z"},{"id":"cmugyng4o03apqu06mcqjjvdo","slug":"hoangsonww-claude-code-agent-monitor-cost-alert","name":"cost-alert","description":"Review the configured cost alert rules and the alerts currently fired on the Agent Monitor dashboard, then explain exactly what tripped and why. Uses /api/alerts (fired feed) and /api/alerts/rules (definitions). Use when checking spend alerts or asking why a cost alarm went off.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"cost-alert","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Review the configured cost alert rules and the alerts currently fired on the Agent Monitor dashboard, then explain exactly what tripped and why. Uses /api/alerts (fired feed) and /api/alerts/rules (definitions). Use when checking spend alerts or asking why a cost alarm went off.","permissions":[],"systemPrompt":"# Cost Alert\n\nAudit the spend guardrails: which rules exist, which have fired, and what tripped them.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be empty (review everything), `\"unacked\"` (only unacknowledged alerts),\nor a rule name to focus on.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/alerts/rules` | `{ rules: [{ id, name, rule_type, config, enabled, cooldown_seconds }] }` — the guardrail definitions |\n| `GET /api/alerts` | `{ alerts: [{ id, rule_id, rule_name, rule_type, session_id, agent_id, message, details, triggered_at, acked }], total, unacked, limit, offset }` — the fired-alert feed, newest first. `?unacked=true` filters to unacknowledged |\n\n## What the rule types mean\n\n| `rule_type` | `config` | Fires when |\n|-------------|----------|------------|\n| `token_threshold` | `{ total_tokens }` | A session's cumulative tokens (input + output + cache_read + cache_write) cross the ceiling — the spend-relevant guardrail |\n| `event_pattern` | `{ event_type?, tool_name?, summary_contains?, count?, window_minutes? }` | Matching events reach `count` within the window |\n| `inactivity` | `{ minutes }` | An active session goes quiet for `minutes` |\n| `status_duration` | `{ status, minutes }` | An agent is stuck in `working`/`waiting` for `minutes` |\n\nFor cost work, focus on `token_threshold`. Translate its token ceiling to dollars using the blended rate from `/api/pricing/cost` (`total_cost / total_tokens`) so the user sees the alarm in money terms.\n\n## Report Sections\n\n### 1. Configured guardrails\nTable from `/api/alerts/rules`: name, type, the human-readable threshold (e.g. `token_threshold → 12,500,000 tokens ≈ $50.0000`), enabled state, cooldown. Flag rules that are `disabled` or have no spend-relevant guardrail at all.\n\n### 2. Fired alerts\nTable from `/api/alerts`: rule name, `triggered_at`, scope (session/agent id), `acked`, and the `message`. Lead with the `unacked` count. Honor `\"unacked\"` input by querying `?unacked=true`.\n\n### 3. What tripped — per alert\nFor each fired alert, parse `details` and explain in plain terms: e.g. *\"session X crossed 12,500,000 tokens (threshold 12,500,000) ≈ $50.12 at current rates — your `token_threshold` budget rule fired.\"* Tie the observed value back to the rule's config.\n\n### 4. Next steps\nSuggest acknowledging stale alerts (`POST /api/alerts/:id/ack` or `/api/alerts/ack-all`), tightening or loosening a threshold, or arming a missing budget rule (point to the `budget-set` skill).\n\n## Output\n\nMarkdown tables. Currency as USD to 4 decimal places; token counts with thousands separators. Make the link between each fired alert and the rule that produced it explicit — never report a raw alert without saying which rule tripped and why.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-cost-guard/skills/cost-alert","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-cost-guard/skills/cost-alert/SKILL.md","defaultBranch":"master"},"readme":"# Cost Alert\n\nAudit the spend guardrails: which rules exist, which have fired, and what tripped them.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be empty (review everything), `\"unacked\"` (only unacknowledged alerts),\nor a rule name to focus on.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/alerts/rules` | `{ rules: [{ id, name, rule_type, config, enabled, cooldown_seconds }] }` — the guardrail definitions |\n| `GET /api/alerts` | `{ alerts: [{ id, rule_id, rule_name, rule_type, session_id, agent_id, message, details, triggered_at, acked }], total, unacked, limit, offset }` — the fired-alert feed, newest first. `?unacked=true` filters to unacknowledged |\n\n## What the rule types mean\n\n| `rule_type` | `config` | Fires when |\n|-------------|----------|------------|\n| `token_threshold` | `{ total_tokens }` | A session's cumulative tokens (input + output + cache_read + cache_write) cross the ceiling — the spend-relevant guardrail |\n| `event_pattern` | `{ event_type?, tool_name?, summary_contains?, count?, window_minutes? }` | Matching events reach `count` within the window |\n| `inactivity` | `{ minutes }` | An active session goes quiet for `minutes` |\n| `status_duration` | `{ status, minutes }` | An agent is stuck in `working`/`waiting` for `minutes` |\n\nFor cost work, focus on `token_threshold`. Translate its token ceiling to dollars using the blended rate from `/api/pricing/cost` (`total_cost / total_tokens`) so the user sees the alarm in money terms.\n\n## Report Sections\n\n### 1. Configured guardrails\nTable from `/api/alerts/rules`: name, type, the human-readable threshold (e.g. `token_threshold → 12,500,000 tokens ≈ $50.0000`), enabled state, cooldown. Flag rules that are `disabled` or have no spend-relevant guardrail at all.\n\n### 2. Fired alerts\nTable from `/api/alerts`: rule name, `triggered_at`, scope (session/agent id), `acked`, and the `message`. Lead with the `unacked` count. Honor `\"unacked\"` input by querying `?unacked=true`.\n\n### 3. What tripped — per alert\nFor each fired alert, parse `details` and explain in plain terms: e.g. *\"session X crossed 12,500,000 tokens (threshold 12,500,000) ≈ $50.12 at current rates — your `token_threshold` budget rule fired.\"* Tie the observed value back to the rule's config.\n\n### 4. Next steps\nSuggest acknowledging stale alerts (`POST /api/alerts/:id/ack` or `/api/alerts/ack-all`), tightening or loosening a threshold, or arming a missing budget rule (point to the `budget-set` skill).\n\n## Output\n\nMarkdown tables. Currency as USD to 4 decimal places; token counts with thousands separators. Make the link between each fired alert and the rule that produced it explicit — never report a raw alert without saying which rule tripped and why.","createdAt":"2026-09-25T12:52:19.944Z","updatedAt":"2026-09-25T12:52:19.944Z"},{"id":"cmugyng5103asqu06s5pwkuqc","slug":"hoangsonww-claude-code-agent-monitor-daily-budget-check","name":"daily-budget-check","description":"Run a daily spend check-in against a daily budget on the Agent Monitor dashboard — today's spend vs the daily target, pace through the day, and the projected overage if the current pace holds. Uses /api/pricing/cost and /api/sessions (grouped by started_at = today). Use for a quick daily spend check-in or a morning/evening budget pulse.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"daily-budget-check","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Run a daily spend check-in against a daily budget on the Agent Monitor dashboard — today's spend vs the daily target, pace through the day, and the projected overage if the current pace holds. Uses /api/pricing/cost and /api/sessions (grouped by started_at = today). Use for a quick daily spend check-in or a morning/evening budget pulse.","permissions":[],"systemPrompt":"# Daily Budget Check\n\nA fast daily pulse: are you on pace against today's budget?\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis is the **daily budget in dollars** — e.g. `\"5\"` or `\"$5/day\"`. If omitted, ask\nfor one or derive it from a monthly budget (`monthly / days_in_month`) and state the\nassumption.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — fleet-wide spend and the avg cost-per-session used to value today's sessions |\n| `GET /api/sessions?limit=200` | Session list with inline `cost` and `started_at` — filter to today (`DATE(started_at) = today`) to isolate today's spend |\n\n## Method\n\nSpend has no per-day field, so isolate **today** from the session list:\n\n1. **Today's sessions** = sessions whose `started_at` is today (local date).\n2. **Today's spend** = sum of inline `cost` over today's sessions. If inline `cost` is absent for some rows, fall back to `today_session_count × (total_cost / total_session_count)` and flag it as approximate.\n3. **Pace**: `fraction_of_day_elapsed = hours_since_midnight / 24`. `expected_by_now = daily_budget × fraction_of_day_elapsed`.\n4. **Pace delta** = `today_spend − expected_by_now` (▲ ahead of budget / ▼ behind).\n5. **End-of-day projection**: `projected_today = today_spend / fraction_of_day_elapsed` (linear extrapolation of the current pace). Guard against tiny `fraction_of_day_elapsed` early in the day — if under ~0.1, label the projection low-confidence.\n6. **Projected overage** = `projected_today − daily_budget` (positive = over).\n\n## Report Sections\n\n### 1. Today vs budget\nOne headline line: **today's spend / daily budget**, and the percent consumed. Verdict: **under** / **on pace** / **over**.\n\n### 2. Pace\n`expected_by_now` vs actual `today_spend`, the ▲/▼ pace delta, and the fraction of the day elapsed.\n\n### 3. End-of-day projection\n`projected_today` and the projected overage/headroom vs the daily budget. Note the confidence (low early in the day).\n\n### 4. Today's drivers\nToday's sessions ranked by `cost` (top 5): name/id, model, cost. Surface any premium-model session inflating the day.\n\n### 5. Nudge\nIf projected over: one concrete cut (route the priciest session type cheaper — see `model-savings`; or arm a `token_threshold` rule via `budget-set`). If under: confirm headroom and the remaining daily allowance.\n\n## Output\n\nCompact Markdown — this is a daily check-in, keep it tight. Currency as USD to 4 decimal places; pace deltas with ▲/▼. Lead with the verdict line.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-cost-guard/skills/daily-budget-check","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-cost-guard/skills/daily-budget-check/SKILL.md","defaultBranch":"master"},"readme":"# Daily Budget Check\n\nA fast daily pulse: are you on pace against today's budget?\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis is the **daily budget in dollars** — e.g. `\"5\"` or `\"$5/day\"`. If omitted, ask\nfor one or derive it from a monthly budget (`monthly / days_in_month`) and state the\nassumption.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — fleet-wide spend and the avg cost-per-session used to value today's sessions |\n| `GET /api/sessions?limit=200` | Session list with inline `cost` and `started_at` — filter to today (`DATE(started_at) = today`) to isolate today's spend |\n\n## Method\n\nSpend has no per-day field, so isolate **today** from the session list:\n\n1. **Today's sessions** = sessions whose `started_at` is today (local date).\n2. **Today's spend** = sum of inline `cost` over today's sessions. If inline `cost` is absent for some rows, fall back to `today_session_count × (total_cost / total_session_count)` and flag it as approximate.\n3. **Pace**: `fraction_of_day_elapsed = hours_since_midnight / 24`. `expected_by_now = daily_budget × fraction_of_day_elapsed`.\n4. **Pace delta** = `today_spend − expected_by_now` (▲ ahead of budget / ▼ behind).\n5. **End-of-day projection**: `projected_today = today_spend / fraction_of_day_elapsed` (linear extrapolation of the current pace). Guard against tiny `fraction_of_day_elapsed` early in the day — if under ~0.1, label the projection low-confidence.\n6. **Projected overage** = `projected_today − daily_budget` (positive = over).\n\n## Report Sections\n\n### 1. Today vs budget\nOne headline line: **today's spend / daily budget**, and the percent consumed. Verdict: **under** / **on pace** / **over**.\n\n### 2. Pace\n`expected_by_now` vs actual `today_spend`, the ▲/▼ pace delta, and the fraction of the day elapsed.\n\n### 3. End-of-day projection\n`projected_today` and the projected overage/headroom vs the daily budget. Note the confidence (low early in the day).\n\n### 4. Today's drivers\nToday's sessions ranked by `cost` (top 5): name/id, model, cost. Surface any premium-model session inflating the day.\n\n### 5. Nudge\nIf projected over: one concrete cut (route the priciest session type cheaper — see `model-savings`; or arm a `token_threshold` rule via `budget-set`). If under: confirm headroom and the remaining daily allowance.\n\n## Output\n\nCompact Markdown — this is a daily check-in, keep it tight. Currency as USD to 4 decimal places; pace deltas with ▲/▼. Lead with the verdict line.","createdAt":"2026-09-25T12:52:19.957Z","updatedAt":"2026-09-25T12:52:19.957Z"},{"id":"cmugyng5g03avqu061q38uqt1","slug":"hoangsonww-claude-code-agent-monitor-model-savings","name":"model-savings","description":"Estimate the dollars saved by routing eligible Claude Code work to a cheaper model family, using the Agent Monitor pricing engine. Re-prices each model's token mix at the target family's rates and quantifies the delta. Uses /api/pricing (rates), /api/pricing/cost (current per-model spend), /api/sessions, and /api/analytics. Use when hunting for cost cuts or comparing model tiers.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"model-savings","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Estimate the dollars saved by routing eligible Claude Code work to a cheaper model family, using the Agent Monitor pricing engine. Re-prices each model's token mix at the target family's rates and quantifies the delta. Uses /api/pricing (rates), /api/pricing/cost (current per-model spend), /api/sessions, and /api/analytics. Use when hunting for cost cuts or comparing model tiers.","permissions":[],"systemPrompt":"# Model Savings\n\nQuantify how much spend you would recover by moving eligible work to a cheaper model.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis is the routing question — e.g. `\"Opus → Sonnet\"`, `\"move simple work to Haiku\"`,\nor empty (analyze every premium model against the next tier down). If no target family\nis named, default to proposing the next-cheaper tier per model and say so.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/pricing` | `{ pricing: [{ model_pattern, display_name, input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok }] }` — the rate card for every family |\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — current spend and the exact token mix per model |\n| `GET /api/sessions?limit=200` | Sessions with `model`, inline `cost`, and `metadata` (turn_count, thinking_blocks) — used to judge which work is *eligible* to downshift |\n| `GET /api/analytics` | `agent_types`, `tool_usage`, `total_subagents` — corroborate which task types are low-complexity and safe to route cheaper |\n\n## Savings method\n\nFor each candidate model in the cost `breakdown`, re-price its **exact token mix** at the target family's rates:\n\n```\ncost_at_target = (input_tokens      / 1M) × target.input_per_mtok\n               + (output_tokens     / 1M) × target.output_per_mtok\n               + (cache_read_tokens / 1M) × target.cache_read_per_mtok\n               + (cache_write_tokens/ 1M) × target.cache_write_per_mtok\n\nsavings = current_model_cost − cost_at_target\n```\n\nPull `target.*_per_mtok` from `/api/pricing` (longest `model_pattern` match wins). Default rates ($/Mtok in/out/cacheRead/cacheWrite): **Opus** $5/$25/$0.50/$6.25, **Sonnet** $3/$15/$0.30/$3.75, **Haiku** $1/$5/$0.10/$1.25.\n\n### Eligibility — don't promise savings on work that needs the big model\n\nRe-pricing the full token mix is the *theoretical ceiling*. Scope it to **eligible** work:\n- Low-turn sessions (`metadata.turn_count` small) and simple subagent/tool work are safe to downshift.\n- Heavy-reasoning sessions (many thinking_blocks, high turn counts) likely need the premium model — exclude or discount them.\n- Report both the **full re-price** (ceiling) and an **eligible-only** estimate, and state the eligibility rule you applied.\n\n## Report Sections\n\n### 1. Current spend by model\nTable from `/api/pricing/cost`: each model, its 4 token counts, and current cost. Note its share of `total_cost`.\n\n### 2. Re-priced at target family\nFor each candidate, show `cost_at_target` and `savings` (absolute $ and %). Make the target rate card explicit.\n\n### 3. Eligible-only estimate\nApply the eligibility rule and recompute savings over just the downshiftable token mix. Show how many sessions / what share of tokens qualified.\n\n### 4. Recommended routing\nRank routing moves by eligible monthly savings (descending), top 5. For each: source → target, the token mix moved, estimated $ saved, and a confidence level (high/medium/low) based on how clearly the work is low-complexity.\n\n### 5. Caveats\nCheaper models may need more turns or produce more output — note that realized savings can be lower than the static re-price, and that quality-sensitive work should stay on the premium tier.\n\n## Output\n\nMarkdown tables. Currency as USD to 4 decimal places; token counts with thousands separators; rates as $/Mtok. Always present both the ceiling (full re-price) and the eligible-only estimate so the number is honest.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-cost-guard/skills/model-savings","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-cost-guard/skills/model-savings/SKILL.md","defaultBranch":"master"},"readme":"# Model Savings\n\nQuantify how much spend you would recover by moving eligible work to a cheaper model.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis is the routing question — e.g. `\"Opus → Sonnet\"`, `\"move simple work to Haiku\"`,\nor empty (analyze every premium model against the next tier down). If no target family\nis named, default to proposing the next-cheaper tier per model and say so.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/pricing` | `{ pricing: [{ model_pattern, display_name, input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok }] }` — the rate card for every family |\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — current spend and the exact token mix per model |\n| `GET /api/sessions?limit=200` | Sessions with `model`, inline `cost`, and `metadata` (turn_count, thinking_blocks) — used to judge which work is *eligible* to downshift |\n| `GET /api/analytics` | `agent_types`, `tool_usage`, `total_subagents` — corroborate which task types are low-complexity and safe to route cheaper |\n\n## Savings method\n\nFor each candidate model in the cost `breakdown`, re-price its **exact token mix** at the target family's rates:\n\n```\ncost_at_target = (input_tokens      / 1M) × target.input_per_mtok\n               + (output_tokens     / 1M) × target.output_per_mtok\n               + (cache_read_tokens / 1M) × target.cache_read_per_mtok\n               + (cache_write_tokens/ 1M) × target.cache_write_per_mtok\n\nsavings = current_model_cost − cost_at_target\n```\n\nPull `target.*_per_mtok` from `/api/pricing` (longest `model_pattern` match wins). Default rates ($/Mtok in/out/cacheRead/cacheWrite): **Opus** $5/$25/$0.50/$6.25, **Sonnet** $3/$15/$0.30/$3.75, **Haiku** $1/$5/$0.10/$1.25.\n\n### Eligibility — don't promise savings on work that needs the big model\n\nRe-pricing the full token mix is the *theoretical ceiling*. Scope it to **eligible** work:\n- Low-turn sessions (`metadata.turn_count` small) and simple subagent/tool work are safe to downshift.\n- Heavy-reasoning sessions (many thinking_blocks, high turn counts) likely need the premium model — exclude or discount them.\n- Report both the **full re-price** (ceiling) and an **eligible-only** estimate, and state the eligibility rule you applied.\n\n## Report Sections\n\n### 1. Current spend by model\nTable from `/api/pricing/cost`: each model, its 4 token counts, and current cost. Note its share of `total_cost`.\n\n### 2. Re-priced at target family\nFor each candidate, show `cost_at_target` and `savings` (absolute $ and %). Make the target rate card explicit.\n\n### 3. Eligible-only estimate\nApply the eligibility rule and recompute savings over just the downshiftable token mix. Show how many sessions / what share of tokens qualified.\n\n### 4. Recommended routing\nRank routing moves by eligible monthly savings (descending), top 5. For each: source → target, the token mix moved, estimated $ saved, and a confidence level (high/medium/low) based on how clearly the work is low-complexity.\n\n### 5. Caveats\nCheaper models may need more turns or produce more output — note that realized savings can be lower than the static re-price, and that quality-sensitive work should stay on the premium tier.\n\n## Output\n\nMarkdown tables. Currency as USD to 4 decimal places; token counts with thousands separators; rates as $/Mtok. Always present both the ceiling (full re-price) and the eligible-only estimate so the number is honest.","createdAt":"2026-09-25T12:52:19.972Z","updatedAt":"2026-09-25T12:52:19.972Z"},{"id":"cmugyng5u03ayqu06mxwo0618","slug":"hoangsonww-claude-code-agent-monitor-spend-forecast","name":"spend-forecast","description":"Forecast Claude Code spend to the end of the week or month from the daily session trend on the Agent Monitor dashboard — moving average of daily spend × days remaining, added to spend-to-date. Uses /api/analytics daily_sessions, /api/pricing/cost, and /api/sessions for a per-day cost curve. Use when projecting cost or asking \"where will my spend land\".","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"spend-forecast","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Forecast Claude Code spend to the end of the week or month from the daily session trend on the Agent Monitor dashboard — moving average of daily spend × days remaining, added to spend-to-date. Uses /api/analytics daily_sessions, /api/pricing/cost, and /api/sessions for a per-day cost curve. Use when projecting cost or asking \"where will my spend land\".","permissions":[],"systemPrompt":"# Spend Forecast\n\nProject where Claude Code spend will end up by the close of the current week or month.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis is the forecast horizon — `\"week\"`, `\"month\"`, or a specific date. Default to\n**month** (calendar month-end) when nothing is given, and state the horizon you used.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/analytics` | `{ total_cost, tokens (effective totals, baselines pre-summed), daily_sessions (365d: [{ date, count }]), daily_events, overview, ... }` — `daily_sessions` is the trend the forecast extrapolates |\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — authoritative spend-to-date and avg cost-per-session input |\n| `GET /api/sessions?limit=200` | Session list with inline `cost` and `started_at` — group by day for a sharper daily-spend curve than the count-based approximation |\n\n## Forecast method\n\nSpend has no native per-day field, so build a daily-spend series and extrapolate:\n\n1. **Spend-to-date** = `total_cost` from `/api/pricing/cost`.\n2. **Avg cost per session** = `total_cost / total_session_count`.\n3. **Daily spend series**: for the trailing window, `daily_spend[d] ≈ daily_sessions[d].count × avg_cost_per_session`. For a sharper curve, instead sum inline session `cost` grouped by `DATE(started_at)`.\n4. **Moving average**: `avg_daily_spend = mean(daily_spend over the trailing 7 days)`. Also compute a 14-day average to gauge whether the trend is accelerating (▲) or cooling (▼).\n5. **Remaining days**: days left until the end of the chosen horizon (week = through Sunday; month = through the last calendar day).\n6. **Projection**: `projected_total = spend_to_date_this_period + (avg_daily_spend × days_remaining)`.\n\n> Spend-to-date this period: when the trend covers more than the current period, restrict the spend-to-date term to sessions whose `started_at` falls inside the current week/month so the projection isn't inflated by older spend.\n\n## Report Sections\n\n### 1. Spend to date\n`total_cost`, session count, avg cost/session, and how much falls inside the current period.\n\n### 2. Daily trend\nThe 7-day and 14-day moving averages of daily spend, with a ▲/▼ accelerating-vs-cooling read. Show the last 7 days as a compact table (date, sessions, est. spend).\n\n### 3. Projection\n`avg_daily_spend × days_remaining` and the resulting `projected_total` for the horizon. State the days-remaining count explicitly.\n\n### 4. Budget check (if a budget is known)\nIf the user mentions a budget, show projected vs. budget, the over/under delta, and the date the budget is projected to be crossed (`days_to_budget = (budget − spend_to_date) / avg_daily_spend`).\n\n### 5. Confidence & caveats\nNote that the forecast assumes the recent daily pace holds, that daily spend is approximated from session counts unless an inline-cost curve was used, and call out any low-data horizons (e.g. fewer than 7 active days).\n\n## Output\n\nMarkdown with the trend table and the projection. Currency as USD to 4 decimal places; show moving averages and the projected total prominently. Deltas with ▲/▼.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-cost-guard/skills/spend-forecast","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-cost-guard/skills/spend-forecast/SKILL.md","defaultBranch":"master"},"readme":"# Spend Forecast\n\nProject where Claude Code spend will end up by the close of the current week or month.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis is the forecast horizon — `\"week\"`, `\"month\"`, or a specific date. Default to\n**month** (calendar month-end) when nothing is given, and state the horizon you used.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/analytics` | `{ total_cost, tokens (effective totals, baselines pre-summed), daily_sessions (365d: [{ date, count }]), daily_events, overview, ... }` — `daily_sessions` is the trend the forecast extrapolates |\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — authoritative spend-to-date and avg cost-per-session input |\n| `GET /api/sessions?limit=200` | Session list with inline `cost` and `started_at` — group by day for a sharper daily-spend curve than the count-based approximation |\n\n## Forecast method\n\nSpend has no native per-day field, so build a daily-spend series and extrapolate:\n\n1. **Spend-to-date** = `total_cost` from `/api/pricing/cost`.\n2. **Avg cost per session** = `total_cost / total_session_count`.\n3. **Daily spend series**: for the trailing window, `daily_spend[d] ≈ daily_sessions[d].count × avg_cost_per_session`. For a sharper curve, instead sum inline session `cost` grouped by `DATE(started_at)`.\n4. **Moving average**: `avg_daily_spend = mean(daily_spend over the trailing 7 days)`. Also compute a 14-day average to gauge whether the trend is accelerating (▲) or cooling (▼).\n5. **Remaining days**: days left until the end of the chosen horizon (week = through Sunday; month = through the last calendar day).\n6. **Projection**: `projected_total = spend_to_date_this_period + (avg_daily_spend × days_remaining)`.\n\n> Spend-to-date this period: when the trend covers more than the current period, restrict the spend-to-date term to sessions whose `started_at` falls inside the current week/month so the projection isn't inflated by older spend.\n\n## Report Sections\n\n### 1. Spend to date\n`total_cost`, session count, avg cost/session, and how much falls inside the current period.\n\n### 2. Daily trend\nThe 7-day and 14-day moving averages of daily spend, with a ▲/▼ accelerating-vs-cooling read. Show the last 7 days as a compact table (date, sessions, est. spend).\n\n### 3. Projection\n`avg_daily_spend × days_remaining` and the resulting `projected_total` for the horizon. State the days-remaining count explicitly.\n\n### 4. Budget check (if a budget is known)\nIf the user mentions a budget, show projected vs. budget, the over/under delta, and the date the budget is projected to be crossed (`days_to_budget = (budget − spend_to_date) / avg_daily_spend`).\n\n### 5. Confidence & caveats\nNote that the forecast assumes the recent daily pace holds, that daily spend is approximated from session counts unless an inline-cost curve was used, and call out any low-data horizons (e.g. fewer than 7 active days).\n\n## Output\n\nMarkdown with the trend table and the projection. Currency as USD to 4 decimal places; show moving averages and the projected total prominently. Deltas with ▲/▼.","createdAt":"2026-09-25T12:52:19.986Z","updatedAt":"2026-09-25T12:52:19.986Z"},{"id":"cmugyng6303b1qu068ajk4iw5","slug":"hoangsonww-claude-code-agent-monitor-dashboard-status","name":"dashboard-status","description":"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 status returned by /api/settings/info, and shows data freshness (last event timestamp). Use to verify the monitoring system is operational.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"dashboard-status","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"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 status returned by /api/settings/info, and shows data freshness (last event timestamp). Use to verify the monitoring system is operational.","permissions":[],"systemPrompt":"# Dashboard Status\n\nQuick status check on the Claude Code Agent Monitor dashboard.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nOptions: empty (default: full status), \"quick\" (API only), \"verbose\" (include endpoint details).\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/health` | HTTP 200 if API is running |\n| `GET /api/stats` | `{ total_sessions, active_sessions, active_agents, total_agents, total_events, events_today, ws_connections, agents_by_status, sessions_by_status }` |\n| `GET /api/settings/info` | Dashboard configuration: version, port, data paths |\n| `GET /api/events?limit=1` | Most recent event (for freshness check) |\n\n## Status Report\n\n### 1. API Server\n- Reachable at `http://localhost:4820`? Response time?\n- If unreachable: suggest `npm start` from the project directory\n\n### 2. System Counts\nFrom `/api/stats`:\n- Total sessions tracked (`total_sessions`)\n- Active agents currently running (`active_agents`)\n- Total events ingested (`total_events`)\n- Events today (`events_today`)\n- WebSocket connections (`ws_connections`)\n\n### 3. Data Freshness\nFrom latest event:\n- Time since last event ingested\n- If >1 hour: warn about possible hook disconnect\n\n### 4. Hook Status\nUse `/api/settings/info` → `hooks` for configured hook names:\n- Expected: PreToolUse, PostToolUse, Stop, SubagentStop, Notification, SessionStart, SessionEnd\n- Report which hook names are present vs missing. Do not read hook commands or\n  unrelated settings.\n\n### 5. Dashboard Info\nFrom `/api/settings/info`:\n- Dashboard version\n- Database path and size\n- Configured port\n\n## Output Format\n\nCompact status card:\n\n```\n╔══════════════════════════════════════╗\n║   AGENT MONITOR STATUS              ║\n╠══════════════════════════════════════╣\n║   API:        ✅ Online (42ms)      ║\n║   Sessions:   127 tracked           ║\n║   Events:     4,892 ingested        ║\n║   Hooks:      7/7 configured        ║\n║   Last Event: 3 minutes ago         ║\n╚══════════════════════════════════════╝\n```","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-dashboard/skills/dashboard-status","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-dashboard/skills/dashboard-status/SKILL.md","defaultBranch":"master"},"readme":"# Dashboard Status\n\nQuick status check on the Claude Code Agent Monitor dashboard.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nOptions: empty (default: full status), \"quick\" (API only), \"verbose\" (include endpoint details).\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/health` | HTTP 200 if API is running |\n| `GET /api/stats` | `{ total_sessions, active_sessions, active_agents, total_agents, total_events, events_today, ws_connections, agents_by_status, sessions_by_status }` |\n| `GET /api/settings/info` | Dashboard configuration: version, port, data paths |\n| `GET /api/events?limit=1` | Most recent event (for freshness check) |\n\n## Status Report\n\n### 1. API Server\n- Reachable at `http://localhost:4820`? Response time?\n- If unreachable: suggest `npm start` from the project directory\n\n### 2. System Counts\nFrom `/api/stats`:\n- Total sessions tracked (`total_sessions`)\n- Active agents currently running (`active_agents`)\n- Total events ingested (`total_events`)\n- Events today (`events_today`)\n- WebSocket connections (`ws_connections`)\n\n### 3. Data Freshness\nFrom latest event:\n- Time since last event ingested\n- If >1 hour: warn about possible hook disconnect\n\n### 4. Hook Status\nUse `/api/settings/info` → `hooks` for configured hook names:\n- Expected: PreToolUse, PostToolUse, Stop, SubagentStop, Notification, SessionStart, SessionEnd\n- Report which hook names are present vs missing. Do not read hook commands or\n  unrelated settings.\n\n### 5. Dashboard Info\nFrom `/api/settings/info`:\n- Dashboard version\n- Database path and size\n- Configured port\n\n## Output Format\n\nCompact status card:\n\n```\n╔══════════════════════════════════════╗\n║   AGENT MONITOR STATUS              ║\n╠══════════════════════════════════════╣\n║   API:        ✅ Online (42ms)      ║\n║   Sessions:   127 tracked           ║\n║   Events:     4,892 ingested        ║\n║   Hooks:      7/7 configured        ║\n║   Last Event: 3 minutes ago         ║\n╚══════════════════════════════════════╝\n```","createdAt":"2026-09-25T12:52:19.995Z","updatedAt":"2026-09-25T12:52:19.995Z"},{"id":"cmugyng6h03b4qu06ap38jv4a","slug":"hoangsonww-claude-code-agent-monitor-endpoint-probe","name":"endpoint-probe","description":"Probes each major Agent Monitor API route — /api/stats, /api/analytics, /api/sessions, /api/pricing/cost, /api/workflows/runs, /api/cc-config/overview — and reports each one's HTTP status, latency, and response shape, flagging which are reachable. Use to verify a dashboard install is wired up correctly.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"endpoint-probe","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Probes each major Agent Monitor API route — /api/stats, /api/analytics, /api/sessions, /api/pricing/cost, /api/workflows/runs, /api/cc-config/overview — and reports each one's HTTP status, latency, and response shape, flagging which are reachable. Use to verify a dashboard install is wired up correctly.","permissions":[],"systemPrompt":"# Endpoint Probe\n\nSmoke-test the dashboard's main API surface by hitting each major route once and\nreporting whether it responds and what shape it returns.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nOptions: empty (default: probe all routes below), or a substring to filter which\nroutes are probed (e.g. `pricing` probes only matching routes).\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/stats` | `{ total_sessions, active_sessions, active_agents, total_agents, total_events, events_today, ws_connections, agents_by_status, sessions_by_status }` |\n| `GET /api/analytics` | `{ overview, tokens, tool_usage, daily_events, daily_sessions, agent_types, event_types, avg_events_per_session, total_subagents, sessions_by_status, agents_by_status }` |\n| `GET /api/sessions` | Session list; each: `id, status, model, cwd, started_at, ended_at, cost, metadata` |\n| `GET /api/pricing/cost` | `{ total_cost, breakdown:[{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` |\n| `GET /api/workflows/runs` | Workflow-tool run journals (fleets) |\n| `GET /api/cc-config/overview` | Claude Code config explorer overview (skills, agents, commands, plugins, mcp, hooks, etc.) |\n\n## Method\n\nFor each route, issue a single `GET` against `http://localhost:4820<path>` with a\nshort timeout, capturing the HTTP status code, round-trip latency, and the\ntop-level shape of the JSON body (object keys, or array length). A route counts\nas reachable when it returns a 2xx with parseable JSON.\n\nIf `/api/stats` itself fails to connect, the dashboard is not running — stop and\ntell the user to start it with `npm start` (or `npm run dev`) from the repo root.\n\n## Report Sections\n\n### 1. Probe Matrix\nA Markdown table — one row per route — with columns:\n`endpoint`, `status` (HTTP code), `latency`, `reachable` (✅/❌), `shape`\n(e.g. `object: {total_cost, breakdown[…]}` or `array[N]`).\n\n### 2. Reachability Summary\nCount of reachable vs total. Name any unreachable or non-2xx routes explicitly.\n\n### 3. Verdict\nOne line: install looks healthy (all reachable) or partially wired (list the\ngaps and the most likely cause — server not running, route disabled, or empty data).\n\n## Output\n\n- Compact Markdown; the probe matrix is the centerpiece.\n- Cite the real status code, latency, and observed shape per route — never assume.\n- Report shape from what actually came back; if a route returns an empty array or\n  object, say so rather than inferring fields.\n- Keep currency, where shown, to 4 decimals (e.g. `total_cost: $0.0000`).","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-dashboard/skills/endpoint-probe","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-dashboard/skills/endpoint-probe/SKILL.md","defaultBranch":"master"},"readme":"# Endpoint Probe\n\nSmoke-test the dashboard's main API surface by hitting each major route once and\nreporting whether it responds and what shape it returns.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nOptions: empty (default: probe all routes below), or a substring to filter which\nroutes are probed (e.g. `pricing` probes only matching routes).\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/stats` | `{ total_sessions, active_sessions, active_agents, total_agents, total_events, events_today, ws_connections, agents_by_status, sessions_by_status }` |\n| `GET /api/analytics` | `{ overview, tokens, tool_usage, daily_events, daily_sessions, agent_types, event_types, avg_events_per_session, total_subagents, sessions_by_status, agents_by_status }` |\n| `GET /api/sessions` | Session list; each: `id, status, model, cwd, started_at, ended_at, cost, metadata` |\n| `GET /api/pricing/cost` | `{ total_cost, breakdown:[{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` |\n| `GET /api/workflows/runs` | Workflow-tool run journals (fleets) |\n| `GET /api/cc-config/overview` | Claude Code config explorer overview (skills, agents, commands, plugins, mcp, hooks, etc.) |\n\n## Method\n\nFor each route, issue a single `GET` against `http://localhost:4820<path>` with a\nshort timeout, capturing the HTTP status code, round-trip latency, and the\ntop-level shape of the JSON body (object keys, or array length). A route counts\nas reachable when it returns a 2xx with parseable JSON.\n\nIf `/api/stats` itself fails to connect, the dashboard is not running — stop and\ntell the user to start it with `npm start` (or `npm run dev`) from the repo root.\n\n## Report Sections\n\n### 1. Probe Matrix\nA Markdown table — one row per route — with columns:\n`endpoint`, `status` (HTTP code), `latency`, `reachable` (✅/❌), `shape`\n(e.g. `object: {total_cost, breakdown[…]}` or `array[N]`).\n\n### 2. Reachability Summary\nCount of reachable vs total. Name any unreachable or non-2xx routes explicitly.\n\n### 3. Verdict\nOne line: install looks healthy (all reachable) or partially wired (list the\ngaps and the most likely cause — server not running, route disabled, or empty data).\n\n## Output\n\n- Compact Markdown; the probe matrix is the centerpiece.\n- Cite the real status code, latency, and observed shape per route — never assume.\n- Report shape from what actually came back; if a route returns an empty array or\n  object, say so rather than inferring fields.\n- Keep currency, where shown, to 4 decimals (e.g. `total_cost: $0.0000`).","createdAt":"2026-09-25T12:52:20.009Z","updatedAt":"2026-09-25T12:52:20.009Z"},{"id":"cmugyng6s03b7qu069x4emspt","slug":"hoangsonww-claude-code-agent-monitor-live-watch","name":"live-watch","description":"Polls the Agent Monitor /api/stats endpoint several times over a short window and reports the live deltas in active_sessions, active_agents, events_today, and ws_connections so you can see activity moving in real time. Use when watching the dashboard for live changes rather than a one-time snapshot.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"live-watch","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Polls the Agent Monitor /api/stats endpoint several times over a short window and reports the live deltas in active_sessions, active_agents, events_today, and ws_connections so you can see activity moving in real time. Use when watching the dashboard for live changes rather than a one-time snapshot.","permissions":[],"systemPrompt":"# Live Watch\n\nWatch the dashboard's live counters change over a short window by polling\n`/api/stats` a few times and reporting the deltas.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nInterpreted as the watch shape: number of polls and/or interval (e.g. `5x3s` =\n5 samples 3 seconds apart). Defaults when empty: **5 samples, ~3 seconds apart**\n(a ~15-second window). A bare number means that many samples at the default\ninterval; a bare duration means the default sample count at that interval.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/stats` (polled) | `{ total_sessions, active_sessions, active_agents, total_agents, total_events, events_today, ws_connections, agents_by_status, sessions_by_status }` |\n\n## Method\n\nPoll `GET /api/stats` once per interval for the configured number of samples,\nrecording the timestamp and the four watched counters each time. Pace the polls\nwith a short wait between requests; keep the total window short (seconds, not\nminutes) so it stays interactive.\n\nIf the very first poll fails to connect, the dashboard is down — stop and tell\nthe user to start it with `npm start` (or `npm run dev`) from the repo root,\nthen retry.\n\n## Report Sections\n\n### 1. Watch Window\nState the sample count, interval, and total elapsed window.\n\n### 2. Sample Timeline\nA Markdown table — one row per poll — with columns:\n`#`, `time`, `active_sessions`, `active_agents`, `events_today`, `ws_connections`.\n\n### 3. Deltas\nFor each of the four watched counters, report the net change from the first to\nthe last sample using ▲ (increase), ▼ (decrease), or `=` (no change). Note any\nmid-window spikes or dips visible in the timeline.\n\n### 4. Verdict\nOne line: is the dashboard actively receiving traffic (counters moving) or idle\n(flat) over the window?\n\n## Output\n\n- Compact Markdown. The timeline table is the centerpiece.\n- Cite real values from each poll — never interpolate or invent samples.\n- Deltas use ▲/▼/= with the signed numeric change, e.g. `events_today: ▲ +7`.\n- Keep it scannable in a terminal — no padding beyond the table.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-dashboard/skills/live-watch","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-dashboard/skills/live-watch/SKILL.md","defaultBranch":"master"},"readme":"# Live Watch\n\nWatch the dashboard's live counters change over a short window by polling\n`/api/stats` a few times and reporting the deltas.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nInterpreted as the watch shape: number of polls and/or interval (e.g. `5x3s` =\n5 samples 3 seconds apart). Defaults when empty: **5 samples, ~3 seconds apart**\n(a ~15-second window). A bare number means that many samples at the default\ninterval; a bare duration means the default sample count at that interval.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/stats` (polled) | `{ total_sessions, active_sessions, active_agents, total_agents, total_events, events_today, ws_connections, agents_by_status, sessions_by_status }` |\n\n## Method\n\nPoll `GET /api/stats` once per interval for the configured number of samples,\nrecording the timestamp and the four watched counters each time. Pace the polls\nwith a short wait between requests; keep the total window short (seconds, not\nminutes) so it stays interactive.\n\nIf the very first poll fails to connect, the dashboard is down — stop and tell\nthe user to start it with `npm start` (or `npm run dev`) from the repo root,\nthen retry.\n\n## Report Sections\n\n### 1. Watch Window\nState the sample count, interval, and total elapsed window.\n\n### 2. Sample Timeline\nA Markdown table — one row per poll — with columns:\n`#`, `time`, `active_sessions`, `active_agents`, `events_today`, `ws_connections`.\n\n### 3. Deltas\nFor each of the four watched counters, report the net change from the first to\nthe last sample using ▲ (increase), ▼ (decrease), or `=` (no change). Note any\nmid-window spikes or dips visible in the timeline.\n\n### 4. Verdict\nOne line: is the dashboard actively receiving traffic (counters moving) or idle\n(flat) over the window?\n\n## Output\n\n- Compact Markdown. The timeline table is the centerpiece.\n- Cite real values from each poll — never interpolate or invent samples.\n- Deltas use ▲/▼/= with the signed numeric change, e.g. `events_today: ▲ +7`.\n- Keep it scannable in a terminal — no padding beyond the table.","createdAt":"2026-09-25T12:52:20.021Z","updatedAt":"2026-09-25T12:52:20.021Z"},{"id":"cmugynfwm038pqu0651z1x0dk","slug":"hoangsonww-claude-code-agent-monitor-i18n-parity-2","name":"i18n-parity","description":"MANDATORY for every coding agent and contributor touching localized content — keep all five localization surfaces (dashboard UI keys, wiki page, mirrored READMEs, locale-aware formatting, language switchers) in parity across every supported language. Use automatically (without being asked) whenever you add or change user-visible UI copy, add an i18n key, edit README.md, edit wiki/index.html, or change docs that the READMEs and wiki mirror — and use the full new-language checklist whenever adding a language (a new README-XX.md, a new client/src/i18n/locales/<xx>/ directory, or a new lang-option in the wiki).","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"i18n-parity","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"MANDATORY for every coding agent and contributor touching localized content — keep all five localization surfaces (dashboard UI keys, wiki page, mirrored READMEs, locale-aware formatting, language switchers) in parity across every supported language. Use automatically (without being asked) whenever you add or change user-visible UI copy, add an i18n key, edit README.md, edit wiki/index.html, or change docs that the READMEs and wiki mirror — and use the full new-language checklist whenever adding a language (a new README-XX.md, a new client/src/i18n/locales/<xx>/ directory, or a new lang-option in the wiki).","permissions":[],"systemPrompt":"# i18n Parity\n\nThis repository is localized on **five independent surfaces**, each with its own\nmechanism. A change that lands on one and not the others leaves the product\nhalf-translated: the English falls through, and the gap is invisible to anyone\nworking in English. This skill states the invariant, maps every surface to the\nexact files, and gives one command that proves parity.\n\n**The invariant: English is the source of truth on every surface, and no change\nis done until every supported language carries it in the same PR.** A fallback\nto English is a safety net, never a completed translation.\n\nSupported languages are declared in one place — `supportedLngs` in\n[`client/src/i18n/index.ts`](../../../client/src/i18n/index.ts). Today:\n**`en`, `zh`, `vi`, `ko`, `es`**. Everything below derives from that list; the\naudit script reads it rather than hard-coding.\n\n## The five surfaces\n\n| # | Surface | English source of truth | Translations live in | Automated gate |\n|---|---|---|---|---|\n| 1 | **Dashboard UI** | `client/src/i18n/locales/en/*.json` | `client/src/i18n/locales/<xx>/*.json` (same 15 namespaces) | `client/src/i18n/__tests__/i18n.test.ts` — key, type, and interpolation-token parity |\n| 2 | **Wiki page** | English text in the `wiki/index.html` DOM | `wiki/script.js` (`T`, `ATTRIBUTE_TRANSLATIONS`, `META`, `languageLabels`, the two language ladders) + `wiki/i18n-content.js` (`window.__WIKI_CONTENT_I18N`, both the body bundles and `plain`) | `client/tests/wiki-i18n.test.ts` — live-DOM prose coverage, inline-tag preservation, block-length budgets, asset-version sync |\n| 3 | **Mirrored READMEs** | `README.md` | `README-CN.md` (zh), `README-VN.md` (vi), `README-KO.md` (ko), `README-ES.md` (es) | partial — `scripts/i18n-audit.sh` (existence, heading count, cross-links) and `server/__tests__/plugins-marketplace.test.js` (documented counts); prose parity is review-only |\n| 4 | **Language switchers** | — | `client/src/components/Sidebar.tsx`, `client/src/lib/paletteCommands.ts`, the two `.lang-select-menu` blocks in `wiki/index.html`, `nav.json` `languageNames` / `languageShort` | `scripts/i18n-audit.sh` |\n| 5 | **Locale-aware formatting** | — | `client/src/lib/format.ts` (`SupportedLanguage` union, `getCurrentLanguage()` whitelist, `getCurrentLocale()` BCP-47 map) | `client/src/lib/__tests__/format.test.ts` |\n\n### What is deliberately NOT localized\n\nVerified against the tree — do not go looking for translation hooks in these,\nand do not add them without being asked:\n\n- **The root landing page `index.html`** has no i18n layer. Do not add\n  `data-lang` markup; put localized long-form content in the wiki instead. Its\n  one language-aware element is the `Languages (en/zh/…)` stat label, which just\n  enumerates the codes.\n- **`client/index.html`** is an English shell: `<html lang=\"en\">`,\n  `og:locale=en_US`, and English `<title>`/meta. The React app never reassigns\n  `document.documentElement.lang` when the user switches language — a known gap,\n  not something a translation PR is expected to fix.\n- **The CLI (`bin/ccam.js`), the MCP server (`mcp/`), the Express server\n  (`server/`), the desktop shell (`desktop/`), the VS Code extension, and the\n  statusline** contain no i18n wiring at all. Their output is English.\n- **`client/src/lib/event-summary.ts` and `event-grouping.ts`** build tool-event\n  headlines and bullets from English template literals (`Last message: …`,\n  `3 lines stdout`, `2 matches`). Their MODULE_GUIDE boilerplate claims strings\n  belong in i18n JSON, but neither file imports i18next. They sit outside the\n  key system today; do not \"fix\" them as part of a localization change.\n- **Number and date formatting is only locale-aware where the `format.ts`\n  helpers are used.** Most components call `toLocaleString()` / \n  `toLocaleString(undefined, …)` directly, which follows the *browser* locale\n  rather than the chosen UI language. In new code prefer `getCurrentLocale()`\n  from `format.ts`; leave existing call sites alone unless asked.\n\n## Workflow A — you changed content (the common case)\n\nFind what you touched in the left column and ship everything in the right column\n**in the same PR**.\n\n| You changed | You must also do |\n|---|---|\n| Added/renamed a UI string or i18n key | Add the key to `en` **and every other locale** in the same namespace file. Same key path, same value type, same `{{interpolation}}` tokens. |\n| Added a new namespace (new `*.json`) | Create it for every locale, then register the imports, the `resources` entry per language, and the `ns` array in `client/src/i18n/index.ts`. |\n| Added user-visible wiki text in `wiki/index.html` | Follow [`.claude/rules/wiki-i18n.md`](../../rules/wiki-i18n.md): scannable layer (the `PLAIN` selector set — `.logo-sub`, `.section-label`, `.nav-section`, `.nav-empty`, `.stat-label`, `.t-label`, `h2`/`h3`/`h4`, `th`, `.hero-desc`, plus `.nav-link` / `.hero-badge` trailing text nodes) → `T` in `wiki/script.js`; body prose (the `HTML_SEL` set — `p`, `li`, `td`, `th`, captions, `.callout-body > strong`, `.route-desc`, footer) → `wiki/i18n-content.js` keyed by whitespace-normalized `innerHTML`; new `alt`/`aria-label`/`title`/`placeholder` → `ATTRIBUTE_TRANSLATIONS`. Then bump `CACHE_NAME` in `wiki/sw.js` and the matching `?v=` query strings. |\n| Edited a section of `README.md` | Mirror the **same** edit at the corresponding section of `README-CN.md`, `README-VN.md`, `README-KO.md`, and `README-ES.md`. All four, every time. |\n| Changed behavior that the README/wiki document (env var, event type, route, CLI command, feature) | Run the [`update-project-docs`](../update-project-docs/SKILL.md) skill — it owns the change→docs mapping — then come back here for the translation propagation it triggers. |\n| Changed a documented count (plugins, skills, namespaces, languages) | The count is repeated across all five READMEs, `ARCHITECTURE.md`, `docs/*.md`, `index.html`, `wiki/index.html`, `wiki/i18n-content.js`, and asserted in `server/__tests__/plugins-marketplace.test.js`. Grep the old number repo-wide; update every hit. |\n\n## Workflow B — adding a new language\n\nThis is a large, exact, mechanical change. **Read\n[`references/new-language-checklist.md`](references/new-language-checklist.md)\nand work through it top to bottom** — it lists every file, in dependency order,\nwith the exact edit for each.\n\nThe three things contributors most often ship incomplete, stated up front:\n\n1. **The README mirror must be complete.** `README-<XX>.md` is a full mirror of\n   `README.md` — every section, every table row, every code block, every mermaid\n   diagram, in the same order. Do not summarize, do not drop \"less important\"\n   sections, do not stop halfway. Diff the heading list against `README.md`\n   before you open the PR — the audit script compares heading counts, which\n   catches a truncated mirror but not a reordered or silently condensed one.\n2. **Every app key must be translated.** All 15 namespaces × every key. The\n   parity test fails on a missing key, but it *passes* on a key you copied over\n   in English — so read your diff for untranslated leftovers.\n3. **The wiki must be translated completely**, not just the headings. That means\n   a full `<xx>` bundle in `wiki/i18n-content.js` (thousands of body strings), a\n   full `<xx>` block in `T`, `META`, and every entry of `ATTRIBUTE_TRANSLATIONS`\n   in `wiki/script.js`. A locale that only fills `T` renders a page with\n   translated headings over English paragraphs, which is worse than English.\n\n## What stays in English (all surfaces)\n\nNever translate: code inside `<code>`/backticks, commands, file and directory\npaths, URLs, env-var names, HTTP methods and status codes, CLI flags, code\nidentifiers, numbers with units, brand and product names (`Claude Code`, `MCP`,\n`Codex`), Claude Code hook event names (`PreToolUse`, `Stop`, …), and Claude\nCode tool names (`Bash`, `Agent`, `Read`, `Edit`). Translate only the prose\naround them. A block that is *entirely* code or identifiers needs no wiki\nentry — it correctly falls back to English.\n\n**Two different things are spelled `Agent`.** The Claude Code **tool** named\n`Agent` (alongside `Bash`, `Read`, `Edit`) is an identifier and stays literal in\n**every** locale, everywhere it appears — hook-event tables, tool lists, event\nnames. The **UI noun** for an agent (`common:agent` / `common:subagent`) is\nproduct vocabulary with a per-locale contract, and only that noun has the\nSpanish exception below. Never carry the exception into the tool name.\n\nThe UI noun's contract, asserted by `client/src/i18n/__tests__/i18n.test.ts`:\n`zh`, `vi`, and `ko` keep `Agent` / `Subagent` literal; `es` renders them\n`agente` / `subagente`. A new locale must decide this explicitly and add its\nrow to that test.\n\nTerminology, per-locale conventions, and the shared glossary live in\n[`references/translation-style.md`](references/translation-style.md). Read it\nbefore translating; drifting terminology across pages is the most common\nreview comment on localization PRs.\n\n## Two traps worth knowing before you edit the wiki\n\n1. **`client/tests/wiki-i18n.test.ts` parses `wiki/script.js` by exact source\n   markers.** It slices the file between literal strings — `\"  const T = \"` …\n   `\"\\n\\n  const PLAIN\"`, `\"  const ATTRIBUTE_TRANSLATIONS = \"` …\n   `\"\\n  const ATTR\"`, `\"  const META = \"` … `\"\\n  const trH\"` — and `eval`s\n   what it finds. Renaming, reordering, or re-indenting those declarations\n   breaks the test with a confusing error. Add locales *inside* the existing\n   objects; leave the declaration lines alone.\n2. **The wiki's chosen language lives in `localStorage[\"wiki-lang\"]`, not a URL\n   parameter.** There is no `?lang=` support. First visit falls back to a\n   `navigator.language` prefix ladder in `wiki/script.js`. To preview a locale,\n   use the switcher, or run\n   `localStorage.setItem(\"wiki-lang\", \"<xx>\")` in the console and reload.\n\n## This skill is mirrored for every agent\n\nThe canonical copy — and both scripts — live at `.claude/skills/i18n-parity/`.\nIt is mirrored, with links rewritten to repo-root-relative paths and an\n`agents/openai.yaml` interface added, to:\n\n- `.agents/skills/i18n-parity/` (the shared/OpenAI skill tree)\n- `.codex/skills/i18n-parity/` (Codex)\n\n**Editing this skill means regenerating the mirrors** — edit the canonical copy,\nthen run:\n\n```bash\nbash .claude/skills/i18n-parity/scripts/sync-agent-mirrors.sh\n```\n\n`i18n-audit.sh` runs that script in `--check` mode, so a stale mirror is a\nreported gap rather than silent drift. The mirrors carry no scripts: they point\nback at the canonical ones by repo-root path.\n\n## Verify (do not skip)\n\n```bash\n# 1. Cross-surface parity: locale sets, namespace files, key parity, switcher\n#    entries, wiki bundles, README mirrors and cross-links, agent-skill mirrors.\nbash .claude/skills/i18n-parity/scripts/i18n-audit.sh\n\n# 2. UI key/type/interpolation parity + locale formatting\nnpm run test:client\n\n# 3. Wiki live-DOM coverage, inline tags, metadata, cache versions\ncd client && npx vitest run tests/wiki-i18n.test.ts && cd ..\n\n# 4. Documented counts asserted against the source tree\nnpm run test:server\n\n# 5. The static wiki files and locale JSON are Prettier-managed\nnpm run format\n```\n\n`i18n-audit.sh` exits non-zero and names the exact file and locale for every\ngap. Every check is a structural one — a named thing is present or it is not —\nwith a single exception: the `wiki/i18n-content.js` bundle-size check is a\n**stub detector** (it flags a locale holding under 60% of the largest bundle's\nentries). Exact per-string wiki coverage is asserted by\n`client/tests/wiki-i18n.test.ts`, which walks the live DOM.\n\nState explicitly which surfaces you updated and which you intentionally skipped\n(with the reason), per the repo's verification policy in `CLAUDE.md`.\n\n## Tips\n\n- **Write the English first and get it right**, on all surfaces, before\n  translating anything. Every other locale is derived from it; re-translating\n  because the English moved is the biggest waste in this workflow.\n- To find where a string already lives: `grep -rn \"<neighbouring English text>\"\n  client/src/i18n/locales/en wiki/i18n-content.js wiki/script.js`.\n- When adding a language, one locale per subagent is fine for the *wiki body*\n  bundle (it is large), but keep the README mirror with a single author so the\n  section order and terminology stay coherent.\n- Wiki edits are cache-first: forgetting the `CACHE_NAME` / `?v=` bump means\n  returning visitors never see the translation you just shipped.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/.claude/skills/i18n-parity","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":".claude/skills/i18n-parity/SKILL.md","defaultBranch":"master"},"readme":"# i18n Parity\n\nThis repository is localized on **five independent surfaces**, each with its own\nmechanism. A change that lands on one and not the others leaves the product\nhalf-translated: the English falls through, and the gap is invisible to anyone\nworking in English. This skill states the invariant, maps every surface to the\nexact files, and gives one command that proves parity.\n\n**The invariant: English is the source of truth on every surface, and no change\nis done until every supported language carries it in the same PR.** A fallback\nto English is a safety net, never a completed translation.\n\nSupported languages are declared in one place — `supportedLngs` in\n[`client/src/i18n/index.ts`](../../../client/src/i18n/index.ts). Today:\n**`en`, `zh`, `vi`, `ko`, `es`**. Everything below derives from that list; the\naudit script reads it rather than hard-coding.\n\n## The five surfaces\n\n| # | Surface | English source of truth | Translations live in | Automated gate |\n|---|---|---|---|---|\n| 1 | **Dashboard UI** | `client/src/i18n/locales/en/*.json` | `client/src/i18n/locales/<xx>/*.json` (same 15 namespaces) | `client/src/i18n/__tests__/i18n.test.ts` — key, type, and interpolation-token parity |\n| 2 | **Wiki page** | English text in the `wiki/index.html` DOM | `wiki/script.js` (`T`, `ATTRIBUTE_TRANSLATIONS`, `META`, `languageLabels`, the two language ladders) + `wiki/i18n-content.js` (`window.__WIKI_CONTENT_I18N`, both the body bundles and `plain`) | `client/tests/wiki-i18n.test.ts` — live-DOM prose coverage, inline-tag preservation, block-length budgets, asset-version sync |\n| 3 | **Mirrored READMEs** | `README.md` | `README-CN.md` (zh), `README-VN.md` (vi), `README-KO.md` (ko), `README-ES.md` (es) | partial — `scripts/i18n-audit.sh` (existence, heading count, cross-links) and `server/__tests__/plugins-marketplace.test.js` (documented counts); prose parity is review-only |\n| 4 | **Language switchers** | — | `client/src/components/Sidebar.tsx`, `client/src/lib/paletteCommands.ts`, the two `.lang-select-menu` blocks in `wiki/index.html`, `nav.json` `languageNames` / `languageShort` | `scripts/i18n-audit.sh` |\n| 5 | **Locale-aware formatting** | — | `client/src/lib/format.ts` (`SupportedLanguage` union, `getCurrentLanguage()` whitelist, `getCurrentLocale()` BCP-47 map) | `client/src/lib/__tests__/format.test.ts` |\n\n### What is deliberately NOT localized\n\nVerified against the tree — do not go looking for translation hooks in these,\nand do not add them without being asked:\n\n- **The root landing page `index.html`** has no i18n layer. Do not add\n  `data-lang` markup; put localized long-form content in the wiki instead. Its\n  one language-aware element is the `Languages (en/zh/…)` stat label, which just\n  enumerates the codes.\n- **`client/index.html`** is an English shell: `<html lang=\"en\">`,\n  `og:locale=en_US`, and English `<title>`/meta. The React app never reassigns\n  `document.documentElement.lang` when the user switches language — a known gap,\n  not something a translation PR is expected to fix.\n- **The CLI (`bin/ccam.js`), the MCP server (`mcp/`), the Express server\n  (`server/`), the desktop shell (`desktop/`), the VS Code extension, and the\n  statusline** contain no i18n wiring at all. Their output is English.\n- **`client/src/lib/event-summary.ts` and `event-grouping.ts`** build tool-event\n  headlines and bullets from English template literals (`Last message: …`,\n  `3 lines stdout`, `2 matches`). Their MODULE_GUIDE boilerplate claims strings\n  belong in i18n JSON, but neither file imports i18next. They sit outside the\n  key system today; do not \"fix\" them as part of a localization change.\n- **Number and date formatting is only locale-aware where the `format.ts`\n  helpers are used.** Most components call `toLocaleString()` / \n  `toLocaleString(undefined, …)` directly, which follows the *browser* locale\n  rather than the chosen UI language. In new code prefer `getCurrentLocale()`\n  from `format.ts`; leave existing call sites alone un","createdAt":"2026-09-25T12:52:19.654Z","updatedAt":"2026-09-25T12:52:19.654Z"},{"id":"cmugynfzh039aqu06old0n9r4","slug":"hoangsonww-claude-code-agent-monitor-i18n-parity-3","name":"i18n-parity","description":"MANDATORY for every coding agent and contributor touching localized content — keep all five localization surfaces (dashboard UI keys, wiki page, mirrored READMEs, locale-aware formatting, language switchers) in parity across every supported language. Use automatically (without being asked) whenever you add or change user-visible UI copy, add an i18n key, edit README.md, edit wiki/index.html, or change docs that the READMEs and wiki mirror — and use the full new-language checklist whenever adding a language (a new README-XX.md, a new client/src/i18n/locales/<xx>/ directory, or a new lang-option in the wiki).","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"i18n-parity","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"MANDATORY for every coding agent and contributor touching localized content — keep all five localization surfaces (dashboard UI keys, wiki page, mirrored READMEs, locale-aware formatting, language switchers) in parity across every supported language. Use automatically (without being asked) whenever you add or change user-visible UI copy, add an i18n key, edit README.md, edit wiki/index.html, or change docs that the READMEs and wiki mirror — and use the full new-language checklist whenever adding a language (a new README-XX.md, a new client/src/i18n/locales/<xx>/ directory, or a new lang-option in the wiki).","permissions":[],"systemPrompt":"> **Mirror.** The canonical copy of this skill — and the `i18n-audit.sh`\n> script it tells you to run — live at `.claude/skills/i18n-parity/`.\n> Keep the two in sync; edit the canonical copy first.\n\n# i18n Parity\n\nThis repository is localized on **five independent surfaces**, each with its own\nmechanism. A change that lands on one and not the others leaves the product\nhalf-translated: the English falls through, and the gap is invisible to anyone\nworking in English. This skill states the invariant, maps every surface to the\nexact files, and gives one command that proves parity.\n\n**The invariant: English is the source of truth on every surface, and no change\nis done until every supported language carries it in the same PR.** A fallback\nto English is a safety net, never a completed translation.\n\nSupported languages are declared in one place — `supportedLngs` in\n`client/src/i18n/index.ts`. Today:\n**`en`, `zh`, `vi`, `ko`, `es`**. Everything below derives from that list; the\naudit script reads it rather than hard-coding.\n\n## The five surfaces\n\n| # | Surface | English source of truth | Translations live in | Automated gate |\n|---|---|---|---|---|\n| 1 | **Dashboard UI** | `client/src/i18n/locales/en/*.json` | `client/src/i18n/locales/<xx>/*.json` (same 15 namespaces) | `client/src/i18n/__tests__/i18n.test.ts` — key, type, and interpolation-token parity |\n| 2 | **Wiki page** | English text in the `wiki/index.html` DOM | `wiki/script.js` (`T`, `ATTRIBUTE_TRANSLATIONS`, `META`, `languageLabels`, the two language ladders) + `wiki/i18n-content.js` (`window.__WIKI_CONTENT_I18N`, both the body bundles and `plain`) | `client/tests/wiki-i18n.test.ts` — live-DOM prose coverage, inline-tag preservation, block-length budgets, asset-version sync |\n| 3 | **Mirrored READMEs** | `README.md` | `README-CN.md` (zh), `README-VN.md` (vi), `README-KO.md` (ko), `README-ES.md` (es) | partial — `scripts/i18n-audit.sh` (existence, heading count, cross-links) and `server/__tests__/plugins-marketplace.test.js` (documented counts); prose parity is review-only |\n| 4 | **Language switchers** | — | `client/src/components/Sidebar.tsx`, `client/src/lib/paletteCommands.ts`, the two `.lang-select-menu` blocks in `wiki/index.html`, `nav.json` `languageNames` / `languageShort` | `scripts/i18n-audit.sh` |\n| 5 | **Locale-aware formatting** | — | `client/src/lib/format.ts` (`SupportedLanguage` union, `getCurrentLanguage()` whitelist, `getCurrentLocale()` BCP-47 map) | `client/src/lib/__tests__/format.test.ts` |\n\n### What is deliberately NOT localized\n\nVerified against the tree — do not go looking for translation hooks in these,\nand do not add them without being asked:\n\n- **The root landing page `index.html`** has no i18n layer. Do not add\n  `data-lang` markup; put localized long-form content in the wiki instead. Its\n  one language-aware element is the `Languages (en/zh/…)` stat label, which just\n  enumerates the codes.\n- **`client/index.html`** is an English shell: `<html lang=\"en\">`,\n  `og:locale=en_US`, and English `<title>`/meta. The React app never reassigns\n  `document.documentElement.lang` when the user switches language — a known gap,\n  not something a translation PR is expected to fix.\n- **The CLI (`bin/ccam.js`), the MCP server (`mcp/`), the Express server\n  (`server/`), the desktop shell (`desktop/`), the VS Code extension, and the\n  statusline** contain no i18n wiring at all. Their output is English.\n- **`client/src/lib/event-summary.ts` and `event-grouping.ts`** build tool-event\n  headlines and bullets from English template literals (`Last message: …`,\n  `3 lines stdout`, `2 matches`). Their MODULE_GUIDE boilerplate claims strings\n  belong in i18n JSON, but neither file imports i18next. They sit outside the\n  key system today; do not \"fix\" them as part of a localization change.\n- **Number and date formatting is only locale-aware where the `format.ts`\n  helpers are used.** Most components call `toLocaleString()` / \n  `toLocaleString(undefined, …)` directly, which follows the *browser* locale\n  rather than the chosen UI language. In new code prefer `getCurrentLocale()`\n  from `format.ts`; leave existing call sites alone unless asked.\n\n## Workflow A — you changed content (the common case)\n\nFind what you touched in the left column and ship everything in the right column\n**in the same PR**.\n\n| You changed | You must also do |\n|---|---|\n| Added/renamed a UI string or i18n key | Add the key to `en` **and every other locale** in the same namespace file. Same key path, same value type, same `{{interpolation}}` tokens. |\n| Added a new namespace (new `*.json`) | Create it for every locale, then register the imports, the `resources` entry per language, and the `ns` array in `client/src/i18n/index.ts`. |\n| Added user-visible wiki text in `wiki/index.html` | Follow `.claude/rules/wiki-i18n.md`: scannable layer (the `PLAIN` selector set — `.logo-sub`, `.section-label`, `.nav-section`, `.nav-empty`, `.stat-label`, `.t-label`, `h2`/`h3`/`h4`, `th`, `.hero-desc`, plus `.nav-link` / `.hero-badge` trailing text nodes) → `T` in `wiki/script.js`; body prose (the `HTML_SEL` set — `p`, `li`, `td`, `th`, captions, `.callout-body > strong`, `.route-desc`, footer) → `wiki/i18n-content.js` keyed by whitespace-normalized `innerHTML`; new `alt`/`aria-label`/`title`/`placeholder` → `ATTRIBUTE_TRANSLATIONS`. Then bump `CACHE_NAME` in `wiki/sw.js` and the matching `?v=` query strings. |\n| Edited a section of `README.md` | Mirror the **same** edit at the corresponding section of `README-CN.md`, `README-VN.md`, `README-KO.md`, and `README-ES.md`. All four, every time. |\n| Changed behavior that the README/wiki document (env var, event type, route, CLI command, feature) | Run the `update-project-docs` (`.claude/skills/update-project-docs/SKILL.md`) skill — it owns the change→docs mapping — then come back here for the translation propagation it triggers. |\n| Changed a documented count (plugins, skills, namespaces, languages) | The count is repeated across all five READMEs, `ARCHITECTURE.md`, `docs/*.md`, `index.html`, `wiki/index.html`, `wiki/i18n-content.js`, and asserted in `server/__tests__/plugins-marketplace.test.js`. Grep the old number repo-wide; update every hit. |\n\n## Workflow B — adding a new language\n\nThis is a large, exact, mechanical change. **Read\n[`references/new-language-checklist.md`](references/new-language-checklist.md)\nand work through it top to bottom** — it lists every file, in dependency order,\nwith the exact edit for each.\n\nThe three things contributors most often ship incomplete, stated up front:\n\n1. **The README mirror must be complete.** `README-<XX>.md` is a full mirror of\n   `README.md` — every section, every table row, every code block, every mermaid\n   diagram, in the same order. Do not summarize, do not drop \"less important\"\n   sections, do not stop halfway. Diff the heading list against `README.md`\n   before you open the PR — the audit script compares heading counts, which\n   catches a truncated mirror but not a reordered or silently condensed one.\n2. **Every app key must be translated.** All 15 namespaces × every key. The\n   parity test fails on a missing key, but it *passes* on a key you copied over\n   in English — so read your diff for untranslated leftovers.\n3. **The wiki must be translated completely**, not just the headings. That means\n   a full `<xx>` bundle in `wiki/i18n-content.js` (thousands of body strings), a\n   full `<xx>` block in `T`, `META`, and every entry of `ATTRIBUTE_TRANSLATIONS`\n   in `wiki/script.js`. A locale that only fills `T` renders a page with\n   translated headings over English paragraphs, which is worse than English.\n\n## What stays in English (all surfaces)\n\nNever translate: code inside `<code>`/backticks, commands, file and directory\npaths, URLs, env-var names, HTTP methods and status codes, CLI flags, code\nidentifiers, numbers with units, brand and product names (`Claude Code`, `MCP`,\n`Codex`), Claude Code hook event names (`PreToolUse`, `Stop`, …), and Claude\nCode tool names (`Bash`, `Agent`, `Read`, `Edit`). Translate only the prose\naround them. A block that is *entirely* code or identifiers needs no wiki\nentry — it correctly falls back to English.\n\n**Two different things are spelled `Agent`.** The Claude Code **tool** named\n`Agent` (alongside `Bash`, `Read`, `Edit`) is an identifier and stays literal in\n**every** locale, everywhere it appears — hook-event tables, tool lists, event\nnames. The **UI noun** for an agent (`common:agent` / `common:subagent`) is\nproduct vocabulary with a per-locale contract, and only that noun has the\nSpanish exception below. Never carry the exception into the tool name.\n\nThe UI noun's contract, asserted by `client/src/i18n/__tests__/i18n.test.ts`:\n`zh`, `vi`, and `ko` keep `Agent` / `Subagent` literal; `es` renders them\n`agente` / `subagente`. A new locale must decide this explicitly and add its\nrow to that test.\n\nTerminology, per-locale conventions, and the shared glossary live in\n[`references/translation-style.md`](references/translation-style.md). Read it\nbefore translating; drifting terminology across pages is the most common\nreview comment on localization PRs.\n\n## Two traps worth knowing before you edit the wiki\n\n1. **`client/tests/wiki-i18n.test.ts` parses `wiki/script.js` by exact source\n   markers.** It slices the file between literal strings — `\"  const T = \"` …\n   `\"\\n\\n  const PLAIN\"`, `\"  const ATTRIBUTE_TRANSLATIONS = \"` …\n   `\"\\n  const ATTR\"`, `\"  const META = \"` … `\"\\n  const trH\"` — and `eval`s\n   what it finds. Renaming, reordering, or re-indenting those declarations\n   breaks the test with a confusing error. Add locales *inside* the existing\n   objects; leave the declaration lines alone.\n2. **The wiki's chosen language lives in `localStorage[\"wiki-lang\"]`, not a URL\n   parameter.** There is no `?lang=` support. First visit falls back to a\n   `navigator.language` prefix ladder in `wiki/script.js`. To preview a locale,\n   use the switcher, or run\n   `localStorage.setItem(\"wiki-lang\", \"<xx>\")` in the console and reload.\n\n## This skill is mirrored for every agent\n\nThe canonical copy — and both scripts — live at `.claude/skills/i18n-parity/`.\nIt is mirrored, with links rewritten to repo-root-relative paths and an\n`agents/openai.yaml` interface added, to:\n\n- `.agents/skills/i18n-parity/` (the shared/OpenAI skill tree)\n- `.codex/skills/i18n-parity/` (Codex)\n\n**Editing this skill means regenerating the mirrors** — edit the canonical copy,\nthen run:\n\n```bash\nbash .claude/skills/i18n-parity/scripts/sync-agent-mirrors.sh\n```\n\n`i18n-audit.sh` runs that script in `--check` mode, so a stale mirror is a\nreported gap rather than silent drift. The mirrors carry no scripts: they point\nback at the canonical ones by repo-root path.\n\n## Verify (do not skip)\n\n```bash\n# 1. Cross-surface parity: locale sets, namespace files, key parity, switcher\n#    entries, wiki bundles, README mirrors and cross-links, agent-skill mirrors.\nbash .claude/skills/i18n-parity/scripts/i18n-audit.sh\n\n# 2. UI key/type/interpolation parity + locale formatting\nnpm run test:client\n\n# 3. Wiki live-DOM coverage, inline tags, metadata, cache versions\ncd client && npx vitest run tests/wiki-i18n.test.ts && cd ..\n\n# 4. Documented counts asserted against the source tree\nnpm run test:server\n\n# 5. The static wiki files and locale JSON are Prettier-managed\nnpm run format\n```\n\n`i18n-audit.sh` exits non-zero and names the exact file and locale for every\ngap. Every check is a structural one — a named thing is present or it is not —\nwith a single exception: the `wiki/i18n-content.js` bundle-size check is a\n**stub detector** (it flags a locale holding under 60% of the largest bundle's\nentries). Exact per-string wiki coverage is asserted by\n`client/tests/wiki-i18n.test.ts`, which walks the live DOM.\n\nState explicitly which surfaces you updated and which you intentionally skipped\n(with the reason), per the repo's verification policy in `CLAUDE.md`.\n\n## Tips\n\n- **Write the English first and get it right**, on all surfaces, before\n  translating anything. Every other locale is derived from it; re-translating\n  because the English moved is the biggest waste in this workflow.\n- To find where a string already lives: `grep -rn \"<neighbouring English text>\"\n  client/src/i18n/locales/en wiki/i18n-content.js wiki/script.js`.\n- When adding a language, one locale per subagent is fine for the *wiki body*\n  bundle (it is large), but keep the README mirror with a single author so the\n  section order and terminology stay coherent.\n- Wiki edits are cache-first: forgetting the `CACHE_NAME` / `?v=` bump means\n  returning visitors never see the translation you just shipped.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/.codex/skills/i18n-parity","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":".codex/skills/i18n-parity/SKILL.md","defaultBranch":"master"},"readme":"> **Mirror.** The canonical copy of this skill — and the `i18n-audit.sh`\n> script it tells you to run — live at `.claude/skills/i18n-parity/`.\n> Keep the two in sync; edit the canonical copy first.\n\n# i18n Parity\n\nThis repository is localized on **five independent surfaces**, each with its own\nmechanism. A change that lands on one and not the others leaves the product\nhalf-translated: the English falls through, and the gap is invisible to anyone\nworking in English. This skill states the invariant, maps every surface to the\nexact files, and gives one command that proves parity.\n\n**The invariant: English is the source of truth on every surface, and no change\nis done until every supported language carries it in the same PR.** A fallback\nto English is a safety net, never a completed translation.\n\nSupported languages are declared in one place — `supportedLngs` in\n`client/src/i18n/index.ts`. Today:\n**`en`, `zh`, `vi`, `ko`, `es`**. Everything below derives from that list; the\naudit script reads it rather than hard-coding.\n\n## The five surfaces\n\n| # | Surface | English source of truth | Translations live in | Automated gate |\n|---|---|---|---|---|\n| 1 | **Dashboard UI** | `client/src/i18n/locales/en/*.json` | `client/src/i18n/locales/<xx>/*.json` (same 15 namespaces) | `client/src/i18n/__tests__/i18n.test.ts` — key, type, and interpolation-token parity |\n| 2 | **Wiki page** | English text in the `wiki/index.html` DOM | `wiki/script.js` (`T`, `ATTRIBUTE_TRANSLATIONS`, `META`, `languageLabels`, the two language ladders) + `wiki/i18n-content.js` (`window.__WIKI_CONTENT_I18N`, both the body bundles and `plain`) | `client/tests/wiki-i18n.test.ts` — live-DOM prose coverage, inline-tag preservation, block-length budgets, asset-version sync |\n| 3 | **Mirrored READMEs** | `README.md` | `README-CN.md` (zh), `README-VN.md` (vi), `README-KO.md` (ko), `README-ES.md` (es) | partial — `scripts/i18n-audit.sh` (existence, heading count, cross-links) and `server/__tests__/plugins-marketplace.test.js` (documented counts); prose parity is review-only |\n| 4 | **Language switchers** | — | `client/src/components/Sidebar.tsx`, `client/src/lib/paletteCommands.ts`, the two `.lang-select-menu` blocks in `wiki/index.html`, `nav.json` `languageNames` / `languageShort` | `scripts/i18n-audit.sh` |\n| 5 | **Locale-aware formatting** | — | `client/src/lib/format.ts` (`SupportedLanguage` union, `getCurrentLanguage()` whitelist, `getCurrentLocale()` BCP-47 map) | `client/src/lib/__tests__/format.test.ts` |\n\n### What is deliberately NOT localized\n\nVerified against the tree — do not go looking for translation hooks in these,\nand do not add them without being asked:\n\n- **The root landing page `index.html`** has no i18n layer. Do not add\n  `data-lang` markup; put localized long-form content in the wiki instead. Its\n  one language-aware element is the `Languages (en/zh/…)` stat label, which just\n  enumerates the codes.\n- **`client/index.html`** is an English shell: `<html lang=\"en\">`,\n  `og:locale=en_US`, and English `<title>`/meta. The React app never reassigns\n  `document.documentElement.lang` when the user switches language — a known gap,\n  not something a translation PR is expected to fix.\n- **The CLI (`bin/ccam.js`), the MCP server (`mcp/`), the Express server\n  (`server/`), the desktop shell (`desktop/`), the VS Code extension, and the\n  statusline** contain no i18n wiring at all. Their output is English.\n- **`client/src/lib/event-summary.ts` and `event-grouping.ts`** build tool-event\n  headlines and bullets from English template literals (`Last message: …`,\n  `3 lines stdout`, `2 matches`). Their MODULE_GUIDE boilerplate claims strings\n  belong in i18n JSON, but neither file imports i18next. They sit outside the\n  key system today; do not \"fix\" them as part of a localization change.\n- **Number and date formatting is only locale-aware where the `format.ts`\n  helpers are used.** Most components call `toLocaleString()` / \n  `toLocaleString(undefined, …)` directly, which","createdAt":"2026-09-25T12:52:19.757Z","updatedAt":"2026-09-25T12:52:19.757Z"},{"id":"cmugyng0h039jqu061uc2vyxs","slug":"hoangsonww-claude-code-agent-monitor-release-guard-2","name":"release-guard","description":"Run release-readiness checks for this repository. Use when validating docs, scripts, verification coverage, and operational safety before merge or release.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"release-guard","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Run release-readiness checks for this repository. Use when validating docs, scripts, verification coverage, and operational safety before merge or release.","permissions":[],"systemPrompt":"# Release Guard Skill\n\n## Workflow\n- Check command consistency across docs and `package.json`.\n- Verify architecture docs align with current code paths.\n- Validate that safety controls are still documented and enforced.\n- Report pass/fail with concrete file references.\n\n## Focus areas\n- Hook flow and failure behavior.\n- Session/agent lifecycle semantics.\n- MCP safety gates and host setup instructions.\n- Troubleshooting accuracy.\n\n## References\n- `references/release-checklist.md`","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/.codex/skills/release-guard","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":".codex/skills/release-guard/SKILL.md","defaultBranch":"master"},"readme":"# Release Guard Skill\n\n## Workflow\n- Check command consistency across docs and `package.json`.\n- Verify architecture docs align with current code paths.\n- Validate that safety controls are still documented and enforced.\n- Report pass/fail with concrete file references.\n\n## Focus areas\n- Hook flow and failure behavior.\n- Session/agent lifecycle semantics.\n- MCP safety gates and host setup instructions.\n- Troubleshooting accuracy.\n\n## References\n- `references/release-checklist.md`","createdAt":"2026-09-25T12:52:19.794Z","updatedAt":"2026-09-25T12:52:19.794Z"},{"id":"cmugynfzx039dqu06fov456ga","slug":"hoangsonww-claude-code-agent-monitor-mcp-maintainer-2","name":"mcp-maintainer","description":"Operate and maintain the local MCP server for this repository. Use for MCP tool updates, policy-guard changes, host configuration, and MCP runtime troubleshooting.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"mcp-maintainer","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Operate and maintain the local MCP server for this repository. Use for MCP tool updates, policy-guard changes, host configuration, and MCP runtime troubleshooting.","permissions":[],"systemPrompt":"# MCP Maintainer Skill\n\n## Workflow\n- Confirm dashboard API availability (`/api/health`).\n- Inspect affected MCP domain modules under `mcp/src/tools/domains/`.\n- Preserve safety gates in `mcp/src/policy/tool-guards.ts`.\n- Validate with `npm run mcp:typecheck` and `npm run mcp:build`.\n\n## Safety rules\n- Keep loopback-only target checks enabled.\n- Keep mutating and destructive tools behind explicit flags.\n- Do not log protocol data to stdout.\n\n## References\n- `references/tool-domain-map.md`\n- `references/operations-runbook.md`","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/.codex/skills/mcp-maintainer","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":".codex/skills/mcp-maintainer/SKILL.md","defaultBranch":"master"},"readme":"# MCP Maintainer Skill\n\n## Workflow\n- Confirm dashboard API availability (`/api/health`).\n- Inspect affected MCP domain modules under `mcp/src/tools/domains/`.\n- Preserve safety gates in `mcp/src/policy/tool-guards.ts`.\n- Validate with `npm run mcp:typecheck` and `npm run mcp:build`.\n\n## Safety rules\n- Keep loopback-only target checks enabled.\n- Keep mutating and destructive tools behind explicit flags.\n- Do not log protocol data to stdout.\n\n## References\n- `references/tool-domain-map.md`\n- `references/operations-runbook.md`","createdAt":"2026-09-25T12:52:19.773Z","updatedAt":"2026-09-25T12:52:19.773Z"},{"id":"cmugyng06039gqu067bsltzzi","slug":"hoangsonww-claude-code-agent-monitor-push-to-forked-pr-3","name":"push-to-forked-pr","description":"Push the current working tree directly to a GitHub PR whose head lives on a **fork**, without creating a new branch and without pushing to `origin` (which is usually the upstream). Invoke when the user says things like \"push straight to PR","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"push-to-forked-pr","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Push the current working tree directly to a GitHub PR whose head lives on a **fork**, without creating a new branch and without pushing to `origin` (which is usually the upstream). Invoke when the user says things like \"push straight to PR","permissions":[],"systemPrompt":"# push-to-forked-pr\n\nThe whole point of this skill: **`origin` is usually the upstream, but the PR's head is on someone else's fork.** Pushing to `origin` updates the upstream's branch, not the PR. You have to push to the fork.\n\nGitHub allows this in two situations:\n\n1. You are the **fork owner** — straightforward, you own that branch.\n2. You are an **upstream maintainer** and the PR has `maintainerCanModify: true` (the \"Allow edits from maintainers\" checkbox the PR author leaves on by default). GitHub then lets the upstream's auth push to the fork branch.\n\nIf neither holds, abort and tell the user only the fork owner can push.\n\n---\n\n## Procedure\n\n### 1. Read the PR's head metadata\n\n```bash\nPR_NUMBER=<N>\ngh pr view \"$PR_NUMBER\" --json state,headRefName,headRefOid,headRepository,headRepositoryOwner,maintainerCanModify,url\n```\n\nCapture:\n\n- `state` — bail if not `\"OPEN\"`.\n- `headRepository.nameWithOwner` → the **fork** (e.g. `someone/Repo`).\n- `headRepositoryOwner.login` → the fork owner.\n- `headRefName` → the branch on the fork (usually matches local).\n- `headRefOid` → the PR's current head SHA. Your local HEAD must be a descendant.\n- `maintainerCanModify` → must be `true` if you are not the fork owner.\n\nIf `headRepository.nameWithOwner` matches the upstream's `nameWithOwner`, this PR is **internal**:\n\n```bash\nHEAD_BRANCH=$(gh pr view \"$PR_NUMBER\" --json headRefName --jq .headRefName)\nHEAD_REF_OID=$(gh pr view \"$PR_NUMBER\" --json headRefOid --jq .headRefOid)\ngit merge-base --is-ancestor \"$HEAD_REF_OID\" HEAD && echo ok || echo NOT-DESCENDANT   # abort if NOT-DESCENDANT\ngit push origin \"HEAD:${HEAD_BRANCH}\"\n```\n\nExit the skill once this push lands — do not continue to the fork-push steps below.\n\n### 2. Confirm you can actually push\n\n```bash\ngh auth status                        # who am I?\ngit remote get-url origin             # fetch URL — confirm origin is the UPSTREAM, not the fork\ngit remote get-url --push origin      # push URL — can differ from the fetch URL if `pushurl` is configured\n```\n\nFor the internal-PR path above, compare the **push** URL (not just the fetch URL) against the expected upstream `nameWithOwner` before relying on `git push origin` — a configured `pushurl` can silently redirect the push to a different destination than the fetch URL suggests.\n\nYou may push to the fork branch iff the active gh user is:\n\n- the fork owner, **or**\n- a writer on the upstream **and** `maintainerCanModify == true`.\n\nOtherwise stop. Tell the user the PR doesn't allow maintainer edits.\n\n### 3. Sanity-check the local branch\n\n```bash\ngit branch --show-current\ngit rev-parse HEAD\ngit merge-base --is-ancestor <headRefOid> HEAD && echo ok || echo NOT-DESCENDANT\n```\n\n- If `headRefName` differs from the current local branch, that's fine — you'll push with an explicit refspec `local:headRefName` in step 6.\n- If local HEAD is **not** a descendant of `headRefOid`, stop. Either you're on the wrong branch, or someone else has pushed to the PR since you forked from it. Do not force-push without explicit user permission.\n\n### 4. Verify commit author identity before committing\n\n```bash\ngit config user.email\n```\n\nIf it is empty, hostname-shaped (`user@host.local`, `*@*.tail*.ts.net`, etc.), or otherwise not a real email tied to a GitHub account, the commit will appear \"unverified\" on GitHub and won't link to a profile. Override per-commit:\n\n```bash\ngit -c user.name=\"<Name>\"  -c user.email=\"<email>\"  commit -F /tmp/commit-msg.txt\n```\n\nTo correct an already-made commit before push:\n\n```bash\ngit -c user.name=\"...\" -c user.email=\"...\" commit --amend --reset-author -C HEAD --no-edit\n```\n\nPrefer the user's documented identity (e.g. from `CLAUDE.md` or earlier in the session) over the local git config when the local config is clearly machine-generated.\n\n### 5. Run the repo's full verification suite — **before** pushing\n\nThe user almost always asks for this explicitly. In this repo (see `CLAUDE.md` for the authoritative list):\n\n```bash\nnpm run format:check                        # tracked files only; local .worktrees/ noise is not yours to fix\nnpm run test:server                         # backend touched\nnpm run test:client                         # frontend, wiki i18n, screen snapshots\nnpm run mcp:typecheck && npm run mcp:build  # mcp/ touched\nnpm --prefix mcp test                       # mcp unit suite\nnpm run build                               # production client build\nbash .claude/skills/file-headers/scripts/check-headers.sh\n```\n\nPer-package extras when those areas are touched:\n\n```bash\nnpm --prefix desktop run build && npm --prefix desktop test\nnode scripts/validate-agent-extensions.js\n```\n\nStop on the first red. Report which check failed and **do not push**.\n\n### 6. Stage, commit, push to the fork (not origin)\n\nExclude session-local noise (`.claude/settings.local.json` is harness state, not work) and never stage blindly:\n\n```bash\ngit status                          # review exactly what changed\ngit add <path1> <path2> ...         # stage only the files for this PR's change — never `git add -A`\ngit status                          # confirm the staged diff matches intent (and excludes .claude/settings.local.json) before committing\n```\n\nCommit with a real body (use `-F` for multi-paragraph messages), ending with the `Co-Authored-By` trailer your harness requires — copy it verbatim from the harness instructions rather than from this file, so the model name never goes stale.\n\nThen push to the fork. Add a one-off remote so it's clear in `git remote -v` and the destination URL doesn't end up in the user's shell history:\n\n```bash\nFORK_REPO=$(gh pr view \"$PR_NUMBER\" --json headRepository --jq '.headRepository.nameWithOwner')\nHEAD_BRANCH=$(gh pr view \"$PR_NUMBER\" --json headRefName   --jq .headRefName)\nLOCAL_BRANCH=$(git branch --show-current)\n\nif [ -z \"$LOCAL_BRANCH\" ]; then\n  echo \"Detached HEAD — refusing to push (source ref would be empty and delete ${HEAD_BRANCH} on the fork).\" >&2\n  exit 1\nfi\n\ngit remote add \"pr${PR_NUMBER}-fork\" \"https://github.com/${FORK_REPO}.git\"\ngit push \"pr${PR_NUMBER}-fork\" \"HEAD:${HEAD_BRANCH}\"    # push HEAD itself, not \"$LOCAL_BRANCH\" — safe even if the local branch name differs\n```\n\n`gh` configures git's credential helper, so HTTPS pushes pick up the right token automatically. Don't rewrite to SSH unless asked.\n\n### 7. Verify the push landed on the PR\n\n```bash\nLOCAL_HEAD=$(git rev-parse HEAD)\nPR_HEAD=$(gh pr view \"$PR_NUMBER\" --json headRefOid --jq .headRefOid)\n[ \"$LOCAL_HEAD\" = \"$PR_HEAD\" ] && echo \"PR updated ✓\" || echo \"MISMATCH — push went somewhere else\"\n```\n\nReport the new HEAD SHA, the PR URL, and the diff stat back to the user.\n\n---\n\n## Common failure modes\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| `Permission denied` on push | Authenticated as the wrong user, or `maintainerCanModify: false` and you are not the fork owner | Abort. Only the fork owner can push to the branch. |\n| `! [rejected] non-fast-forward` | Someone else pushed to the PR since you started | `git fetch \"pr${PR_NUMBER}-fork\" \"${HEAD_BRANCH}\"`, then rebase or merge. **Never** force-push someone else's PR branch without explicit permission. |\n| Push succeeds, but PR head SHA doesn't update | You pushed to a branch with a different name on the fork | Re-check `headRefName` and use explicit refspec `LOCAL:HEAD_BRANCH`. |\n| Commit shows \"unverified\" on the PR | Author email isn't tied to a verified GitHub account | Amend with the user's real identity (step 4) and push again (fast-forward, not force). |\n| `Could not resolve host` | Network or proxy issue | Surface the error. Don't blanket-retry. |\n\n---\n\n## Hard rules\n\n- **Never push to `origin`** when origin is the upstream and the PR head is a fork. Always verify with `git remote -v` and `gh pr view`.\n- **Never create a new branch.** The user pushed because they want *this* PR updated; a new branch defeats that.\n- **Never force-push** to a fork PR branch without explicit user permission. The fork owner will lose any commits they had locally.\n- **Always run the repo's tests/builds first.** A fork-PR push triggers CI on the fork *and* surfaces on the upstream's PR view — pushing red code is doubly visible.\n- **Always exclude `.claude/settings.local.json`** unless the user explicitly says to include it. It's harness session state, not the work.\n- **Never stage with `git add -A`.** Stage explicit paths for the requested change so unrelated files or local secrets can't ride along.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/.codex/skills/push-to-forked-pr","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":".codex/skills/push-to-forked-pr/SKILL.md","defaultBranch":"master"},"readme":"# push-to-forked-pr\n\nThe whole point of this skill: **`origin` is usually the upstream, but the PR's head is on someone else's fork.** Pushing to `origin` updates the upstream's branch, not the PR. You have to push to the fork.\n\nGitHub allows this in two situations:\n\n1. You are the **fork owner** — straightforward, you own that branch.\n2. You are an **upstream maintainer** and the PR has `maintainerCanModify: true` (the \"Allow edits from maintainers\" checkbox the PR author leaves on by default). GitHub then lets the upstream's auth push to the fork branch.\n\nIf neither holds, abort and tell the user only the fork owner can push.\n\n---\n\n## Procedure\n\n### 1. Read the PR's head metadata\n\n```bash\nPR_NUMBER=<N>\ngh pr view \"$PR_NUMBER\" --json state,headRefName,headRefOid,headRepository,headRepositoryOwner,maintainerCanModify,url\n```\n\nCapture:\n\n- `state` — bail if not `\"OPEN\"`.\n- `headRepository.nameWithOwner` → the **fork** (e.g. `someone/Repo`).\n- `headRepositoryOwner.login` → the fork owner.\n- `headRefName` → the branch on the fork (usually matches local).\n- `headRefOid` → the PR's current head SHA. Your local HEAD must be a descendant.\n- `maintainerCanModify` → must be `true` if you are not the fork owner.\n\nIf `headRepository.nameWithOwner` matches the upstream's `nameWithOwner`, this PR is **internal**:\n\n```bash\nHEAD_BRANCH=$(gh pr view \"$PR_NUMBER\" --json headRefName --jq .headRefName)\nHEAD_REF_OID=$(gh pr view \"$PR_NUMBER\" --json headRefOid --jq .headRefOid)\ngit merge-base --is-ancestor \"$HEAD_REF_OID\" HEAD && echo ok || echo NOT-DESCENDANT   # abort if NOT-DESCENDANT\ngit push origin \"HEAD:${HEAD_BRANCH}\"\n```\n\nExit the skill once this push lands — do not continue to the fork-push steps below.\n\n### 2. Confirm you can actually push\n\n```bash\ngh auth status                        # who am I?\ngit remote get-url origin             # fetch URL — confirm origin is the UPSTREAM, not the fork\ngit remote get-url --push origin      # push URL — can differ from the fetch URL if `pushurl` is configured\n```\n\nFor the internal-PR path above, compare the **push** URL (not just the fetch URL) against the expected upstream `nameWithOwner` before relying on `git push origin` — a configured `pushurl` can silently redirect the push to a different destination than the fetch URL suggests.\n\nYou may push to the fork branch iff the active gh user is:\n\n- the fork owner, **or**\n- a writer on the upstream **and** `maintainerCanModify == true`.\n\nOtherwise stop. Tell the user the PR doesn't allow maintainer edits.\n\n### 3. Sanity-check the local branch\n\n```bash\ngit branch --show-current\ngit rev-parse HEAD\ngit merge-base --is-ancestor <headRefOid> HEAD && echo ok || echo NOT-DESCENDANT\n```\n\n- If `headRefName` differs from the current local branch, that's fine — you'll push with an explicit refspec `local:headRefName` in step 6.\n- If local HEAD is **not** a descendant of `headRefOid`, stop. Either you're on the wrong branch, or someone else has pushed to the PR since you forked from it. Do not force-push without explicit user permission.\n\n### 4. Verify commit author identity before committing\n\n```bash\ngit config user.email\n```\n\nIf it is empty, hostname-shaped (`user@host.local`, `*@*.tail*.ts.net`, etc.), or otherwise not a real email tied to a GitHub account, the commit will appear \"unverified\" on GitHub and won't link to a profile. Override per-commit:\n\n```bash\ngit -c user.name=\"<Name>\"  -c user.email=\"<email>\"  commit -F /tmp/commit-msg.txt\n```\n\nTo correct an already-made commit before push:\n\n```bash\ngit -c user.name=\"...\" -c user.email=\"...\" commit --amend --reset-author -C HEAD --no-edit\n```\n\nPrefer the user's documented identity (e.g. from `CLAUDE.md` or earlier in the session) over the local git config when the local config is clearly machine-generated.\n\n### 5. Run the repo's full verification suite — **before** pushing\n\nThe user almost always asks for this explicitly. In this repo (see `CLAUDE.md` for the authoritative list):\n\n```bash\nnpm run format:check ","createdAt":"2026-09-25T12:52:19.783Z","updatedAt":"2026-09-25T12:52:19.783Z"},{"id":"cmugyng15039pqu064yqfuzys","slug":"hoangsonww-claude-code-agent-monitor-cache-efficiency","name":"cache-efficiency","description":"Analyze prompt-cache effectiveness for Claude Code usage from the Agent Monitor dashboard — cache hit rate (total_cache_read / (total_cache_read + total_input)), cache_write vs cache_read reuse, cache-read vs cache-write spend, and the sessions with the poorest reuse. Pulls token totals from /api/analytics, per-session detail from /api/sessions, and dollar splits from /api/pricing/cost. Use when diagnosing cache spend or deciding whether prompt caching is paying off.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"cache-efficiency","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Analyze prompt-cache effectiveness for Claude Code usage from the Agent Monitor dashboard — cache hit rate (total_cache_read / (total_cache_read + total_input)), cache_write vs cache_read reuse, cache-read vs cache-write spend, and the sessions with the poorest reuse. Pulls token totals from /api/analytics, per-session detail from /api/sessions, and dollar splits from /api/pricing/cost. Use when diagnosing cache spend or deciding whether prompt caching is paying off.","permissions":[],"systemPrompt":"# Cache Efficiency\n\nDiagnose whether prompt caching is actually saving money, and where it is not.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be: empty (analyze the whole fleet), \"today\" / \"this week\" / a date range, a session ID to scope the analysis, or a target like \"hit rate > 80%\". When empty, analyze all data from `/api/analytics`.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/analytics` | `tokens.total_input`, `tokens.total_output`, `tokens.total_cache_read`, `tokens.total_cache_write` (baselines pre-summed), plus `daily_sessions` |\n| `GET /api/sessions?limit=200` | Session list — each has model, cwd, started_at, ended_at, inline `cost`, metadata (JSON: usage_extras with cache token detail) |\n| `GET /api/sessions/{id}` | Full session detail with nested agents and events, for drill-down on a flagged session |\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — used to price cache read vs write spend |\n\n### How cache economics work\n\n```\ncache_hit_rate   = total_cache_read / (total_cache_read + total_input)\ncache_reuse      = total_cache_read / total_cache_write\ncache_read_cost  = (cache_read_tokens  / 1M) × cache_read_per_mtok\ncache_write_cost = (cache_write_tokens / 1M) × cache_write_per_mtok\n```\n\nCache writes cost more per token than cache reads (e.g. Sonnet $3.75 write vs $0.30 read per Mtok), and writes are billed even if the cached block is never reused. The payoff only arrives on subsequent reads — so a healthy fleet shows **cache_read_tokens far exceeding cache_write_tokens**. When `cache_reuse < 1`, you are paying to cache context you barely re-read.\n\nToken counts are **effective totals** = `current + baseline` (baselines preserve pre-compaction tokens).\n\n## Report Sections\n\n### 1. Fleet Cache Hit Rate\nFrom `/api/analytics`: compute `cache_hit_rate × 100`. State raw `total_cache_read` and `total_input`. Benchmark: >70% strong, 40–70% moderate, <40% weak prompt-cache utilization.\n\n### 2. Write vs Read Reuse\nCompute `cache_reuse = total_cache_read / total_cache_write`. Show both token counts. Flag if reuse < 1 (writing more cache than is ever read back).\n\n### 3. Cache Spend Split\nFrom `/api/pricing/cost` breakdown, sum `cache_read_cost` and `cache_write_cost` across all models. Show the dollar split and what fraction of total cost is cache-write overhead vs cache-read savings.\n\n### 4. Sessions With Poor Reuse\nFrom `/api/sessions?limit=200`, parse `metadata.usage_extras` for per-session cache read/write where available; rank sessions by lowest read/write reuse (and by cache_write-heavy cost). List the worst 10 with model, cost, and reuse ratio. Use `/api/sessions/{id}` to drill into any single flagged session.\n\n### 5. Recommendations\n- Sessions where `cache_write >> cache_read`: short or one-shot sessions rarely recoup cache writes — note them.\n- Stable, repeated context (system prompts, large files) should be cached once and reused; high churn defeats caching.\n- Estimate the dollar impact of raising the hit rate to the next benchmark tier.\n\n## Output\n\nStructured Markdown with tables. Currency as USD to 4 decimal places; rates as $/Mtok; percentages with ▲/▼ for any trend. Token counts with thousands separators.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-analytics/skills/cache-efficiency","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-analytics/skills/cache-efficiency/SKILL.md","defaultBranch":"master"},"readme":"# Cache Efficiency\n\nDiagnose whether prompt caching is actually saving money, and where it is not.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be: empty (analyze the whole fleet), \"today\" / \"this week\" / a date range, a session ID to scope the analysis, or a target like \"hit rate > 80%\". When empty, analyze all data from `/api/analytics`.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/analytics` | `tokens.total_input`, `tokens.total_output`, `tokens.total_cache_read`, `tokens.total_cache_write` (baselines pre-summed), plus `daily_sessions` |\n| `GET /api/sessions?limit=200` | Session list — each has model, cwd, started_at, ended_at, inline `cost`, metadata (JSON: usage_extras with cache token detail) |\n| `GET /api/sessions/{id}` | Full session detail with nested agents and events, for drill-down on a flagged session |\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — used to price cache read vs write spend |\n\n### How cache economics work\n\n```\ncache_hit_rate   = total_cache_read / (total_cache_read + total_input)\ncache_reuse      = total_cache_read / total_cache_write\ncache_read_cost  = (cache_read_tokens  / 1M) × cache_read_per_mtok\ncache_write_cost = (cache_write_tokens / 1M) × cache_write_per_mtok\n```\n\nCache writes cost more per token than cache reads (e.g. Sonnet $3.75 write vs $0.30 read per Mtok), and writes are billed even if the cached block is never reused. The payoff only arrives on subsequent reads — so a healthy fleet shows **cache_read_tokens far exceeding cache_write_tokens**. When `cache_reuse < 1`, you are paying to cache context you barely re-read.\n\nToken counts are **effective totals** = `current + baseline` (baselines preserve pre-compaction tokens).\n\n## Report Sections\n\n### 1. Fleet Cache Hit Rate\nFrom `/api/analytics`: compute `cache_hit_rate × 100`. State raw `total_cache_read` and `total_input`. Benchmark: >70% strong, 40–70% moderate, <40% weak prompt-cache utilization.\n\n### 2. Write vs Read Reuse\nCompute `cache_reuse = total_cache_read / total_cache_write`. Show both token counts. Flag if reuse < 1 (writing more cache than is ever read back).\n\n### 3. Cache Spend Split\nFrom `/api/pricing/cost` breakdown, sum `cache_read_cost` and `cache_write_cost` across all models. Show the dollar split and what fraction of total cost is cache-write overhead vs cache-read savings.\n\n### 4. Sessions With Poor Reuse\nFrom `/api/sessions?limit=200`, parse `metadata.usage_extras` for per-session cache read/write where available; rank sessions by lowest read/write reuse (and by cache_write-heavy cost). List the worst 10 with model, cost, and reuse ratio. Use `/api/sessions/{id}` to drill into any single flagged session.\n\n### 5. Recommendations\n- Sessions where `cache_write >> cache_read`: short or one-shot sessions rarely recoup cache writes — note them.\n- Stable, repeated context (system prompts, large files) should be cached once and reused; high churn defeats caching.\n- Estimate the dollar impact of raising the hit rate to the next benchmark tier.\n\n## Output\n\nStructured Markdown with tables. Currency as USD to 4 decimal places; rates as $/Mtok; percentages with ▲/▼ for any trend. Token counts with thousands separators.","createdAt":"2026-09-25T12:52:19.818Z","updatedAt":"2026-09-25T12:52:19.818Z"},{"id":"cmugyng1e039squ06pmxoswor","slug":"hoangsonww-claude-code-agent-monitor-cost-breakdown","name":"cost-breakdown","description":"Break down Claude Code costs using the Agent Monitor pricing engine. Shows per-model costs (input, output, cache_read, cache_write at $/Mtok rates), per-session costs, daily trends, and compaction baseline token recovery. Use when analyzing spending, comparing model costs, or planning budgets.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"cost-breakdown","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Break down Claude Code costs using the Agent Monitor pricing engine. Shows per-model costs (input, output, cache_read, cache_write at $/Mtok rates), per-session costs, daily trends, and compaction baseline token recovery. Use when analyzing spending, comparing model costs, or planning budgets.","permissions":[],"systemPrompt":"# Cost Breakdown\n\nDetailed cost analysis from the Agent Monitor's pricing engine.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be: \"today\", \"this week\", \"last 30 days\", a session ID, or \"budget $50/week\".\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/pricing` | `{ pricing: [{ model_pattern, display_name, input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok }] }` |\n| `GET /api/pricing/cost` | Total cost: `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` |\n| `GET /api/pricing/cost/{sessionId}` | Per-session cost with same breakdown shape |\n| `GET /api/sessions?limit=200` | Sessions list — each includes inline `cost` field (bulk pricing) |\n| `GET /api/analytics` | Token totals (total_input, total_output, total_cache_read, total_cache_write — baselines pre-summed), daily trends |\n\n### How costs are calculated\n\nThe pricing engine matches model names against `model_pattern` using SQL LIKE (e.g. `claude-sonnet-4-5%` matches `claude-sonnet-4-5-20250514`). **Longest pattern wins** for specificity. Cost per model:\n\n```\ncost = (input_tokens / 1M) × input_per_mtok\n     + (output_tokens / 1M) × output_per_mtok\n     + (cache_read_tokens / 1M) × cache_read_per_mtok\n     + (cache_write_tokens / 1M) × cache_write_per_mtok\n```\n\nToken counts are **effective totals** = `current + baseline` (baselines preserve pre-compaction tokens that would otherwise be lost when the transcript JSONL is rewritten).\n\n### Default pricing tiers (seeded on first run)\n\n| Family | Input $/Mtok | Output $/Mtok | Cache Read $/Mtok | Cache Write $/Mtok |\n|--------|-------------|--------------|-------------------|-------------------|\n| Opus 4.5/4.6 | $5 | $25 | $0.50 | $6.25 |\n| Sonnet 4/4.5/4.6 | $3 | $15 | $0.30 | $3.75 |\n| Haiku 4.5 | $1 | $5 | $0.10 | $1.25 |\n\n## Report Sections\n\n### 1. Cost by Model\nTable from `/api/pricing/cost` breakdown — each model with 4 token counts + cost. Highlight which pricing rule matched.\n\n### 2. Cost by Session (Top 10 Most Expensive)\nFrom sessions list with inline `cost` — sort descending. Show session name, model, duration, cost.\n\n### 3. Daily Cost Trend\nCross-reference `daily_sessions` with per-session costs to compute daily spend. Show 7/30-day trend with direction arrows.\n\n### 4. Token Efficiency Analysis\n- **Cache hit rate**: `total_cache_read / (total_cache_read + total_input) × 100` — higher = more efficient\n- **Compaction baseline recovery**: Tokens preserved via baseline columns (tokens not lost to compaction)\n- **Output/input ratio**: Balanced ratio indicates good prompt efficiency\n\n### 5. Cost Optimization Opportunities\n- Sessions where cache_write >> cache_read (poor cache reuse)\n- Expensive models used for simple tasks (check subagent_type vs model)\n- Sessions with many compactions (context overflow = wasted tokens)\n\n## Output\n\nStructured Markdown with tables. Currency as USD to 4 decimal places. Include total and per-model subtotals.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-analytics/skills/cost-breakdown","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-analytics/skills/cost-breakdown/SKILL.md","defaultBranch":"master"},"readme":"# Cost Breakdown\n\nDetailed cost analysis from the Agent Monitor's pricing engine.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be: \"today\", \"this week\", \"last 30 days\", a session ID, or \"budget $50/week\".\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/pricing` | `{ pricing: [{ model_pattern, display_name, input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok }] }` |\n| `GET /api/pricing/cost` | Total cost: `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` |\n| `GET /api/pricing/cost/{sessionId}` | Per-session cost with same breakdown shape |\n| `GET /api/sessions?limit=200` | Sessions list — each includes inline `cost` field (bulk pricing) |\n| `GET /api/analytics` | Token totals (total_input, total_output, total_cache_read, total_cache_write — baselines pre-summed), daily trends |\n\n### How costs are calculated\n\nThe pricing engine matches model names against `model_pattern` using SQL LIKE (e.g. `claude-sonnet-4-5%` matches `claude-sonnet-4-5-20250514`). **Longest pattern wins** for specificity. Cost per model:\n\n```\ncost = (input_tokens / 1M) × input_per_mtok\n     + (output_tokens / 1M) × output_per_mtok\n     + (cache_read_tokens / 1M) × cache_read_per_mtok\n     + (cache_write_tokens / 1M) × cache_write_per_mtok\n```\n\nToken counts are **effective totals** = `current + baseline` (baselines preserve pre-compaction tokens that would otherwise be lost when the transcript JSONL is rewritten).\n\n### Default pricing tiers (seeded on first run)\n\n| Family | Input $/Mtok | Output $/Mtok | Cache Read $/Mtok | Cache Write $/Mtok |\n|--------|-------------|--------------|-------------------|-------------------|\n| Opus 4.5/4.6 | $5 | $25 | $0.50 | $6.25 |\n| Sonnet 4/4.5/4.6 | $3 | $15 | $0.30 | $3.75 |\n| Haiku 4.5 | $1 | $5 | $0.10 | $1.25 |\n\n## Report Sections\n\n### 1. Cost by Model\nTable from `/api/pricing/cost` breakdown — each model with 4 token counts + cost. Highlight which pricing rule matched.\n\n### 2. Cost by Session (Top 10 Most Expensive)\nFrom sessions list with inline `cost` — sort descending. Show session name, model, duration, cost.\n\n### 3. Daily Cost Trend\nCross-reference `daily_sessions` with per-session costs to compute daily spend. Show 7/30-day trend with direction arrows.\n\n### 4. Token Efficiency Analysis\n- **Cache hit rate**: `total_cache_read / (total_cache_read + total_input) × 100` — higher = more efficient\n- **Compaction baseline recovery**: Tokens preserved via baseline columns (tokens not lost to compaction)\n- **Output/input ratio**: Balanced ratio indicates good prompt efficiency\n\n### 5. Cost Optimization Opportunities\n- Sessions where cache_write >> cache_read (poor cache reuse)\n- Expensive models used for simple tasks (check subagent_type vs model)\n- Sessions with many compactions (context overflow = wasted tokens)\n\n## Output\n\nStructured Markdown with tables. Currency as USD to 4 decimal places. Include total and per-model subtotals.","createdAt":"2026-09-25T12:52:19.826Z","updatedAt":"2026-09-25T12:52:19.826Z"},{"id":"cmugyng1n039vqu06sj00rm99","slug":"hoangsonww-claude-code-agent-monitor-model-mix","name":"model-mix","description":"Break down Claude Code usage by model family (Opus / Sonnet / Haiku) from the Agent Monitor dashboard — each family's share of tokens, share of cost, and the spots where an expensive model is doing cheap work. Pulls per-model token and cost splits from /api/pricing/cost, current rates from /api/pricing, fleet token totals from /api/analytics, and per-session model assignment from /api/sessions. Use when deciding model routing or whether to downshift work to a cheaper tier.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"model-mix","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Break down Claude Code usage by model family (Opus / Sonnet / Haiku) from the Agent Monitor dashboard — each family's share of tokens, share of cost, and the spots where an expensive model is doing cheap work. Pulls per-model token and cost splits from /api/pricing/cost, current rates from /api/pricing, fleet token totals from /api/analytics, and per-session model assignment from /api/sessions. Use when deciding model routing or whether to downshift work to a cheaper tier.","permissions":[],"systemPrompt":"# Model Mix\n\nSee where your tokens and dollars go by model family, and where to re-route work.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be: empty (analyze the whole fleet), \"today\" / \"this week\" / a date range, or a focus like \"where is Opus overused?\". When empty, analyze all data from `/api/pricing/cost` and `/api/sessions`.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — per-model token and cost split |\n| `GET /api/pricing` | `{ pricing: [{ model_pattern, display_name, input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok }] }` — rates per family |\n| `GET /api/analytics` | `tokens` totals (total_input, total_output, total_cache_read, total_cache_write — baselines pre-summed), `agent_types` for delegation context |\n| `GET /api/sessions?limit=200` | Session list — model, cwd, started_at, ended_at, inline `cost`, metadata (JSON: thinking_blocks, turn_count, total_turn_duration_ms, usage_extras) |\n\n### How families and rates work\n\nMap each `model` in the cost breakdown to a family from its `matched_rule` / `display_name`:\n\n| Family | Input $/Mtok | Output $/Mtok | Cache Read $/Mtok | Cache Write $/Mtok |\n|--------|-------------|--------------|-------------------|-------------------|\n| Opus 4.5/4.6 | $5 | $25 | $0.50 | $6.25 |\n| Sonnet 4/4.5/4.6 | $3 | $15 | $0.30 | $3.75 |\n| Haiku 4.5 | $1 | $5 | $0.10 | $1.25 |\n\n`cost = (tokens / 1M) × rate_per_mtok` summed over the 4 token types; longest `model_pattern` wins. Opus output costs ~5× Sonnet and ~5× Haiku per token, so a family's **cost share routinely exceeds its token share** — that gap is the routing signal.\n\n## Report Sections\n\n### 1. Token Share by Family\nAggregate `input + output + cache_read + cache_write` tokens per family from `/api/pricing/cost`. Show each family's tokens and percent of total. Cross-check the grand total against `/api/analytics` token totals.\n\n### 2. Cost Share by Family\nSum `cost` per family. Show each family's dollar total and percent of `total_cost`. Place the cost-share % next to the token-share % so the premium gap is visible.\n\n### 3. Cost-vs-Token Gap\nFor each family compute `cost_share − token_share`. A large positive gap on Opus/Sonnet signals premium spend concentration. Rank families by gap.\n\n### 4. Expensive Model on Cheap Work\nFrom `/api/sessions?limit=200`, find Opus/Sonnet sessions with signals of low complexity: low `turn_count`, short `total_turn_duration_ms`, few thinking_blocks, or small token footprints. List candidates that could plausibly run on a cheaper tier, with current cost and estimated cost if downshifted.\n\n### 5. Routing Recommendations\n- Quantify the savings of moving each candidate workload to the next-cheaper family (recompute cost at that family's rates).\n- Note work that genuinely needs Opus (deep reasoning, long context) and should stay.\n- Summarize a suggested routing policy (e.g. Haiku for mechanical edits, Sonnet for default dev, Opus for hard reasoning).\n\n## Output\n\nStructured Markdown with tables. Currency as USD to 4 decimal places; rates as $/Mtok; token shares and cost shares as percentages; use ▲/▼ for the cost-vs-token gap and any trend. Token counts with thousands separators.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-analytics/skills/model-mix","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-analytics/skills/model-mix/SKILL.md","defaultBranch":"master"},"readme":"# Model Mix\n\nSee where your tokens and dollars go by model family, and where to re-route work.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be: empty (analyze the whole fleet), \"today\" / \"this week\" / a date range, or a focus like \"where is Opus overused?\". When empty, analyze all data from `/api/pricing/cost` and `/api/sessions`.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/pricing/cost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — per-model token and cost split |\n| `GET /api/pricing` | `{ pricing: [{ model_pattern, display_name, input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok }] }` — rates per family |\n| `GET /api/analytics` | `tokens` totals (total_input, total_output, total_cache_read, total_cache_write — baselines pre-summed), `agent_types` for delegation context |\n| `GET /api/sessions?limit=200` | Session list — model, cwd, started_at, ended_at, inline `cost`, metadata (JSON: thinking_blocks, turn_count, total_turn_duration_ms, usage_extras) |\n\n### How families and rates work\n\nMap each `model` in the cost breakdown to a family from its `matched_rule` / `display_name`:\n\n| Family | Input $/Mtok | Output $/Mtok | Cache Read $/Mtok | Cache Write $/Mtok |\n|--------|-------------|--------------|-------------------|-------------------|\n| Opus 4.5/4.6 | $5 | $25 | $0.50 | $6.25 |\n| Sonnet 4/4.5/4.6 | $3 | $15 | $0.30 | $3.75 |\n| Haiku 4.5 | $1 | $5 | $0.10 | $1.25 |\n\n`cost = (tokens / 1M) × rate_per_mtok` summed over the 4 token types; longest `model_pattern` wins. Opus output costs ~5× Sonnet and ~5× Haiku per token, so a family's **cost share routinely exceeds its token share** — that gap is the routing signal.\n\n## Report Sections\n\n### 1. Token Share by Family\nAggregate `input + output + cache_read + cache_write` tokens per family from `/api/pricing/cost`. Show each family's tokens and percent of total. Cross-check the grand total against `/api/analytics` token totals.\n\n### 2. Cost Share by Family\nSum `cost` per family. Show each family's dollar total and percent of `total_cost`. Place the cost-share % next to the token-share % so the premium gap is visible.\n\n### 3. Cost-vs-Token Gap\nFor each family compute `cost_share − token_share`. A large positive gap on Opus/Sonnet signals premium spend concentration. Rank families by gap.\n\n### 4. Expensive Model on Cheap Work\nFrom `/api/sessions?limit=200`, find Opus/Sonnet sessions with signals of low complexity: low `turn_count`, short `total_turn_duration_ms`, few thinking_blocks, or small token footprints. List candidates that could plausibly run on a cheaper tier, with current cost and estimated cost if downshifted.\n\n### 5. Routing Recommendations\n- Quantify the savings of moving each candidate workload to the next-cheaper family (recompute cost at that family's rates).\n- Note work that genuinely needs Opus (deep reasoning, long context) and should stay.\n- Summarize a suggested routing policy (e.g. Haiku for mechanical edits, Sonnet for default dev, Opus for hard reasoning).\n\n## Output\n\nStructured Markdown with tables. Currency as USD to 4 decimal places; rates as $/Mtok; token shares and cost shares as percentages; use ▲/▼ for the cost-vs-token gap and any trend. Token counts with thousands separators.","createdAt":"2026-09-25T12:52:19.835Z","updatedAt":"2026-09-25T12:52:19.835Z"},{"id":"cmugyng1z039yqu06kkvjl1rm","slug":"hoangsonww-claude-code-agent-monitor-productivity-score","name":"productivity-score","description":"Calculate a productivity score using actual Agent Monitor metrics — session completion rates, cache efficiency (cache_read vs input), compaction pressure (baseline tokens), turn velocity (turn_count / total_turn_duration_ms), tool success ratio (PreToolUse vs PostToolUse), and the workflow intelligence API's complexity and effectiveness scores.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"productivity-score","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Calculate a productivity score using actual Agent Monitor metrics — session completion rates, cache efficiency (cache_read vs input), compaction pressure (baseline tokens), turn velocity (turn_count / total_turn_duration_ms), tool success ratio (PreToolUse vs PostToolUse), and the workflow intelligence API's complexity and effectiveness scores.","permissions":[],"systemPrompt":"# Productivity Score\n\nCalculate a productivity scorecard from the Agent Monitor's real data.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nOptions: \"today\", \"this week\", \"last 30 days\", a session ID, or \"compare\" for period comparison.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/analytics` | Token totals (`total_input`, `total_output`, `total_cache_read`, `total_cache_write` — baselines pre-summed), tool_usage top 20, daily_events/sessions, event_types, sessions_by_status, agents_by_status, avg_events_per_session, total_subagents |\n| `GET /api/sessions?limit=100` | Sessions with metadata JSON: `thinking_blocks`, `turn_count`, `total_turn_duration_ms`, `usage_extras` (service_tier, speed, inference_geo) |\n| `GET /api/pricing/cost` | Total cost with per-model breakdown |\n| `GET /api/workflows/{sessionId}` | 11 workflow datasets: stats, orchestration, toolFlow, effectiveness, patterns, modelDelegation, errorPropagation, concurrency, complexity, compaction, cooccurrence |\n\n## Score Components (each 0–100)\n\n### 1. Completion Rate (20% weight)\nFrom `sessions_by_status`:\n- `completed / (completed + error + abandoned) × 100`\n- Bonus for high completed-to-active ratio\n- Penalty for abandoned sessions (wasted work)\n\n### 2. Token Efficiency (20% weight)\nFrom analytics `tokens` (baselines are pre-summed into totals):\n- **Cache hit rate**: `total_cache_read / (total_cache_read + total_input) × 100`\n  - Above 60% = excellent, below 30% = poor\n- **Output concentration**: `total_output / total_input` — 0.3–0.8 is balanced\n\n### 3. Tool Effectiveness (20% weight)\nFrom `event_types`:\n- **Success ratio**: Count `PostToolUse` / Count `PreToolUse` — should be ~1.0; gap = tool failures\n- **API error rate**: Count `APIError` / total events — should be near 0\n- From workflow `effectiveness` data: subagent completion rates, task success per type\n\n### 4. Velocity (20% weight)\nFrom session metadata:\n- **Turns per session**: average `turn_count` across sessions\n- **Turn speed**: average `total_turn_duration_ms / turn_count` — lower = faster\n- **Events per session**: from `avg_events_per_session` in analytics overview\n- **Thinking depth**: average `thinking_blocks` — more thinking = more thorough (neutral metric)\n\n### 5. Cost Efficiency (20% weight)\nFrom pricing:\n- **Cost per completed session**: `total_cost / completed_sessions`\n- **Cost trend**: comparing current period to previous (decreasing = improving)\n- **Model optimization**: sessions using expensive models (Opus) for tasks subagents handle with Haiku/Sonnet\n\n## Overall Score\n\nWeighted sum → letter grade:\n- **A+** (95-100), **A** (90-94), **B+** (85-89), **B** (80-84), **C+** (75-79), **C** (70-74), **D** (60-69), **F** (<60)\n\n## Output Format\n\n```\n═══════════════════════════════════════\n  PRODUCTIVITY SCORE: 87/100 (B+)\n═══════════════════════════════════════\n  Completion Rate   ████████░░  80/100\n  Token Efficiency  █████████░  92/100\n  Tool Effectiveness████████░░  85/100\n  Velocity          █████████░  88/100\n  Cost Efficiency   █████████░  90/100\n═══════════════════════════════════════\n```\n\nThen: top 3 strengths, top 3 improvement areas with actionable steps, and period comparison if available.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-analytics/skills/productivity-score","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-analytics/skills/productivity-score/SKILL.md","defaultBranch":"master"},"readme":"# Productivity Score\n\nCalculate a productivity scorecard from the Agent Monitor's real data.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nOptions: \"today\", \"this week\", \"last 30 days\", a session ID, or \"compare\" for period comparison.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/analytics` | Token totals (`total_input`, `total_output`, `total_cache_read`, `total_cache_write` — baselines pre-summed), tool_usage top 20, daily_events/sessions, event_types, sessions_by_status, agents_by_status, avg_events_per_session, total_subagents |\n| `GET /api/sessions?limit=100` | Sessions with metadata JSON: `thinking_blocks`, `turn_count`, `total_turn_duration_ms`, `usage_extras` (service_tier, speed, inference_geo) |\n| `GET /api/pricing/cost` | Total cost with per-model breakdown |\n| `GET /api/workflows/{sessionId}` | 11 workflow datasets: stats, orchestration, toolFlow, effectiveness, patterns, modelDelegation, errorPropagation, concurrency, complexity, compaction, cooccurrence |\n\n## Score Components (each 0–100)\n\n### 1. Completion Rate (20% weight)\nFrom `sessions_by_status`:\n- `completed / (completed + error + abandoned) × 100`\n- Bonus for high completed-to-active ratio\n- Penalty for abandoned sessions (wasted work)\n\n### 2. Token Efficiency (20% weight)\nFrom analytics `tokens` (baselines are pre-summed into totals):\n- **Cache hit rate**: `total_cache_read / (total_cache_read + total_input) × 100`\n  - Above 60% = excellent, below 30% = poor\n- **Output concentration**: `total_output / total_input` — 0.3–0.8 is balanced\n\n### 3. Tool Effectiveness (20% weight)\nFrom `event_types`:\n- **Success ratio**: Count `PostToolUse` / Count `PreToolUse` — should be ~1.0; gap = tool failures\n- **API error rate**: Count `APIError` / total events — should be near 0\n- From workflow `effectiveness` data: subagent completion rates, task success per type\n\n### 4. Velocity (20% weight)\nFrom session metadata:\n- **Turns per session**: average `turn_count` across sessions\n- **Turn speed**: average `total_turn_duration_ms / turn_count` — lower = faster\n- **Events per session**: from `avg_events_per_session` in analytics overview\n- **Thinking depth**: average `thinking_blocks` — more thinking = more thorough (neutral metric)\n\n### 5. Cost Efficiency (20% weight)\nFrom pricing:\n- **Cost per completed session**: `total_cost / completed_sessions`\n- **Cost trend**: comparing current period to previous (decreasing = improving)\n- **Model optimization**: sessions using expensive models (Opus) for tasks subagents handle with Haiku/Sonnet\n\n## Overall Score\n\nWeighted sum → letter grade:\n- **A+** (95-100), **A** (90-94), **B+** (85-89), **B** (80-84), **C+** (75-79), **C** (70-74), **D** (60-69), **F** (<60)\n\n## Output Format\n\n```\n═══════════════════════════════════════\n  PRODUCTIVITY SCORE: 87/100 (B+)\n═══════════════════════════════════════\n  Completion Rate   ████████░░  80/100\n  Token Efficiency  █████████░  92/100\n  Tool Effectiveness████████░░  85/100\n  Velocity          █████████░  88/100\n  Cost Efficiency   █████████░  90/100\n═══════════════════════════════════════\n```\n\nThen: top 3 strengths, top 3 improvement areas with actionable steps, and period comparison if available.","createdAt":"2026-09-25T12:52:19.847Z","updatedAt":"2026-09-25T12:52:19.847Z"},{"id":"cmugyng2c03a1qu06qugf1xk5","slug":"hoangsonww-claude-code-agent-monitor-session-report","name":"session-report","description":"Generate a comprehensive session report with per-model token usage (input, output, cache_read, cache_write including compaction baselines), cost breakdown via the pricing engine, tool invocations, agent hierarchy, compaction events, API errors, turn durations, and thinking block counts. Use when reviewing a specific session or summarizing activity over a date range.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"session-report","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Generate a comprehensive session report with per-model token usage (input, output, cache_read, cache_write including compaction baselines), cost breakdown via the pricing engine, tool invocations, agent hierarchy, compaction events, API errors, turn durations, and thinking block counts. Use when reviewing a specific session or summarizing activity over a date range.","permissions":[],"systemPrompt":"# Session Report\n\nGenerate a detailed session report from the Claude Code Agent Monitor.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be a session ID, \"latest\", or a date range like \"last 24 hours\".\n\n## Data Sources\n\nAll data comes from the Agent Monitor API at `http://localhost:4820`:\n\n| Endpoint | What it returns |\n|----------|----------------|\n| `GET /api/sessions/{id}` | Session with nested `.agents[]` and `.events[]` |\n| `GET /api/sessions?limit=50` | Session list with `agent_count`, `last_activity`, and **inline `cost`** per session (bulk pricing applied server-side) |\n| `GET /api/pricing/cost/{sessionId}` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` |\n| `GET /api/events?session_id={id}` | Event stream: each has `event_type`, `tool_name`, `summary`, `data` (JSON), `created_at` |\n\n### Key data points available per session\n\n- **Status**: `active` / `completed` / `error` / `abandoned`\n- **Model**: primary model (e.g. `claude-sonnet-4-20250514`)\n- **Metadata (JSON)**: `thinking_blocks` count, `turn_count`, `total_turn_duration_ms`, `usage_extras` (service_tier, speed, inference_geo)\n- **Token usage per model**: Pricing breakdown reports `input_tokens`, `output_tokens`, `cache_read_tokens`, `cache_write_tokens` per model (baselines are pre-summed into these totals at the DB level)\n- **Cost formula**: `(tokens / 1,000,000) × rate_per_mtok` for each of 4 token types, using longest-match pricing rule\n- **Agent hierarchy**: recursive parent_agent_id tree, subagent_type (e.g. \"task\", \"explore\", \"code-review\", \"compaction\")\n- **Event types**: `PreToolUse`, `PostToolUse`, `Stop`, `SubagentStop`, `SessionStart`, `SessionEnd`, `Notification`, `Compaction`, `APIError`, `TurnDuration`\n\n## Report Sections\n\n### 1. Session Overview\n- ID (first 16 chars), name, status, model, working directory\n- Start → end time, total duration\n- Turn count and avg turn duration (from metadata)\n\n### 2. Token Usage (per model)\nInclude these columns: Model, Input, Output, Cache Read, Cache Write, and Total.\nShow **effective totals** (current + baseline) since baselines preserve tokens lost during compaction. Calculate cache hit rate: `cache_read / (cache_read + input) × 100`.\n\n### 3. Cost Breakdown\nFrom `/api/pricing/cost/{id}` — show each model's cost with the matched pricing rule. Note rates are per million tokens.\n\n### 4. Agent Hierarchy\nRender the agent tree (main → subagents, with nested children). For each agent: name, type, subagent_type, status, task (first 60 chars), duration.\n\n### 5. Tool Activity\nCount `PreToolUse` events by `tool_name`. Flag tools that appear in error events. Note subagent spawns (`tool_name = \"Agent\"`).\n\n### 6. Compaction & Context Health\n- Count of `Compaction` events (each = context was compressed)\n- Baseline tokens recovered (sum of baseline_* columns)\n- Thinking block count from metadata\n\n### 7. API Errors\nList any `APIError` events with type (quota, rate_limit, overloaded) and message.\n\n### 8. Timeline\nKey lifecycle events: SessionStart → first tool → compactions → errors → Stop → SessionEnd. Include TurnDuration events.\n\n## Output Format\n\nClean Markdown: executive summary line, structured tables, agent tree, numbered timeline. Bold key metrics.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-analytics/skills/session-report","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-analytics/skills/session-report/SKILL.md","defaultBranch":"master"},"readme":"# Session Report\n\nGenerate a detailed session report from the Claude Code Agent Monitor.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be a session ID, \"latest\", or a date range like \"last 24 hours\".\n\n## Data Sources\n\nAll data comes from the Agent Monitor API at `http://localhost:4820`:\n\n| Endpoint | What it returns |\n|----------|----------------|\n| `GET /api/sessions/{id}` | Session with nested `.agents[]` and `.events[]` |\n| `GET /api/sessions?limit=50` | Session list with `agent_count`, `last_activity`, and **inline `cost`** per session (bulk pricing applied server-side) |\n| `GET /api/pricing/cost/{sessionId}` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` |\n| `GET /api/events?session_id={id}` | Event stream: each has `event_type`, `tool_name`, `summary`, `data` (JSON), `created_at` |\n\n### Key data points available per session\n\n- **Status**: `active` / `completed` / `error` / `abandoned`\n- **Model**: primary model (e.g. `claude-sonnet-4-20250514`)\n- **Metadata (JSON)**: `thinking_blocks` count, `turn_count`, `total_turn_duration_ms`, `usage_extras` (service_tier, speed, inference_geo)\n- **Token usage per model**: Pricing breakdown reports `input_tokens`, `output_tokens`, `cache_read_tokens`, `cache_write_tokens` per model (baselines are pre-summed into these totals at the DB level)\n- **Cost formula**: `(tokens / 1,000,000) × rate_per_mtok` for each of 4 token types, using longest-match pricing rule\n- **Agent hierarchy**: recursive parent_agent_id tree, subagent_type (e.g. \"task\", \"explore\", \"code-review\", \"compaction\")\n- **Event types**: `PreToolUse`, `PostToolUse`, `Stop`, `SubagentStop`, `SessionStart`, `SessionEnd`, `Notification`, `Compaction`, `APIError`, `TurnDuration`\n\n## Report Sections\n\n### 1. Session Overview\n- ID (first 16 chars), name, status, model, working directory\n- Start → end time, total duration\n- Turn count and avg turn duration (from metadata)\n\n### 2. Token Usage (per model)\nInclude these columns: Model, Input, Output, Cache Read, Cache Write, and Total.\nShow **effective totals** (current + baseline) since baselines preserve tokens lost during compaction. Calculate cache hit rate: `cache_read / (cache_read + input) × 100`.\n\n### 3. Cost Breakdown\nFrom `/api/pricing/cost/{id}` — show each model's cost with the matched pricing rule. Note rates are per million tokens.\n\n### 4. Agent Hierarchy\nRender the agent tree (main → subagents, with nested children). For each agent: name, type, subagent_type, status, task (first 60 chars), duration.\n\n### 5. Tool Activity\nCount `PreToolUse` events by `tool_name`. Flag tools that appear in error events. Note subagent spawns (`tool_name = \"Agent\"`).\n\n### 6. Compaction & Context Health\n- Count of `Compaction` events (each = context was compressed)\n- Baseline tokens recovered (sum of baseline_* columns)\n- Thinking block count from metadata\n\n### 7. API Errors\nList any `APIError` events with type (quota, rate_limit, overloaded) and message.\n\n### 8. Timeline\nKey lifecycle events: SessionStart → first tool → compactions → errors → Stop → SessionEnd. Include TurnDuration events.\n\n## Output Format\n\nClean Markdown: executive summary line, structured tables, agent tree, numbered timeline. Bold key metrics.","createdAt":"2026-09-25T12:52:19.860Z","updatedAt":"2026-09-25T12:52:19.860Z"},{"id":"cmugyng2n03a4qu06b1pgkwxb","slug":"hoangsonww-claude-code-agent-monitor-usage-trends","name":"usage-trends","description":"Analyze Claude Code usage trends over time using the Agent Monitor's analytics API — daily session counts, daily event counts, token volumes by type, model distribution, tool usage rankings, and agent/event type distributions across 365-day retention windows.","authorId":"gh:hoangsonww","authorName":"hoangsonww","version":"0.1.0","category":"Prompt","securityLevel":"Sandbox","downloadsCount":0,"githubStars":1014,"pricePerCall":0,"manifest":{"name":"usage-trends","tools":[],"category":"Prompt","entrypoint":{"type":"prompt"},"description":"Analyze Claude Code usage trends over time using the Agent Monitor's analytics API — daily session counts, daily event counts, token volumes by type, model distribution, tool usage rankings, and agent/event type distributions across 365-day retention windows.","permissions":[],"systemPrompt":"# Usage Trends\n\nAnalyze usage patterns and trends from the Agent Monitor analytics data.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nOptions: \"last 7 days\", \"last 30 days\", \"last quarter\", \"peak hours\", \"tool trends\", \"model usage\".\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/analytics` | Comprehensive analytics object (see schema below) |\n| `GET /api/stats` | `{ total_sessions, active_sessions, active_agents, total_agents, total_events, events_today, ws_connections, agents_by_status, sessions_by_status }` |\n| `GET /api/sessions?limit=200` | Full session records with timestamps and metadata |\n\n### Analytics response schema (`GET /api/analytics`)\n\n```json\n{\n  \"overview\": { \"total_sessions\", \"active_sessions\", \"active_agents\", \"total_agents\", \"total_events\" },\n  \"tokens\": {\n    \"total_input\": N, \"total_output\": N,\n    \"total_cache_read\": N, \"total_cache_write\": N\n  },\n  \"tool_usage\": [{ \"tool_name\": \"...\", \"count\": N }],  // top 20\n  \"daily_events\": [{ \"date\": \"YYYY-MM-DD\", \"count\": N }],  // 365 days\n  \"daily_sessions\": [{ \"date\": \"YYYY-MM-DD\", \"count\": N }],  // 365 days\n  \"agent_types\": [{ \"subagent_type\": \"task\"|\"explore\"|null, \"count\": N }],\n  \"event_types\": [{ \"event_type\": \"PreToolUse\"|\"PostToolUse\"|..., \"count\": N }],\n  \"avg_events_per_session\": N,\n  \"total_subagents\": N,\n  \"sessions_by_status\": { \"active\": N, \"completed\": N, \"error\": N, \"abandoned\": N },\n  \"agents_by_status\": { \"working\": N, \"completed\": N, \"error\": N, ... }\n}\n```\n\n## Trend Analyses to Produce\n\n### 1. Daily Activity Trend\nPlot `daily_sessions` and `daily_events` for the requested period. Compute:\n- **Average sessions/day** and **events/day**\n- Week-over-week delta (%)\n- Peak day and quietest day\n\n### 2. Token Volume Trends\nFrom analytics tokens (baselines are pre-summed into totals at the DB level):\n- Total tokens: `total_input`, `total_output`, `total_cache_read`, `total_cache_write`\n- **Cache efficiency over time**: `total_cache_read / (total_cache_read + total_input)` — trending up = improving\n- **Output intensity**: `total_output / total_input` ratio — high = Claude is verbose\n\n### 3. Tool Usage Ranking\nFrom `tool_usage` (top 20 tools by event count):\n- Bar chart data (tool name → count)\n- Tool diversity: unique tools used\n- Subagent spawns: count of \"Agent\" tool uses (each = a subagent launched)\n\n### 4. Model Distribution\nFrom `agent_types` + per-session model field:\n- Which models are used most frequently\n- Subagent type distribution: main (null) vs task vs explore vs code-review\n\n### 5. Session Health Distribution\nFrom `sessions_by_status`:\n- Completion rate: `completed / total × 100`\n- Error rate: `error / total × 100`\n- Abandoned rate: `abandoned / total × 100`\n\n### 6. Event Type Distribution\nFrom `event_types`:\n- PreToolUse/PostToolUse ratio (should be ~1:1; gap = tools failing)\n- Compaction frequency relative to session count\n- APIError count (quota hits, rate limits, overloaded)\n\n## Output\n\nMarkdown with tables and ASCII trend indicators (▲▼→). Include period comparison when applicable.","schemaVersion":1},"repoUrl":"https://github.com/hoangsonww/Claude-Code-Agent-Monitor/tree/master/plugins/ccam-analytics/skills/usage-trends","tags":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api"],"stats":{"installVelocity7d":0,"retentionRate":0,"executions":0,"rating":null},"origin":"github","source":{"repo":"Claude-Code-Agent-Monitor","audit":{"files":["package-lock.json","package.json"],"binaries":[],"findings":[{"kind":"dependency","rule":"DP-02","message":"`postinstall` script runs on every install.","surface":"package.json","evidence":"postinstall: node scripts/postinstall.js","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip: Uncontrolled memory allocation via the declared uncompressed size (DoS).","surface":"package-lock.json, package.json","evidence":"GHSA-7q85-xj36-vmfc · npm:adm-zip@0.6.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"adm-zip@0.6.0 has a known vulnerability: adm-zip extraction follows destination symlinks, allowing arbitrary file overwrite.","surface":"package-lock.json, package.json","evidence":"GHSA-vwc7-r8mq-g2x9 · npm:adm-zip@0.6.0","severity":"medium"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via oversized array index in field names.","surface":"package-lock.json, package.json","evidence":"GHSA-535w-7cp7-47q4 · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via file descriptor leak on aborted uploads.","surface":"package-lock.json, package.json","evidence":"GHSA-qfvm-cv95-jqjf · npm:multer@2.2.0","severity":"high"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to file size limit bypass via async fileFilter race condition.","surface":"package-lock.json, package.json","evidence":"GHSA-qvfw-j98x-7q72 · npm:multer@2.2.0","severity":"low"},{"kind":"dependency","rule":"DP-01","message":"multer@2.2.0 has a known vulnerability: multer vulnerable to Denial of Service via crafted multipart field names.","surface":"package-lock.json, package.json","evidence":"GHSA-wc9g-mqfw-jrwm · npm:multer@2.2.0","severity":"high"}],"packages":12,"auditedAt":"2026-09-25T12:52:19.512Z","lockfiles":["package-lock.json"]},"forks":238,"owner":"hoangsonww","stars":1014,"topics":["ai-agents","claude-agents","claude-code","claude-skills","express","expressjs","macos-app","node","nodejs","python","react","rest-api","rfc-6455","sqlite","sqlite3","tailwind","tailwindcss","typescript","vite","websocket"],"license":"MIT","fullName":"hoangsonww/Claude-Code-Agent-Monitor","homepage":"https://hoangsonww.github.io/Claude-Code-Agent-Monitor/","language":"TypeScript","pushedAt":"2026-09-24T18:17:15Z","avatarUrl":"https://avatars.githubusercontent.com/u/124531104?v=4","crawledAt":"2026-09-25T12:52:04.316Z","openIssues":44,"manifestFile":"SKILL.md","manifestPath":"plugins/ccam-analytics/skills/usage-trends/SKILL.md","defaultBranch":"master"},"readme":"# Usage Trends\n\nAnalyze usage patterns and trends from the Agent Monitor analytics data.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nOptions: \"last 7 days\", \"last 30 days\", \"last quarter\", \"peak hours\", \"tool trends\", \"model usage\".\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET /api/analytics` | Comprehensive analytics object (see schema below) |\n| `GET /api/stats` | `{ total_sessions, active_sessions, active_agents, total_agents, total_events, events_today, ws_connections, agents_by_status, sessions_by_status }` |\n| `GET /api/sessions?limit=200` | Full session records with timestamps and metadata |\n\n### Analytics response schema (`GET /api/analytics`)\n\n```json\n{\n  \"overview\": { \"total_sessions\", \"active_sessions\", \"active_agents\", \"total_agents\", \"total_events\" },\n  \"tokens\": {\n    \"total_input\": N, \"total_output\": N,\n    \"total_cache_read\": N, \"total_cache_write\": N\n  },\n  \"tool_usage\": [{ \"tool_name\": \"...\", \"count\": N }],  // top 20\n  \"daily_events\": [{ \"date\": \"YYYY-MM-DD\", \"count\": N }],  // 365 days\n  \"daily_sessions\": [{ \"date\": \"YYYY-MM-DD\", \"count\": N }],  // 365 days\n  \"agent_types\": [{ \"subagent_type\": \"task\"|\"explore\"|null, \"count\": N }],\n  \"event_types\": [{ \"event_type\": \"PreToolUse\"|\"PostToolUse\"|..., \"count\": N }],\n  \"avg_events_per_session\": N,\n  \"total_subagents\": N,\n  \"sessions_by_status\": { \"active\": N, \"completed\": N, \"error\": N, \"abandoned\": N },\n  \"agents_by_status\": { \"working\": N, \"completed\": N, \"error\": N, ... }\n}\n```\n\n## Trend Analyses to Produce\n\n### 1. Daily Activity Trend\nPlot `daily_sessions` and `daily_events` for the requested period. Compute:\n- **Average sessions/day** and **events/day**\n- Week-over-week delta (%)\n- Peak day and quietest day\n\n### 2. Token Volume Trends\nFrom analytics tokens (baselines are pre-summed into totals at the DB level):\n- Total tokens: `total_input`, `total_output`, `total_cache_read`, `total_cache_write`\n- **Cache efficiency over time**: `total_cache_read / (total_cache_read + total_input)` — trending up = improving\n- **Output intensity**: `total_output / total_input` ratio — high = Claude is verbose\n\n### 3. Tool Usage Ranking\nFrom `tool_usage` (top 20 tools by event count):\n- Bar chart data (tool name → count)\n- Tool diversity: unique tools used\n- Subagent spawns: count of \"Agent\" tool uses (each = a subagent launched)\n\n### 4. Model Distribution\nFrom `agent_types` + per-session model field:\n- Which models are used most frequently\n- Subagent type distribution: main (null) vs task vs explore vs code-review\n\n### 5. Session Health Distribution\nFrom `sessions_by_status`:\n- Completion rate: `completed / total × 100`\n- Error rate: `error / total × 100`\n- Abandoned rate: `abandoned / total × 100`\n\n### 6. Event Type Distribution\nFrom `event_types`:\n- PreToolUse/PostToolUse ratio (should be ~1:1; gap = tools failing)\n- Compaction frequency relative to session count\n- APIError count (quota hits, rate limits, overloaded)\n\n## Output\n\nMarkdown with tables and ASCII trend indicators (▲▼→). Include period comparison when applicable.","createdAt":"2026-09-25T12:52:19.872Z","updatedAt":"2026-09-25T12:52:19.872Z"}],"total":40,"limit":24,"offset":0}