From 2a8a4b8f54e99271d3cbd35a66d49970e048e62d Mon Sep 17 00:00:00 2001 From: Brian Gerstle Date: Wed, 17 Jun 2026 16:28:02 -0400 Subject: [PATCH 1/2] Add plugin-maintenance plugin with bump-version command Introduces a new plugin with a single /plugin-maintenance:bump-version command that finds modified plugin.json files via git diff, increments the patch version in each, and prints a summary for review before committing. Co-Authored-By: Claude Sonnet 4.6 --- .claude-plugin/marketplace.json | 11 ++++ .../.claude-plugin/plugin.json | 8 +++ .../commands/bump-version.md | 50 +++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 plugins/plugin-maintenance/.claude-plugin/plugin.json create mode 100644 plugins/plugin-maintenance/commands/bump-version.md diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 3cbd135..1764061 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -18,6 +18,17 @@ }, "repository": "https://github.com/8thlight/lightfactory", "category": "agentic-engineering" + }, + { + "name": "plugin-maintenance", + "source": "./plugins/plugin-maintenance", + "description": "Maintenance utilities for Claude Code plugins, including version bumping for modified plugins.", + "version": "1.0.0", + "author": { + "name": "8th Light" + }, + "repository": "https://github.com/8thlight/lightfactory", + "category": "tooling" } ] } diff --git a/plugins/plugin-maintenance/.claude-plugin/plugin.json b/plugins/plugin-maintenance/.claude-plugin/plugin.json new file mode 100644 index 0000000..fa48daf --- /dev/null +++ b/plugins/plugin-maintenance/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "plugin-maintenance", + "version": "1.0.0", + "description": "Maintenance utilities for Claude Code plugins, including version bumping for modified plugins.", + "commands": [ + "./commands/bump-version.md" + ] +} diff --git a/plugins/plugin-maintenance/commands/bump-version.md b/plugins/plugin-maintenance/commands/bump-version.md new file mode 100644 index 0000000..2b62101 --- /dev/null +++ b/plugins/plugin-maintenance/commands/bump-version.md @@ -0,0 +1,50 @@ +--- +description: Find all plugin.json files under plugins/ that are modified in git, increment their patch version, and print a summary for review before committing. +allowed-tools: Bash(git diff:*) Read Write +--- + +## Your Task + +### 1. Find modified plugin.json files + +Run: + +```bash +git diff --name-only HEAD +git diff --name-only --cached +``` + +Collect all unique paths from both outputs that match the pattern `plugins/*/plugin.json` or `plugins/*/.claude-plugin/plugin.json`. + +If no plugin.json files are modified (staged or unstaged), print: + +``` +No modified plugin.json files found. Nothing to bump. +``` + +Then stop. + +### 2. For each modified plugin.json + +Read the file and extract the current `"version"` field (semver string, e.g. `"1.4.1"`). + +Increment the patch component: +- `1.4.1` → `1.4.2` +- `2.0.0` → `2.0.1` + +Write the updated JSON back to the file with the new version value. Preserve all other fields and formatting. + +### 3. Print a summary + +After all files are updated, output a table: + +``` +Bumped plugin versions: + + plugins/example/.claude-plugin/plugin.json 1.4.1 → 1.4.2 + plugins/other/.claude-plugin/plugin.json 2.0.0 → 2.0.1 + +Review the changes above before committing. +``` + +Do not commit. Do not stage. The user will review and commit. From 2a18c1197b67ce042e87f644b87fe8ba93f1224a Mon Sep 17 00:00:00 2001 From: Brian Gerstle Date: Thu, 18 Jun 2026 15:45:22 -0400 Subject: [PATCH 2/2] fix(bump-version): use git diff HEAD and correct manifest path pattern - Replace `git diff HEAD` + `--cached` pair with a single `git diff --name-only HEAD`, which already covers both staged and unstaged changes - Drop the `plugins/*/plugin.json` pattern; all manifests in this repo live at `plugins/*/.claude-plugin/plugin.json` Co-Authored-By: Claude Sonnet 4.6 --- plugins/plugin-maintenance/commands/bump-version.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/plugin-maintenance/commands/bump-version.md b/plugins/plugin-maintenance/commands/bump-version.md index 2b62101..30b2798 100644 --- a/plugins/plugin-maintenance/commands/bump-version.md +++ b/plugins/plugin-maintenance/commands/bump-version.md @@ -11,10 +11,9 @@ Run: ```bash git diff --name-only HEAD -git diff --name-only --cached ``` -Collect all unique paths from both outputs that match the pattern `plugins/*/plugin.json` or `plugins/*/.claude-plugin/plugin.json`. +Collect all paths from the output that match the pattern `plugins/*/.claude-plugin/plugin.json`. If no plugin.json files are modified (staged or unstaged), print: