From plugin-optimizer
Validates Claude plugin structure, launches agent to apply fixes with user approval, increments version, re-validates, and generates report.
npx claudepluginhub fradser/dotclaude --plugin plugin-optimizer<plugin-path>optimize-plugin/# Plugin Optimization Execute plugin validation and optimization workflow. **Target:** $ARGUMENTS ## Background Knowledge Load `plugin-optimizer:plugin-best-practices` skill using the Skill tool for component templates, tool invocation rules, and type classification. ## Phase 1: Discovery & Validation **Goal**: Validate structure and detect issues. Orchestrator MUST NOT apply fixes. **Actions**: 1. Resolve path with `realpath` and verify existence 2. Validate `.claude-plugin/plugin.json` exists 3. Find component directories: `commands/`, `agents/`, `skills/`, `hooks/` 4. Validate comp...
/plugin-reviewReviews Claude Code plugin at <plugin-path> against best practices, tracks progress in state file, validates components, and recommends improvements.
/validateValidates Claude Code plugin structure including plugin.json, marketplace.json, skills frontmatter, and commands, producing a structured checklist of pass/fail results.
/audit-pluginsAudits specified Claude plugins (name, path, or 'all') for structure validity, best practices, deprecations, changelog compatibility, and security; generates Markdown report with summary, details, and action items.
/pluginValidates current Claude Code plugin against official guidelines, checking manifest, structure, commands, installation blockers, and compatibility. Produces quality score, critical issues, warnings, and fix recommendations.
/auditAudits a plugin directory for critical issues, warnings, and suggestions; optionally applies auto-fixes with verification; summarizes remaining manual fixes.
/validate-pluginValidates Claude Code plugin structure, plugin.json manifest, components (commands, agents, skills), hooks, and marketplace.json against 2025 standards. Generates report with errors, warnings, suggestions, and pass/fail status.
Share bugs, ideas, or general feedback.
Execute plugin validation and optimization workflow. Target: $ARGUMENTS
Load plugin-optimizer:plugin-best-practices skill using the Skill tool for component templates, tool invocation rules, and type classification.
Goal: Validate structure and detect issues. Orchestrator MUST NOT apply fixes.
Actions:
realpath and verify existence.claude-plugin/plugin.json existscommands/, agents/, skills/, hooks/${CLAUDE_PLUGIN_ROOT}/examples/ templatescommands/ exists with .md files, use AskUserQuestion tool to ask about migrating to skills structurepython3 ${CLAUDE_PLUGIN_ROOT}/scripts/validate-plugin.py "$TARGET"
--check=structure,manifest,frontmatter,tools,tokens--json-v, --verboseGoal: Launch agent to apply ALL fixes. Orchestrator does NOT make fixes directly.
Condition: Always execute.
Actions:
plugin-optimizer:plugin-optimizer agent with the following prompt content:
AskUserQuestion tool before applying template fixes, presenting violations with specific examples and before/after comparison).claude-plugin/plugin.json after fixes:
Path Reference Rules:
./reference.md)${CLAUDE_PLUGIN_ROOT} paths${CLAUDE_PLUGIN_ROOT}/examples/Redundancy & Efficiency:
Goal: Verify fixes, generate report, and update documentation.
Actions:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/validate-plugin.py "$TARGET"README.md to reflect current state (metadata, directory structure, usage instructions; do not append version history log)## Plugin Validation Report
### Plugin: [name]
Location: [absolute-path]
Version: [old] -> [new]
### Summary
[2-3 sentences with key statistics]
### Phase 1: Issues Detected
#### Critical ([count])
- `file/path` - [Issue description]
#### Warnings ([count])
- `file/path` - [Issue description]
### Phase 2: Fixes Applied
#### Structure Fixes
- [Fix description]
#### Template Conformance
- **Agents**: [Count] validated, [count] fixed
- **Instruction-type Skills**: [Count] validated, [count] fixed
- **Knowledge-type Skills**: [Count] validated, [count] fixed
#### Redundancy Fixes
- [Consolidations applied]
### Phase 3: Verification Results
- Structure validation: [PASS/FAIL]
- Manifest validation: [PASS/FAIL]
- Component validation: [PASS/FAIL]
- Tool patterns validation: [PASS/FAIL]
- Token budgets validation: [PASS/FAIL]
### Token Budget Analysis
- Skills analyzed: [count]
- Tier 1 (Metadata ~50): [OK count], [WARNING count]
- Tier 2 (SKILL.md ~500): [OK count], [WARNING count], [CRITICAL count]
- Tier 3 (References 2000+ typical): [total tokens]
### Component Inventory
- Commands: [count] found, [count] valid
- Agents: [count] found, [count] valid
- Skills: [count] found, [count] valid
### Remaining Issues
[Issues that couldn't be auto-fixed with explanations]
### Overall Assessment
[PASS/FAIL] - [Detailed reasoning]