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..30b2798 --- /dev/null +++ b/plugins/plugin-maintenance/commands/bump-version.md @@ -0,0 +1,49 @@ +--- +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 +``` + +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: + +``` +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.