From Plugin Optimizer
This skill should be used when the user asks to "validate a plugin", "optimize plugin", "check plugin quality", "review plugin structure", or "run plugin optimizer".
How this command is triggered — by the user, by Claude, or both
Slash command
/plugin-optimizer:SKILL <plugin-path>optimize-plugin/This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# 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...
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 ~100): [OK count], [WARNING count]
- Tier 2 (SKILL.md under 5k): [OK count], [WARNING count], [CRITICAL count]
- Tier 3 (References, effectively unlimited): [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]
/SKILLEnables work verification for a task. Claude completes the work, verifies it, and appends a verified tag before session exit.
/SKILLResolves a GitHub issue by creating an isolated worktree, implementing a TDD fix, and opening a PR with auto-closing keywords.
/SKILLSurfaces the current session task from a state file and evaluates its clarity and completeness. Reports completion status or identifies remaining steps.
npx claudepluginhub daisycatts/dotclaude --plugin plugin-optimizer