plugin-auditor

plugin-auditor is an agent for Claude Code from yacb2/aidex. It costs 31 tokens per session (1,697 once invoked), scanned A, original, MIT.

An auditor for installed Claude Code plugins that compares their always-loaded agents with recent use. It reads plugin files and session transcripts to identify plugins that may be unused but consume context.

In plain words
What is it for?
Use it to list installed plugins, count their agents, find their commands, check recent command and agent usage, and flag possible uninstall candidates.
Why use it?
It helps reveal idle token costs from plugins that load agents on every session. This supports decisions about which plugins may be candidates for removal.

Agent for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions subagents.

Part of the aidex plugin — 22 skills, 34 agents, 5 hooks shipped together

Good fit Use it to list installed plugins, count their agents, find their commands, check recent command and agent usage, and flag possible uninstall candidates.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/yacb2/aidex/plugin-auditor
View source ↗ yacb2/aidex
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/yacb2/aidex

Made for: Claude Code.

Or install aidex, the plugin that ships this one along with the rest of its 22 skills, 34 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for plugin-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/yacb2/aidex/plugin-auditor/github.svg)](https://agentmods.dev/agents/yacb2/aidex/plugin-auditor)
Your own site
<a href="https://agentmods.dev/agents/yacb2/aidex/plugin-auditor"><img src="https://agentmods.dev/badge/agents/yacb2/aidex/plugin-auditor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for plugin-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/yacb2/aidex/plugin-auditor"><img src="https://agentmods.dev/badge/agents/yacb2/aidex/plugin-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,697 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.01697
Opus 5.5 $0.00012 $0.00679
Sonnet 5.5 $0.00006 $0.00339
Haiku 4.5 $0.00003 $0.00170

Measured 7d ago against content hash 537a75b0193b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

plugin-auditor scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

2. Zero use in any project in the last 7 days (grep all `~/.claude/projects/*/` transcripts).

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

agents/plugin-auditor.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You audit installed plugins for token cost vs. usage.

Inputs

  • The snapshot JSON (context-snapshot.py, path in the prompt): categories['custom-agents'] is the measured idle cost of every plugin subagent together; skills{} carries each plugin skill's uses / last_used when usage_available is true.
  • ~/.claude/plugins/installed_plugins.json
  • ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/agents/*.md
  • ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/commands/*.md (for command names)

Steps

1. Enumerate plugins

Parse installed_plugins.json. For each plugin entry, record:

  • Plugin name and marketplace (<plugin>@<marketplace>)
  • installPath
  • installedAt, lastUpdated

2. Attribute the measured agent cost

For each plugin's installPath, list agents/*.md. The idle cost is the snapshot's custom-agents row, shared between plugins in proportion to their agent count — never N × a constant (3 agents measured 320 tokens on 2.1.263, not 1,800). Plugins with 0 agents have no idle cost — mark OK and skip.

3. Collect command names

For each plugin, list commands/*.md. The command name is the filename stem (e.g., review-pr.md → /review-pr). Also gather any namespaced slash commands from SKILL.md headers if present.

4. Check recent usage

Read it from the snapshot: for each plugin, its skills' uses and last_used in skills{} (ids are namespaced <plugin>:<skill>). A plugin whose every skill shows uses 0 is unused. When usage_available is false, say so and classify on cost alone — do not grep transcripts to fill the gap.

5. Detect plugin scope and protected status

For each plugin, read installed_plugins.json and check the scope field (or equivalent — typically user for global installs, project for .claude/plugins/-local installs).

Protected marketplaces (require strong justification before suggesting any change):

PROTECTED_MARKETPLACES = [
  "claude-plugins-official",   # Anthropic-curated
  "anthropics",                # Anthropic-published
]

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed · +1 lines 537a75b0193b
  2. 10d ago Changed · -11 tokens per session b8be4ecd6798
  3. 15d ago Changed · -1 lines · +17 tokens per session 9cd8731e5591
  4. 1mo ago Changed 43b80625a60b
  5. 1mo ago Changed · +3 lines cf8fd1cb3843
  6. 1mo ago Changed 0162a803aef2
  7. 1mo ago First seen · 136 lines · 25 tokens per session scan A 85d5b2dabbcd

Subscribe to this mod's changes

plugin-auditor is an agent published in the GitHub repository yacb2/aidex (2 stars, last pushed today), licensed MIT. It adds 31 tokens to every session and 1,697 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.