Config Audit
Produce a complete, data-backed audit of how the user's ~/.claude
configuration has grown, what overlaps, and what is risky — all read through
the Agent Monitor dashboard at http://localhost:4820.
Input
The user provides: $ARGUMENTS
This may be:
- empty or "full" — audit every surface (default).
- "skills" / "agents" / "commands" / "hooks" / "settings" — scope the audit to
one surface only.
- a project path passed as
?cwd= — to audit a project other than the
dashboard server's own working directory.
Data Sources
| Endpoint |
Returns |
GET /api/cc-config/overview |
roots + counts for every surface, split {user,project} where applicable (skills, agents, commands, outputStyles, plugins, mcpServers, hooks, memory, settingsFiles) |
GET /api/cc-config/skills |
{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] } |
GET /api/cc-config/agents |
{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] } |
GET /api/cc-config/commands |
{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] } |
GET /api/cc-config/hooks |
{ items:[{ scope, file, exists, hooks:{ <Event>:[{matcher,type,command,timeout}] } }] } |
GET /api/cc-config/settings |
{ items:[{ scope, file, exists, data(redacted), raw_size }] } |
Report Sections
1. Surface inventory (user vs project)
From /overview counts, print a table: one row per surface with user,
project, and total columns. Cover skills, agents, commands, output-styles,
plugins (with enabled/disabled), marketplaces, MCP servers, hooks
(user/project/project-local), memory, and settings files. Echo the resolved
roots so the user knows which claudeHome/project was inspected.
2. Duplicate & overlapping skills + agents
Fetch /skills and /agents. Detect:
- Name collisions across scope — same
name at both user and project
scope (project shadows user). List both file paths.
- Near-duplicates — entries whose
frontmatter.description / preview
describe the same job. Group them and recommend keeping one.
3. Hooks that run shell commands
Flatten /hooks to (scope, file, Event, matcher, type, command, timeout).
Flag every type: "command" entry. Within those, escalate ones that contain
network egress (curl, wget, http, nc) or run unbounded with no
timeout. Print the raw command so the user can review it.
4. Read-only vs mutable surfaces
State which surfaces the Config Explorer can mutate (skills, agents, commands,
output-styles, user/project CLAUDE.md, and per-project auto-memory files via
PUT/DELETE /api/cc-config/file) versus those that are read-only by design
(plugins, MCP servers, settings.json and its in-file hooks — written
concurrently by the running CLI). Direct cleanup suggestions only at mutable
surfaces; for read-only ones, name the source file to edit by hand.
Output
- A one-line verdict first: CLEAN / SPRAWL DETECTED / RISKY HOOKS.
- Section 1 as a Markdown table (
Surface | User | Project | Total).
- Section 2 as grouped lists with
file paths.
- Section 3 as a table (
Scope | Event | Matcher | Command | Risk).
- Sizes in KB; any cost in USD to 4 decimals; use ▲/▼ for scope deltas.
- Cite only fields the API returned — never fabricate counts or commands.
- If the dashboard is unreachable at
http://localhost:4820, say so and tell
the user to start it with npm start from the repo root.
1---2name: config-audit3description: 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.4---56# Config Audit78Produce a complete, data-backed audit of how the user's `~/.claude`9configuration has grown, what overlaps, and what is risky — all read through10the Agent Monitor dashboard at `http://localhost:4820`.1112## Input1314The user provides: **$ARGUMENTS**1516This may be:17- empty or "full" — audit every surface (default).18- "skills" / "agents" / "commands" / "hooks" / "settings" — scope the audit to19 one surface only.20- a project path passed as `?cwd=` — to audit a project other than the21 dashboard server's own working directory.2223## Data Sources2425| Endpoint | Returns |26|----------|---------|27| `GET /api/cc-config/overview` | `roots` + `counts` for every surface, split `{user,project}` where applicable (skills, agents, commands, outputStyles, plugins, mcpServers, hooks, memory, settingsFiles) |28| `GET /api/cc-config/skills` | `{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] }` |29| `GET /api/cc-config/agents` | `{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] }` |30| `GET /api/cc-config/commands` | `{ items:[{ scope, name, file, size, mtime, frontmatter, preview }] }` |31| `GET /api/cc-config/hooks` | `{ items:[{ scope, file, exists, hooks:{ <Event>:[{matcher,type,command,timeout}] } }] }` |32| `GET /api/cc-config/settings` | `{ items:[{ scope, file, exists, data(redacted), raw_size }] }` |3334## Report Sections3536### 1. Surface inventory (user vs project)37From `/overview` `counts`, print a table: one row per surface with `user`,38`project`, and `total` columns. Cover skills, agents, commands, output-styles,39plugins (with enabled/disabled), marketplaces, MCP servers, hooks40(user/project/project-local), memory, and settings files. Echo the resolved41`roots` so the user knows which `claudeHome`/project was inspected.4243### 2. Duplicate & overlapping skills + agents44Fetch `/skills` and `/agents`. Detect:45- **Name collisions across scope** — same `name` at both user and project46 scope (project shadows user). List both `file` paths.47- **Near-duplicates** — entries whose `frontmatter.description` / `preview`48 describe the same job. Group them and recommend keeping one.4950### 3. Hooks that run shell commands51Flatten `/hooks` to `(scope, file, Event, matcher, type, command, timeout)`.52Flag every `type: "command"` entry. Within those, escalate ones that contain53network egress (`curl`, `wget`, `http`, `nc`) or run unbounded with no54`timeout`. Print the raw `command` so the user can review it.5556### 4. Read-only vs mutable surfaces57State which surfaces the Config Explorer can mutate (skills, agents, commands,58output-styles, user/project CLAUDE.md, and per-project `auto-memory` files via59`PUT`/`DELETE /api/cc-config/file`) versus those that are read-only by design60(plugins, MCP servers, settings.json and its in-file hooks — written61concurrently by the running CLI). Direct cleanup suggestions only at mutable62surfaces; for read-only ones, name the source `file` to edit by hand.6364## Output6566- A one-line verdict first: CLEAN / SPRAWL DETECTED / RISKY HOOKS.67- Section 1 as a Markdown table (`Surface | User | Project | Total`).68- Section 2 as grouped lists with `file` paths.69- Section 3 as a table (`Scope | Event | Matcher | Command | Risk`).70- Sizes in KB; any cost in USD to 4 decimals; use ▲/▼ for scope deltas.71- Cite only fields the API returned — never fabricate counts or commands.72- If the dashboard is unreachable at `http://localhost:4820`, say so and tell73 the user to start it with `npm start` from the repo root.