OpenParable
Skip to content
← Back to skills

Sync Plugin Cache

Agent Building
sync-plugin-cache

Sync Plugin Cache is an Agent Skill for agent building published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Synchronize all marketplace bundles to the Claude plugin cache

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/data/sync-plugin-cache/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/sync-plugin-cache, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Sync Plugin Cache Skill

Synchronizes all bundles from marketplace/bundles/ to the Claude plugin cache at ~/.claude/plugins/cache/plan-marshall/.

Parameters

None - Synchronizes all bundles automatically.

Usage Examples

/sync-plugin-cache

Syncs all bundles after making changes to marketplace components.

Workflow

Step 1: Identify Bundles and Versions

Find all bundles and extract their versions from plugin.json:

for bundle in marketplace/bundles/*/; do
  name=$(basename "$bundle")
  version=$(python3 -c "import json; print(json.load(open('${bundle}.claude-plugin/plugin.json'))['version'])" 2>/dev/null || echo "unknown")
  echo "$name:$version"
done

This outputs bundle:version pairs like {bundle}:{version}.

Step 2: Determine Cache Location

The plugin cache location is: ~/.claude/plugins/cache/plan-marshall/

Each bundle is cached at: ~/.claude/plugins/cache/plan-marshall/{bundle}/{version}/

IMPORTANT: The version folder is required to match Claude Code's installation structure.

Step 3: Sync Each Bundle

CRITICAL: Execute ALL rsync commands in PARALLEL using separate Bash tool calls in a single message. Do NOT use a for loop or sequential execution.

For each bundle found, invoke a separate Bash tool call using the version from Step 1:

rsync -av --delete marketplace/bundles/{bundle}/ ~/.claude/plugins/cache/plan-marshall/{bundle}/{version}/

The --delete flag ensures removed files are also removed from cache.

NOTE: Always use the version from each bundle's plugin.json, not a hardcoded value.

Step 4: Display Summary

Show sync results listing each bundle synchronized and the cache location.

Critical Rules

  • Always use rsync with --delete to ensure cache matches source exactly
  • Do NOT modify source files, only copy to cache
  • If rsync fails, show error and continue with remaining bundles

Related

  • /marshall-steward - Project configuration including cache regeneration
  • CLAUDE.md - Documents the plugin cache sync pattern