Update plugin changelog and version after making changes. Interactive workflow for documenting changes and bumping semver. Triggers when you've modified commands, skills, or other plugin files.
Interactive workflow that guides you through documenting plugin changes, updating the changelog, and bumping the semver version after modifying commands or skills.
/plugin marketplace add artimath/surf-market/plugin install claude-code-meta@surf-market<plugin-name>Guide the user through properly documenting and versioning plugin changes. Follow systematic approach: detect changes, categorize them, update changelog, bump version, verify, and prepare for testing with fresh plugin context.
Plugin to update: $ARGUMENTS
Goal: Understand what files were modified in the plugin
Actions:
Create todo list with all 5 phases:
Mark Phase 1 as in_progress
Read current version from plugins/$PLUGIN_NAME/.claude-plugin/plugin.json
Check git status for uncommitted changes in plugin directory:
git -C /path/to/surf-market status --short plugins/$PLUGIN_NAME/
If no changes found:
Present modified files to user:
Current version: 0.3.2
Modified files:
M plugins/claude-code-meta/commands/update-plugin.md
A plugins/claude-code-meta/skills/claude-code-meta/references/command-testing.md
Mark Phase 1 as completed
Output: List of changed files and current version
Goal: Understand what kind of changes were made and their significance
Actions:
Mark Phase 2 as in_progress
For each modified/added file, categorize the change:
Change Type Decision Guide:
Added - Choose when creating something new:
Changed - Choose when modifying existing:
Fixed - Choose when correcting errors:
Removed - Choose when deleting:
When file is "Modified" but change is additive:
Use AskUserQuestion if uncertain with these options:
Question: "What type of change is this?"
Header: "Change type"
Options:
- Added: "New feature, command, skill, or capability"
- Changed: "Modified existing behavior or improved functionality"
- Fixed: "Bug fix or correction"
- Removed: "Deleted feature or deprecated functionality"
Ask for one-line description of each change:
Determine semver bump needed:
Semver Guidelines:
Decision Criteria (Use these to decide autonomously):
PATCH (0.x.y → 0.x.y+1) - Choose when ALL of these are true:
Examples:
MINOR (0.x.y → 0.x+1.0) - Choose when ANY of these are true:
Examples:
/ship command to show what ships today/razor to support --inbox flagMAJOR (0.x.y → 1.0.0 OR x+1.0.0) - Choose when ANY of these are true:
Examples:
/old-command/capture <text> to /capture --title <text>When in doubt:
Use AskUserQuestion:
Question: "Based on these changes, what semver bump is appropriate?"
Header: "Version bump"
Options:
- Patch: "Bug fixes or documentation only"
- Minor: "New features or commands (backward compatible) (Recommended)"
- Major: "Breaking changes or removed features"
Calculate new version number
Mark Phase 2 as completed
Output: Categorized changes and new version number
Goal: Document changes in changelog following Keep a Changelog format
Actions:
Mark Phase 3 as in_progress
Read current plugins/$PLUGIN_NAME/CHANGELOG.md
Determine if creating new version section or adding to [Unreleased]:
Build changelog entry:
## [$NEW_VERSION] - $(date +%Y-%m-%d)
### Added
- New feature X that enables Y
### Changed
- Improved Z to handle W better
### Fixed
- Fixed issue where A caused B
Use Edit tool to add entry after ## [Unreleased] line
Show user the changelog diff
Mark Phase 3 as completed
Output: Updated CHANGELOG.md
Goal: Update version number in plugin.json
Actions:
Mark Phase 4 as in_progress
Read plugins/$PLUGIN_NAME/.claude-plugin/plugin.json
Use Edit tool to update version:
"version": "$OLD_VERSION",
→
"version": "$NEW_VERSION",
Verify the edit succeeded
Mark Phase 4 as completed
Output: Updated plugin.json with new version
Goal: Verify changes and explain testing requirements
Actions:
Mark Phase 5 as in_progress
Show git diff of changes:
git -C /path/to/surf-market diff plugins/$PLUGIN_NAME/
Critical: Explain versioning and testing context
Present to user:
✅ Plugin updated: v$OLD_VERSION → v$NEW_VERSION
📝 Files changed:
- CHANGELOG.md (added v$NEW_VERSION entry)
- plugin.json (version bumped)
- [other modified files]
🔄 IMPORTANT: Plugin Version Context
The current Claude session is still using v$OLD_VERSION (cached).
To test the new v$NEW_VERSION:
1. Headless Claude instances will pick up v$NEW_VERSION
→ Use: claude --dangerously-skip-permissions "command"
2. Sub-agents spawned from this session will use v$OLD_VERSION
→ They see cached plugin context
3. New interactive sessions will load v$NEW_VERSION
→ Restart Claude Code or open new terminal
✅ Recommended: Test with headless before committing
Ask user: "Ready to commit these changes? [y/n]"
If yes:
git -C /path/to/surf-market add plugins/$PLUGIN_NAME/
git -C /path/to/surf-market commit -m "chore($PLUGIN_NAME): $BRIEF_SUMMARY
- [list key changes]
Version: $OLD_VERSION → $NEW_VERSION"
Mark Phase 5 as completed
Mark all todos as completed
Output: Verification summary and commit (if approved)
# After editing commands/work.md
/update-plugin meta
# Interactive prompts:
# → Change type: Changed
# → Description: Removed output limit to show all ready items
# → Semver bump: Patch
# → Shows changelog preview
# → Shows diff
# → Commit? y
# Result:
# - CHANGELOG.md updated
# - plugin.json: 0.3.2 → 0.3.3
# - Changes committed
# - Reminded to test with headless
This command should be triggered:
/update-plugin <name>When NOT to use:
Command version: 1.0.0 Created: 2025-12-20