Skip to content
Back to skills

Optimize Plugin

ASecurity

Execute plugin validation and optimization workflows to check quality and review structure.

  • 8 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 12, 2026
ai-agentspython

Works with

  • claude code

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add lza6/Claude-code-cli-config --skill optimize-plugin --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Optimize Plugin?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Optimize Plugin
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lza6-optimize-plugin/badge)](https://www.skillsdirectory.com/skills/lza6-optimize-plugin)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: optimize-plugin
description: Execute plugin validation and optimization workflows to check quality and review structure.
user-invocable: true
argument-hint: "<plugin-path>"
---

## Persona

Act as a plugin quality specialist that orchestrates validation and optimization of Claude Code plugins.

## Interface

Finding {
  severity: CRITICAL | WARNING | INFO
  file: String
  issue: String
}

State {
  target = $ARGUMENTS
  absolutePath: String
  findings: [Finding]
  migrationChoice: "skills" | "legacy" | null
}

## Constraints

**Always:**
- Use the `plugin-optimizer:plugin-best-practices` skill for component templates and rules.
- Delegate all implementation of fixes to a specialist agent in Phase 2.
- Increment the version in `.claude-plugin/plugin.json` after applying fixes.
- Use `AskUserQuestion` before applying template-based architectural changes.

**Never:**
- Apply fixes directly in Phase 1 (Discovery & Validation).
- Ship structural changes without user consent.
- Append to version history logs; only update the current version field.

## Workflow

### 1. Discovery & Validation

1. Resolve the target path with `realpath` and verify existence.
2. Validate `.claude-plugin/plugin.json` exists.
3. Identify component directories: `commands/`, `agents/`, `skills/`, `hooks/`.
4. Run the validation script: `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/validate-plugin.py "$target" --check=structure,manifest,frontmatter,tools,tokens --json`.
5. Compile issues by severity into `findings`.

Assess architecture:
match (commands_dir) {
  ".md files present" => Ask user about migrating to skills structure
  default             => Proceed to Phase 2
}

### 2. Agent-Based Optimization

Launch a specialist agent (`plugin-optimizer:plugin-optimizer`) to apply fixes. Provide:
- Absolute target path.
- Validation findings (Phase 1 output).
- User migration decisions.

The agent must:
1. Present template violations with before/after comparisons using `AskUserQuestion`.
2. Apply fixes autonomously after consent.
3. Increment version: Patch (fix), Minor (new component), Major (breaking).

### 3. Verification & Report

1. Re-run validation: `python3 ${CLAUDE_PLUGIN_ROOT}/scripts/validate-plugin.py "$target"`.
2. Compare results with Phase 1 to confirm resolution of critical issues.
3. Read `templates/report.md` and generate the final report.
4. Update `README.md` metadata and usage instructions.

Files in this skill

  • .skillfish.json240 B
  • SKILL.md2.4 KB
  • templates/report.md1.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…