npx claudepluginhub leejaedus/pepcode --plugin pepcodeWant just this skill?
Add to a custom plugin, then install with one command.
Analyze agent usage patterns and recommend cleanup of unused agents
This skill uses the workspace's default tool permissions.
<Use_When>
- User wants to know which agents are actually being used
- User wants to clean up unused agents from the catalog
- User asks "which agents are unused", "agent stats", "agent cleanup"
- Periodic maintenance to keep the agent catalog lean </Use_When>
<Do_Not_Use_When>
- User wants to run or delegate to a specific agent -- just delegate directly
- User wants to trace a single session's agent activity -- use
/pepcode:traceinstead - User wants to add a new agent -- modify agent definitions directly </Do_Not_Use_When>
<Why_This_Exists> pepcode has 28+ registered agents. Without usage data, it's impossible to know which agents are actively used vs dead weight. This skill provides evidence-based cleanup decisions by reading cumulative usage counters stored in ~/.claude/analytics/agent-usage.json. </Why_This_Exists>
<Execution_Policy>
- Read global usage data from ~/.claude/analytics/agent-usage.json
- Optionally read project-specific data from ~/.claude/projects/{hash}/analytics/agent-usage.json
- Cross-reference with the registered agent list from src/agents/definitions.ts
- Generate a structured report with tiers: heavy, moderate, light, unused, deprecated
- Suggest cleanup actions for unused and deprecated agents </Execution_Policy>
Note: If no usage data exists yet (file not found), inform the user that tracking has just been enabled and they need to use agents for a while before meaningful data appears. </Steps>
<Tool_Usage>
- Use
Readtool to read ~/.claude/analytics/agent-usage.json - Use
Readtool to read src/agents/definitions.ts for the registered agent list - Use
Grepto find@deprecatedmarkers in src/agents/ - Do NOT spawn subagents for this -- it's a direct data-reading task </Tool_Usage>
<Escalation_And_Stop_Conditions>
- If ~/.claude/analytics/agent-usage.json doesn't exist: Report that tracking is newly enabled, no data yet
- If user confirms removal: Create a task list for the cleanup work and delegate to executor
- Never auto-delete agent files without explicit user confirmation </Escalation_And_Stop_Conditions>
<Final_Checklist>
- Usage data was read successfully (or absence was reported)
- All registered agents are accounted for in the report
- Deprecated agents are identified from code markers
- Recommendations are evidence-based (not guesses)
- No agent files are modified without user confirmation </Final_Checklist>
Task: {{ARGUMENTS}}