Universal Documentation Updater
Analyzes git changes since the latest release tag and updates the documentation files that should change with them.
Overview
Use git history to identify release-relevant changes, then update README.md, CHANGELOG.md, and any relevant documentation folders. Keep the workflow focused on explicit user approval, precise edits, and repository-specific documentation structure.
When to Use
Use this skill when:
- Preparing release notes or an
Unreleased changelog update
- Syncing
README.md or documentation after feature work lands
- Reviewing what changed since the last release before a PR or release
Prerequisites
Before starting, verify that the following conditions are met:
If no tags exist, inform the user that this skill requires at least one release tag to compare against.
Instructions
Phase 1: Detect Last Release Version
Goal: Identify the latest released version to compare against.
Actions:
- Detect the comparison baseline and display it:
Goal: Analyze all changes between the last release and current branch.
Actions:
- Get the commit range and statistics:
- Extract commit messages for analysis:
- Get detailed file changes:
- Identify component areas based on file paths:
Phase 3: Discover Documentation Structure
Goal: Identify all relevant documentation locations in the project.
Actions:
- Find standard documentation folders:
- Identify existing documentation files:
Phase 4: Generate CHANGELOG Updates
Goal: Create categorized changelog entries following Keep a Changelog standard.
Actions:
-
Parse commits using conventional commit semantics and map them into Keep a Changelog sections such as Added, Changed, Fixed, Removed, and Security.
-
Read the existing CHANGELOG.md to understand structure, then generate new entries following Keep a Changelog format.
See references/examples.md for detailed bash commands and changelog templates.
Phase 5: Update README.md
Goal: Update the main README with relevant high-level changes.
Actions:
- Read the current README.md to understand its structure
- Identify sections needing updates (features list, skills/agents, setup instructions, version references)
- Apply updates using Edit tool: preserve structure, maintain tone, update version numbers
Phase 6: Update Documentation Folders
Goal: Propagate changes to relevant documentation in docs/ folders.
Actions:
- For each documentation folder found, check for files referencing changed code
- Map changed files to their documentation
- Generate updates: add new feature docs, update API references, fix outdated examples
See references/examples.md for detailed discovery patterns and update strategies.
Phase 7: Present Changes for Review
Goal: Show the user what will be updated before applying changes.
Actions:
- Present a summary of proposed changes:
- Ask the user for confirmation via AskUserQuestion:
- Confirm which files to update
- Ask if any changes should be modified
- Get approval to proceed
Phase 8: Apply Documentation Updates
Goal: Write the approved updates, then verify they landed correctly.
Actions:
- Update CHANGELOG.md:
- Update README.md using Edit tool:
- Make targeted edits to specific sections
- Preserve overall structure
- Update version numbers if applicable
- Update documentation files:
- Validate the applied changes:
- If the repository already defines documentation or markdown validation commands, run them before finishing.
Examples
Example 1: Update After Feature Development
User request: "Update docs for the new features I just added"
Output:
- Latest tag: v2.4.1 → Current branch: develop
- 5 commits analyzed
- CHANGELOG entry generated for new Spring Boot Actuator skill
- README.md skills list updated
Example 2: Prepare Release Documentation
User request: "Prepare documentation for v2.5.0 release"
Output:
- 47 commits analyzed since v2.4.1
- 15 features, 8 fixes, 3 breaking changes detected
- Complete CHANGELOG.md [2.5.0] section generated
- README.md and plugin docs updated
Example 3: Incremental Sync
User request: "Sync docs, I've made some changes"
Output:
- 2 commits analyzed
- Focused CHANGELOG update for github-issue-workflow skill changes
- No README or plugin doc updates needed
See references/examples.md for detailed session transcripts and troubleshooting.
Best Practices
- Preview before writing, verify after writing: Show the plan first, then confirm the final diff after edits
- Follow Keep a Changelog: Maintain consistent changelog formatting
- Categorize properly: Use correct categories (Added, Changed, Fixed, etc.)
- Be specific: Include plugin/component names in changelog entries
- Preserve structure: Maintain existing documentation structure and style
- Reference commits: Include commit hashes for traceability when helpful
- Handle breaking changes: Clearly highlight breaking changes with migration notes
- Update version refs: Keep version numbers consistent across documentation
Constraints and Warnings
- Requires git tags: This skill only works if the repository has at least one release tag
- Read-only analysis: The skill analyzes changes but asks before writing
- Manual review required: Generated changelog entries should be reviewed for accuracy
- Conventional commits: Works best with projects using conventional commit format
- Does not create tags: This skill updates docs but does not create release tags
- No auto-commit: Documentation changes are prepared but not committed automatically
- Project-specific patterns: Some projects may have custom changelog formats to respect
- File paths: All file paths use forward slashes (Unix style) for cross-platform compatibility