$npx -y skills add decebals/claude-code-java --skill changelog-generatorGenerate changelogs from git commits. Use when user says "generate changelog", "update changelog", "what changed since last release", or before preparing a new release.
| 1 | # Changelog Generator Skill |
| 2 | |
| 3 | Generate changelogs from conventional commits for Java projects. |
| 4 | |
| 5 | ## When to Use |
| 6 | - Before a release |
| 7 | - User says "generate changelog" / "update changelog" / "what changed since last release" |
| 8 | - After completing a milestone |
| 9 | |
| 10 | ## Versioning Convention Detection |
| 11 | |
| 12 | Detect versioning style using this priority order: |
| 13 | |
| 14 | ### 1. Check CLAUDE.md (if exists) |
| 15 | ```bash |
| 16 | grep -A5 "## Versioning" CLAUDE.md 2>/dev/null |
| 17 | ``` |
| 18 | |
| 19 | Look for explicit convention: |
| 20 | ```markdown |
| 21 | ## Versioning |
| 22 | This project uses Semantic Versioning (x.y.z). |
| 23 | Tag format: `release-x.y.z` |
| 24 | ``` |
| 25 | |
| 26 | ### 2. Fallback: Detect from git tags |
| 27 | ```bash |
| 28 | git tag --sort=-version:refname | head -10 |
| 29 | ``` |
| 30 | |
| 31 | | Pattern detected | Versioning style | |
| 32 | |------------------|------------------| |
| 33 | | `v3.15.0`, `3.15.0` | SemVer (x.y.z) | |
| 34 | | `release-3.15.0` | SemVer with prefix | |
| 35 | | `v2.1`, `2.1` | Two-component (x.y) | |
| 36 | | `2026.01`, `26.1` | CalVer | |
| 37 | | No pattern | Ask user | |
| 38 | |
| 39 | ### 3. Fallback: Detect from CHANGELOG.md |
| 40 | ```bash |
| 41 | grep -E "^\#+ \[.*\]" CHANGELOG.md | head -5 |
| 42 | ``` |
| 43 | |
| 44 | Extract version format from existing entries. |
| 45 | |
| 46 | ### 4. Last resort: Ask user |
| 47 | ``` |
| 48 | No versioning convention detected. Which format does this project use? |
| 49 | - Semantic Versioning (x.y.z) - e.g., 3.15.0 |
| 50 | - Two-component (x.y) - e.g., 2.1 |
| 51 | - Calendar Versioning - e.g., 2026.01 |
| 52 | ``` |
| 53 | |
| 54 | ### Supported Versioning Styles |
| 55 | |
| 56 | | Style | Format | Tag examples | Version bump | |
| 57 | |-------|--------|--------------|--------------| |
| 58 | | SemVer | x.y.z | `v3.15.0`, `release-3.15.0` | major.minor.patch | |
| 59 | | Two-component | x.y | `v2.1`, `2.1` | major.minor | |
| 60 | | CalVer | YYYY.MM[.patch] | `2026.01`, `2026.01.1` | year.month[.patch] | |
| 61 | |
| 62 | ### Legacy Projects (CLAUDE.md without versioning section) |
| 63 | |
| 64 | If CLAUDE.md exists but has no versioning info: |
| 65 | 1. Don't assume - detect from tags/changelog |
| 66 | 2. If detected, optionally suggest adding to CLAUDE.md: |
| 67 | ``` |
| 68 | Detected versioning: SemVer (x.y.z) with tag prefix 'release-' |
| 69 | Want me to add this to CLAUDE.md for future reference? |
| 70 | ``` |
| 71 | |
| 72 | ## Output Format |
| 73 | |
| 74 | Supports two formats - detect from existing CHANGELOG.md or ask user preference. |
| 75 | |
| 76 | ### Format A: Keep a Changelog (h2 versions) |
| 77 | ```markdown |
| 78 | # Changelog |
| 79 | |
| 80 | ## [Unreleased] |
| 81 | |
| 82 | ## [1.2.0] - 2026-01-29 |
| 83 | |
| 84 | ### Added |
| 85 | - [#123]: New feature for plugin dependencies |
| 86 | |
| 87 | ### Changed |
| 88 | - [#456]: Improved performance of plugin loading |
| 89 | |
| 90 | ### Fixed |
| 91 | - [#234]: Resolved NPE when directory missing |
| 92 | ``` |
| 93 | |
| 94 | ### Format B: pf4j style (h3 versions) |
| 95 | ```markdown |
| 96 | ## Change Log |
| 97 | |
| 98 | ### [Unreleased][unreleased] |
| 99 | |
| 100 | ### [3.15.0] - 2026-01-29 |
| 101 | |
| 102 | #### Added |
| 103 | - [#123]: New feature for plugin dependencies |
| 104 | |
| 105 | #### Changed |
| 106 | - [#456]: Improved performance of plugin loading |
| 107 | |
| 108 | #### Fixed |
| 109 | - [#234]: Resolved NPE when directory missing |
| 110 | ``` |
| 111 | |
| 112 | ## Reference-Style Links (Recommended) |
| 113 | |
| 114 | Use reference-style links for cleaner, more readable entries: |
| 115 | |
| 116 | ```markdown |
| 117 | #### Fixed |
| 118 | - [#648]: Restore missing `module-info.class` in multi-release JAR |
| 119 | - [#625]: Fix exception handling inconsistency in `startPlugin()` |
| 120 | |
| 121 | #### Added |
| 122 | - [#629]: Validate dependency state on plugin start |
| 123 | - [#633]: Allow customization of `PluginClassLoader` parent delegation |
| 124 | |
| 125 | <!-- At the bottom of the file --> |
| 126 | [#648]: https://github.com/user/repo/issues/648 |
| 127 | [#633]: https://github.com/user/repo/pull/633 |
| 128 | [#629]: https://github.com/user/repo/pull/629 |
| 129 | [#625]: https://github.com/user/repo/pull/625 |
| 130 | ``` |
| 131 | |
| 132 | **Benefits:** |
| 133 | - Cleaner to read (no long URLs inline) |
| 134 | - Links defined once, reusable |
| 135 | - Easier to write and maintain |
| 136 | |
| 137 | ## Version Comparison Links |
| 138 | |
| 139 | Add comparison links at the bottom for easy diff viewing: |
| 140 | |
| 141 | ```markdown |
| 142 | [unreleased]: https://github.com/user/repo/compare/release-3.15.0...HEAD |
| 143 | [3.15.0]: https://github.com/user/repo/compare/release-3.14.1...release-3.15.0 |
| 144 | [3.14.1]: https://github.com/user/repo/compare/release-3.14.0...release-3.14.1 |
| 145 | ``` |
| 146 | |
| 147 | **Pattern:** `[version]: https://github.com/{owner}/{repo}/compare/{previous-tag}...{current-tag}` |
| 148 | |
| 149 | ## Section Order |
| 150 | |
| 151 | Adapt to existing file, or use this default order: |
| 152 | |
| 153 | | Section | When to use | |
| 154 | |---------|-------------| |
| 155 | | Fixed | Bug fixes | |
| 156 | | Changed | Changes to existing functionality | |
| 157 | | Added | New features | |
| 158 | | Deprecated | Soon-to-be removed features | |
| 159 | | Removed | Removed features | |
| 160 | | Security | Vulnerability fixes (CVEs) | |
| 161 | |
| 162 | Note: pf4j uses Fixed → Changed → Added → Removed. Keep a Changelog uses Added → Changed → Deprecated → Removed → Fixed → Security. |
| 163 | |
| 164 | **Rule: Follow existing file's order if present.** |
| 165 | |
| 166 | ## Mapping Conventional Commits to Changelog |
| 167 | |
| 168 | | Commit Type | Changelog Section | |
| 169 | |-------------|-------------------| |
| 170 | | feat | Added | |
| 171 | | fix | Fixed | |
| 172 | | perf | Changed | |
| 173 | | refactor | Changed | |
| 174 | | build(deps) | Changed or Security (if CVE) | |
| 175 | | BREAKING CHANGE | Changed (with bold note) | |
| 176 | | deprecate | Deprecated | |
| 177 | |
| 178 | ## Workflow |
| 179 | |
| 180 | 1. **Check for existing CHANGELOG.md** |
| 181 | ```bash |
| 182 | cat CHANGELOG.md | head -20 |
| 183 | `` |