agent-audit
Audit agents spawned in the current/last run against the agent-selection taxonomy
List every active tool across all MCP servers and flag cross-MCP duplicates and semantic overlaps
> /plugin marketplace add heymegabyte/claude-skillsHow it fires
How this command gets triggered: by you, by Claude, or both.
/audit-tool-surfaceContext preview
What this command does when you run it.
List every active tool across all MCP servers and flag cross-MCP duplicates and semantic overlaps
description: List every active tool across all MCP servers and flag cross-MCP duplicates and semantic overlaps argument-hint: [--fix]
<!-- <SUBAGENT-STOP>: skip this skill when running inside a subagent. Meta-skills must not leak into spawned subagent contexts. --> <SUBAGENT-STOP/>
Audit the active tool surface across every local MCP server. Exact duplicates (same tool name in 2+ servers) confuse Claude — it cannot choose which to call. Semantic overlaps (e.g. `stripe.createCustomer` + `square.createCustomer`) cause routing ambiguity at prompt time.
**When to use** — after adding or pruning any MCP server; after `/prune-mcp-tools`; before a heavy session to confirm the surface is clean.
**Inputs**
---
Glob for every MCP server entry-point:
~/.claude/mcp-servers/*/mcp-server/src/index.ts
Also check alternates:
~/.claude/mcp-servers/*/src/index.ts ~/.claude/mcp-servers/*/index.ts
Collect unique `(server_name, file_path)` pairs where `server_name` is the directory one level below `mcp-servers/`. If none found, emit:
No MCP server source trees found under ~/.claude/mcp-servers/ Nothing to audit.
Exit 0.
---
Extract tool registration calls:
server.tool("tool_name", …)
server.addTool({ name: "tool_name", … })
tool("tool_name", …)**Skip pruned tools** — exclude registrations whose line or immediately-preceding comment matches:
Build:
tool_registry: Map<tool_name: string, servers: string[]>
---
A **duplicate** is any tool name where `servers.length >= 2`. Collect into:
duplicates: { tool_name: string; servers: string[] }[]Sorted alphabetically by `tool_name`.
---
A **semantic overlap** is a pair of tools in different servers that are functionally equivalent but have different names. Apply heuristics in order, stop at first match:
1. **Common-suffix match** — both names end in the same verb stem (`_create`, `_list`, `_get`, `_delete`, `_update`, `_send`, `_search`) and their prefixes are synonymous providers (payment: `stripe`/`square`; storage: `r2`/`s3`/`storage`; messaging: `resend`/`sendgrid`/`gmail`/`smtp`). 2. **Edit-distance ≤2** — after stripping server-name prefix, remaining token pairs have Levenshtein distance ≤ 2; only flag across different servers. 3. **Shared noun across verb families** — e.g. `stripe_customer_create` + `square_customer_upsert` share `customer`. Flag when shared noun is a canonical entity: `customer`, `invoice`, `order`, `payment`, `webhook`, `subscription`, `product`, `contact`, `message`.
Collect into:
overlaps: { tool_a: string; server_a: string; tool_b: string; server_b: string; reason: string }[]---
One table per server:
### stripe-hardened-mcp (14 active tools) | Tool name | Source line | |------------------------|-------------| | customers_create | index.ts:42 | | customers_retrieve | index.ts:58 | | … | … |
| Tool name | Registered in | |--------------------|----------------------------------------| | webhook_send | resend-hardened-mcp, sendgrid-mcp | | customer_get | stripe-hardened-mcp, square-mcp |
If none: `✓ No exact duplicates found.`
| Tool A | Server A | Tool B | Server B | Reason | |-------------------------|-------------------|--------------------------|-------------|---------------------------| | stripe_customer_create | stripe-hardened | square_customer_create | square-mcp | Shared noun: customer | | email_send | resend-hardened | message_send | sendgrid | Edit-distance ≤ 2 on stem |
If none: `✓ No semantic overlaps detected.`
For each duplicate, suggest one of:
For each semantic overlap, suggest:
| Issue | Type | Suggested Action | |----------------------------------|------------------|-----------------------------------------------------| | webhook_send (2 servers) | Exact duplicate | Prefix-rename: resend_webhook_send, sg_webhook_send | | stripe vs square customer_create | Semantic overlap | Rename square version: square_customer_create |
---
If `--fix` NOT set, print:
Run with --fix to auto-prefix duplicate tool names.
If `--fix` set:
1. For each exact duplicate, construct prefixed name: `{server_name}_{tool_name}` (strip existing server-prefix to avoid double-prefixing). 2. Open each affected `index.ts`, locate registration line(s), replace name string literal in-pl
14-category autonomous product-building OS for 32+ AI coding tools. One-line prompts → deployed products.
Repo: heymegabyte/claude-skills
Audit agents spawned in the current/last run against the agent-selection taxonomy
Run the Agent Diversity Review gate and emit the result table
Meta-analyze the effectiveness of a /loop arc — per-iteration metrics, LOC delta trend, saturation detection, and a keep/lengthen/delete recommendation.
Audit the rules/ directory for missing foundational principles; output gap list with priority and justification
Validate ~/.claude/settings.json hooks block — event names, file existence, executability, matcher syntax; --fix repairs common issues
Catch Resend-class bug (isError: false on HTTP 4xx/5xx) across all MCP server tool handlers