From plugin-optimizer
Validates Claude Code plugin structure and manifest, launches agent to fix issues with user confirmation, increments version, re-validates, and reports. For plugin quality optimization.
npx claudepluginhub fradser/dotclaude --plugin plugin-optimizerThis skill is limited to using the following tools:
Execute plugin validation and optimization workflow. **Target:** $ARGUMENTS
Refactors Claude Code plugins to official best practices via health checks, structural analysis, refactoring plans, execution, and verification. Triggers on refactor/audit requests or drift detection.
Audits Claude Code plugins for structure, quality, and best practices in plugin.json, commands, agents, skills, and hooks. Outputs severity-ranked issues with remediation steps.
Validates Claude Code plugins for structure, manifest, frontmatter, tool invocations, and token budgets using Python scripts. Guides selection of components like skills, agents, MCP/LSP servers, hooks.
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]