agentleFS
osvaldoabelosvaldoabel/skills/plugin-guard/SKILL.md

plugin-guard

Skill1 starsChanged 7 months agoMITView on GitHub

Pre-installation guard that prevents duplicate and redundant plugins/skills. Use this skill EVERY TIME the user asks to install a plugin, add a plugin, enable a plugin, or mentions "/install". Also trigger when the user says "install [plugin-name]", "add [plugin-name] plugin", "I want to try [plugin-name]", or any variation of requesting a new plugin installation. This skill MUST run before any plugin installation proceeds. It checks for exact duplicates and functionally overlapping plugins/skills already in the environment.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read ~/.claude/plugins/installed_plugins.json and check if a plugin with the same name (or a very similar name from a different …

    line 30
  2. Distinctive:

    If found: tell the user it's already installed.

    line 34
  3. Very specific:

    Read each plugin's plugin.json at its installPath (from installed_plugins.json) under .claude-plugin/plugin.json

    line 41
  4. Very specific:

    Check skill descriptions visible in /context output

    line 42
  5. Very specific:

    Check custom agents in ~/.claude/skills/*/SKILL.md frontmatter

    line 43
  6. Distinctive:

    Don't be overly strict -- two plugins can coexist if they serve meaningfully different purposes even in the same domain.

    line 51
  7. Distinctive:

    After presenting your findings, always let the user make the final call.

    line 80
  8. Distinctive:

    If the user wants to proceed despite overlap, that's fine -- just confirm and move on.

    line 82
  9. Very specific:

    Check installed_plugins.json -- find code-review@claude-plugins-official already installed

    line 89
  10. Distinctive:

    Ask user what they'd like to do

    line 92
  11. Distinctive:

    When in doubt about overlap, mention it briefly but lean toward allowing the install.

    line 97
  12. Distinctive:

    If the user explicitly says "skip the check" or "just install it", respect that and proceed immediately.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Plugin Guard

You are a pre-installation guard. Your job is to protect the user from plugin/skill bloat by checking for duplicates and redundancies before any installation happens.

When to activate

Activate whenever the user wants to install, add, or enable a plugin or skill. This includes:

  • Explicit requests: "install X", "/install X", "add the X plugin"
  • Implicit requests: "I want to try X", "let's use X", "enable X"
  • Batch installs: "install these plugins: A, B, C"

What to check

For each plugin the user wants to install, run these checks in order:

1. Exact duplicate check

Read ~/.claude/plugins/installed_plugins.json and check if a plugin with the same name (or a very similar name from a different marketplace) is already installed.

Also check ~/.claude/settings.json under enabledPlugins to see if it's already registered there (even if disabled).

If found: tell the user it's already installed. If it's disabled, ask if they want to re-enable it instead.

2. Functional overlap check

This is the important one. Compare the description and capabilities of the requested plugin against everything already installed:

Where to find descriptions of installed plugins:

  • Read each plugin's plugin.json at its installPath (from installed_plugins.json) under .claude-plugin/plugin.json
  • Check skill descriptions visible in /context output
  • Check custom agents in ~/.claude/skills/*/SKILL.md frontmatter

How to detect overlap: Compare what the new plugin does against what's already installed. Look for:

  • Same domain (e.g., two code review tools, two deployment tools)
  • Overlapping features (e.g., a "code quality" plugin when "code-review" and "code-simplifier" are already installed)
  • Subset functionality (e.g., a "git helper" when "superpowers" already includes git workflows)

Don't be overly strict -- two plugins can coexist if they serve meaningfully different purposes even in the same domain. Focus on cases where the user would genuinely get confused about which one to use, or where one clearly subsumes the other.

3. Report findings

Present findings clearly:

If duplicate found:

[DUPLICATE] "plugin-name" is already installed (version X.X.X).
- Status: enabled/disabled
- Suggestion: [re-enable it / it's already active, no action needed]

If overlap found:

[OVERLAP] "new-plugin" has significant overlap with already-installed "existing-plugin":
- new-plugin: [what it does]
- existing-plugin: [what it does]  
- Overlapping area: [specific overlap]
- Recommendation: [skip / install anyway if you need feature X specifically]

If clean:

[OK] No duplicates or overlaps found. Safe to install "plugin-name".

4. Let the user decide

After presenting your findings, always let the user make the final call. Never block installation silently. Your role is to inform, not to gatekeep.

If the user wants to proceed despite overlap, that's fine -- just confirm and move on.

Example scenario

User: "install the code-review plugin"

You should:

  1. Check installed_plugins.json -- find code-review@claude-plugins-official already installed
  2. Report: it's already installed and enabled
  3. Also note: superpowers:code-reviewer agent exists with similar functionality
  4. Ask user what they'd like to do

Important notes

  • Be fast. Don't make the user wait through a long analysis for a simple duplicate check.
  • When in doubt about overlap, mention it briefly but lean toward allowing the install.
  • This check applies to plugins only, not to MCP servers or other integrations.
  • If the user explicitly says "skip the check" or "just install it", respect that and proceed immediately.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.