Clone
1
lessons/patterns/sync-entire-plugin-directory-not-individual-files
Leo Miranda edited this page 2026-02-03 03:54:37 +00:00

Sync ENTIRE Plugin Directory, Not Individual Files

Date

2026-02-02

Summary

When syncing source changes to the installed marketplace, use rsync to sync the ENTIRE plugins directory. Do NOT cherry-pick individual files.

What I Did Wrong

  1. Made changes that touched agents, commands, skills, and other files
  2. Only synced agent files: for f in plugins/*/agents/*.md; do cp "$f" ...
  3. Installed marketplace was in INCONSISTENT STATE
  4. Plugin failed to load
  5. Wasted user's time debugging the wrong thing

The Fix

rsync -av --exclude='.git' --exclude='.venv' --exclude='node_modules' \
  plugins/ ~/.claude/plugins/marketplaces/leo-claude-mktplace/plugins/

Why This Matters

A commit often touches MULTIPLE file types:

  • Agent frontmatter
  • Command files
  • Skill files
  • Hook scripts
  • plugin.json

Cherry-picking only some files leaves the marketplace in a broken state where files reference things that don't exist or have mismatched versions.

Rule

ALWAYS use rsync to sync the entire plugins directory after ANY change.

Never do:

  • cp of individual files
  • Selective syncing based on what you THINK changed

Stupid Mistake Count

This is yet another instance of me assuming I know what changed instead of just syncing everything properly.


Tags: sync, rsync, marketplace, plugin-updates, stupid-mistakes


Tags: sync, rsync, marketplace, plugin-updates, stupid-mistakes