MCPInstall

optimize-plugin

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".

Installs
116
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/fradser/dotclaude --skill optimize-plugin
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads optimize-plugin automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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 components against ${CLAUDE_PLUGIN_ROOT}/examples/ templates
  5. Assess architecture: if commands/ exists with .md files, use AskUserQuestion tool to ask about migrating to skills structure
  6. Run validation: python3 ${CLAUDE_PLUGIN_ROOT}/scripts/validate-plugin.py "$TARGET"
    • Options: --check=structure,manifest,frontmatter,tools,tokens
    • JSON output: --json
    • Verbose: -v, --verbose
  7. Compile issues by severity (Critical, Warning, Info)

Phase 2: Agent-Based Optimization

Goal: Launch agent to apply ALL fixes. Orchestrator does NOT make fixes directly.

Condition: Always execute.

Actions:

  1. Launch plugin-optimizer:plugin-optimizer agent with the following prompt content:
    • Target plugin path (absolute path from Phase 1)
    • Validation console output (issues list from Phase 1)
    • Template validation results
    • User decisions (migration choice if applicable)
    • INSTRUCTION: Analyze the validation output to identify issues
  2. Agent autonomously applies fixes (MUST use AskUserQuestion tool before applying template fixes, presenting violations with specific examples and before/after comparison)
  3. Agent increments version in .claude-plugin/plugin.json after fixes:
    • Patch (x.y.Z+1): Bug fixes
    • Minor (x.Y+1.0): New components
    • Major (X+1.0.0): Breaking changes
  4. Wait for agent to complete

Path Reference Rules:

  • Same directory: Use relative paths (./reference.md)
  • Outside directory: Use ${CLAUDE_PLUGIN_ROOT} paths
  • Component templates: See ${CLAUDE_PLUGIN_ROOT}/examples/

Redundancy & Efficiency:

  • Redundancy: Allow strategic repetition of critical content (MUST/SHOULD requirements). Favor concise restatement.
  • Efficiency: Agent detects if tasks need Agent Teams (Parallelizable > 5 files, Multi-domain).

Phase 3: Verification & Deliverables

Goal: Verify fixes, generate report, and update documentation.

Actions:

  1. Execute validation script: python3 ${CLAUDE_PLUGIN_ROOT}/scripts/validate-plugin.py "$TARGET"
  2. Analyze results: compare with Phase 1 findings, confirm critical issues resolved
  3. If critical issues remain, resume agent execution
  4. Generate final validation report using template below
  5. Update README.md to reflect current state (metadata, directory structure, usage instructions; do not append version history log)

Validation Report Template

## 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]

FAQ

What does the optimize-plugin skill do?

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 do I install optimize-plugin?

Run npx skills add https://github.com/fradser/dotclaude --skill optimize-plugin in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/optimize-plugin/ (personal) or .claude/skills/optimize-plugin/ (project).

Which AI agents can use optimize-plugin?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is optimize-plugin safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains optimize-plugin?

It is published by fradser in fradser/dotclaude. It has 116 recorded installs.

More from fradser/dotclaude

View all →

patent-architect

fradser/dotclaude

Automatically searches prior art via SerpAPI and generates Chinese patent application forms. This skill should be used when the user wants to generate Chinese patent application forms, or mentions "patents", "inventions", or wants to protect technical innovations.

Media & Creative618 installs

agent-browser

fradser/dotclaude

Open the skill to read its SKILL.md instructions.

Applies behavior-driven development principles including Gherkin scenarios and test-driven development. This skill should be used when the user asks to implement features, fix bugs, or when writing executable specifications and tests before writing production code.

Testing & QA148 installs

commit-and-push

fradser/dotclaude

Open the skill to read its SKILL.md instructions.

executing-plans

fradser/dotclaude

Open the skill to read its SKILL.md instructions.

125 installs

brainstorming

fradser/dotclaude

Open the skill to read its SKILL.md instructions.

123 installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.