Keeping Claude Code plugins up to date

Posted on

Update: Since this article was published, Claude Code version 2.0.70 introduced native auto-update functionality for plugin marketplaces. You can now enable per-marketplace automatic updates directly in Claude Code. This script remains useful for on-demand checks without consuming tokens or for users who prefer manual control over updates.

If you use Claude Code, you know the drill: run claude update, get the latest version and carry on to your sessions. Anthropic has solved the update problem for the CLI itself in a way that is clean and simple.

But here’s the thing, a significant part of Claude Code’s value is in the ecosystem: plugins, skills, MCP servers and custom agents.

The marketplace model has exploded with really useful repositories for all sorts of work (programming, scientific work, etc.) and dozens of community-maintained collections adding capabilities daily.

Yet, there’s no way to easily know when any of those plugins need updating. There’s not a notification or a dashboard showing “3 updates available.” You install plugins, they work, and you forget about them, never knowing that there’s a bug fix sitting in the repository, or a new feature you’re not using.

This isn’t a criticism of Anthropic. They’re building at speed, and the plugin system is still maturing. They’ll almost certainly add this functionality at some point, as others have requested it, but until then, the current path requires you to “proactively navigate through the Claude Code menu to trigger an update,” assuming you remember which plugins you have and which marketplaces they came from.

The script

As you know, Claude Code plugins live in a distributed world. Each marketplace is a Git repository, and each plugin you install is pinned to a specific commit SHA. Some plugins follow semantic versioning, others just track commits without version tags. When you install a plugin, Claude Code records the commit hash at that moment and never checks again.

You might be thinking about /plugin marketplace update. That command exists, but it only refreshes the marketplace catalogue (what’s available to install), not your installed plugins. Your plugins stay pinned to whatever commit they had when you installed them.

A slash command could work for checking updates, but it consumes tokens every time you run it. A hook that runs every session would add some latency to startup. I wanted something simple I could run on demand, outside of Claude Code entirely.

The script does what Claude Code doesn’t:

  1. Fetch all marketplaces: Loop through ~/.claude/plugins/marketplaces/ and run git fetch on each
  2. Read installed plugins: Parse ~/.claude/plugins/installed_plugins_v2.json to get plugin names, marketplaces, and installed commit SHAs
  3. Compare commits: For each plugin, check if commits exist between your installed SHA and the marketplace’s current HEAD
  4. Extract versions: Parse commit messages to find version numbers where available
  5. Report: Show which plugins have updates, how many commits behind, and what version is available

The script handles edge cases: plugins without version tags show “X commits behind” instead of version numbers; it accommodates marketplaces using main vs master branches; and it flags plugins whose installed SHA no longer exists in the remote history (installed from a fork or rebased branch) instead of failing silently.

Here’s what the output looks like:

Checking Claude Code plugin updates...

Fetching latest from marketplaces...

⬆  superpowers@superpowers-marketplace
   3.5.1 → 3.6.2 (12 commits)
⬆  episodic-memory@superpowers-marketplace
   1.0.11 → 1.0.13 (4 commits)
⬆  mgrep@Mixedbread-Grep
   31 commits behind (local plugin, no version tracking)
?  some-plugin@some-marketplace
   Cannot compare (installed SHA not found in remote history)

Summary:
  2 plugin(s) with updates available
  1 local plugin(s) with possible updates
  7 plugin(s) up to date
  1 plugin(s) could not be compared

To update a plugin:
  claude plugin update <plugin-name>@<marketplace>

Runs in about one second. No Claude Code session needed. No tokens consumed.

Installation

The script requires jq for JSON parsing. If you don’t have it, it easy to install using one of your operating system’s popular package manager:

# macOS
brew install jq

# Ubuntu/Debian
sudo apt-get install jq

# Fedora
sudo dnf install jq

# Windows (via Chocolatey)
choco install jq

And here’s how to install the script itself:

# Create the scripts directory
mkdir -p ~/.claude/scripts

# Download the script
curl -o ~/.claude/scripts/check-plugin-updates.sh \
  https://gist.githubusercontent.com/BrunoMiguelMonteiro/9a60d4c792fb5b0c3f79c2e4fcb2c5e0/raw/check-plugin-updates.sh

# Make it executable
chmod +x ~/.claude/scripts/check-plugin-updates.sh

# Add an alias (zsh)
echo "alias claude-plugin-updates='~/.claude/scripts/check-plugin-updates.sh'" >> ~/.zshrc
source ~/.zshrc

# Or for bash
echo "alias claude-plugin-updates='~/.claude/scripts/check-plugin-updates.sh'" >> ~/.bashrc
source ~/.bashrc

Then just run claude-plugin-updates whenever you want to check. To update a plugin, use the command Claude Code already provides:

claude plugin update <plugin-name>@<marketplace>

Restart Claude Code after updating for changes to take effect.

Building it

There’s something funny about using Claude Code to build a simple tool that solves a Claude Code problem, but that’s exactly what happened. The script itself was developed iteratively in a Claude Code session — exploring the plugin file structure, testing git commands, refining the output format.

It’s a small example of what makes Claude Code useful: not just writing code, but understanding the environment it’s running in and solving real friction points in my workflow.

Get the script

The full script is available as a GitHub Gist:

Download check-plugin-updates.sh

If you improve it, by adding auto-update functionality, notifications or better version parsing, I’d love to see what you build. Fork the Gist or drop a comment.