Plugin Audit
Agent Buildingplugin-auditPlugin Audit is an Agent Skill for agent building published in the bdfinst/agentic-dev-team repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Generalized structural compliance check for any Claude Code plugin. Audits architectural decisions only — agent type appropriateness (markdown vs script), frontmatter compliance, eval coverage, and body line-count budgets. Use when adding or modifying any agent or skill in a plugin, after scaffolding a new plugin, before a migration PR lands, or for a periodic health check. Accepts any plugin directory path; not hardcoded to one plugin's internal structure.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/bdfinst/agentic-dev-team/blob/HEAD/plugins/marketplace-dev/skills/plugin-audit/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/plugin-audit, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Plugin Audit
Role: orchestrator. Mechanical, deterministic structural compliance — pattern
matching against the plugin contract. This is the generalized successor to
dev-team's internal agent-audit, scoped to architectural decisions only.
Scope boundary
| In scope (this skill) | Out of scope |
|---|---|
| Agent type appropriateness (markdown vs script) | Detection-logic quality (→ the plugin's own agent-eval) |
| Frontmatter compliance | Shipping hygiene / ${CLAUDE_PLUGIN_ROOT} ref resolution |
| Eval coverage presence | Shell portability (bash 3.2 / BSD / Git Bash) |
| Body line-count budgets | Catalog/version sync (→ release-please config) |
Architecture only. Do not evaluate whether a detector is good — only whether the unit is the right type, well-formed, covered, and within budget.
Orchestrator constraints
- Check structure, not semantics. Verify fields/sections/patterns exist and the type matches the job. Never grade detection rules.
- Deterministic checks only. Every check is reproducible — does the field exist? Is the format correct? Is the body within budget?
- Generalized. Resolve every path from the target plugin dir. Never assume
plugins/dev-team, anagent-registry.md, or a.claude/docs/eval-system.md. --fixapplies minimal structural fixes (insert missing sections/fields from templates). Never rewrite existing content.- Be concise. Output the report table and action items only.
Step 1 — Resolve target plugin
Parse $ARGUMENTS:
- A directory path → audit that plugin.
- No path → if exactly one
plugins/*/exists, use it; if several, list them and ask which to audit; if the cwd is itself a plugin dir (.claude-plugin/plugin.jsonpresent), use it. --fix→ after the report, apply fixes for FAIL/WARN items.
Let PLUGIN = the resolved dir, NAME = its .claude-plugin/plugin.json name.
Eval fixtures are expected at the repo-root sibling evals/<NAME>/ (never shipped
inside PLUGIN); accept evals/<NAME>/fixtures/ or flat evals/<NAME>/ layouts.
Step 2 — Audit agents ($PLUGIN/agents/*.md)
For every agent file:
- Frontmatter compliance —
name,description, andeffort(one oflow|medium|high) are present;toolspresent. FAIL ifname/descriptionmissing oreffortabsent/invalid. - No colon in
description— the value must not contain:(breaks argument-hints). FAIL on a colon. - Skills–Skill invariant — if the body has a
## Skillsheading,tools:must includeSkill. FAIL otherwise. - Agent type appropriateness — read
${CLAUDE_PLUGIN_ROOT}/knowledge/agent-type-decision-rules.mdand classify the file by its observable behavior (the same R1–R10 walk as/agent-type-advisor's retrospective mode). ACHANGEverdict is a WARN with the cited rule IDs; aKEEPis PASS. (For a deeper, dispatched review, the user can run theplugin-best-practices-reviewagent separately.) - Review-agent shape — a body containing the JSON status schema
(
"status": "pass|warn|fail|skip") must declare the output schema (status,issues,summary), severity definitions, a## Skipsection, andContext needs:. WARN on any missing. - Body line-count — count body lines (after frontmatter). Review agents
(JSON-output) over 40 → WARN; team agents (persona
You are…body) over 75 → WARN.
Step 3 — Audit skills ($PLUGIN/skills/*/SKILL.md)
- Frontmatter —
name,description(no colon), androlepresent. FAIL on missingname/description; WARN on missingrole. - Structured steps — the body has an ordered procedure (numbered
##/###steps or a## Stepssection). FAIL if absent. - Arguments documented — a user-invocable skill (
user-invocable: true) declares its arguments (argument-hintor an arguments section). WARN if missing. - Conciseness directive — the skill instructs concise output somewhere ("Be concise" / "no preamble" / output-only). WARN if absent.
Step 4 — Eval coverage
For every review agent found in Step 2, check that at least one fixture
references it under evals/<NAME>/. WARN (not FAIL) when a review agent has no
fixture — eval authoring is a follow-up, but the gap must be visible.
Step 5 — Report
# Plugin Audit — <NAME> (<PLUGIN>)
## Agents
| Agent | Frontmatter | No-Colon Desc | Skills-Tool | Type | Review Shape | Body Budget | Status |
| --- | --- | --- | --- | --- | --- | --- | --- |
## Skills
| Skill | Frontmatter | Steps | Arguments | Concise | Status |
| --- | --- | --- | --- | --- | --- |
## Eval coverage
| Review agent | Fixture under evals/<NAME>/ | Status |
| --- | --- | --- |
## Summary
- Agents: N OK, N WARN, N FAIL
- Skills: N OK, N WARN, N FAIL
- Eval coverage: N covered, N gaps
- Action items: <list>
A clean plugin reports zero findings (every cell PASS / N/A). That is the bar
/scaffold-plugin output and a migrated skill must clear.
Step 6 — Apply fixes (only when --fix is passed)
Without --fix, list action items and stop. With --fix, apply minimal
structural fixes and re-verify each:
- Missing review-agent output schema → insert the JSON block after the H1.
- Missing
## Skip→ insert the skip stub before## Detect. - Missing
effort→ inserteffort: low(review) /effort: medium(team). - Colon in
description→ rewrite the value to remove colons (use–/and). ## SkillswithoutSkillin tools → append, Skillto thetools:line.
After each fix: re-read the file, re-run the specific check, report
FIXED: <unit> — <what>. Type mismatches (Step 2.4) are never auto-fixed —
converting markdown↔script is a human decision; report them as action items.