From why-log
Use when generating a release changelog or preparing a new version — parses git commits with "Why:" blocks and produces a structured CHANGELOG.md grouped by conventional commit type
How this skill is triggered — by the user, by Claude, or both
Slash command
/why-log:release-changelogThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a structured `CHANGELOG.md` from git history. Parses conventional commit messages with `Why:` blocks to produce a changelog that explains both **what** changed and **why**.
Generate a structured CHANGELOG.md from git history. Parses conventional commit messages with Why: blocks to produce a changelog that explains both what changed and why.
digraph release_changelog {
"User invokes /release-changelog" [shape=doublecircle];
"Find last version tag" [shape=box];
"Parse commits since tag" [shape=box];
"Determine version bump" [shape=box];
"Group by commit type" [shape=box];
"Generate changelog entry" [shape=box];
"Prepend to CHANGELOG.md" [shape=box];
"Show result to user" [shape=doublecircle];
"User invokes /release-changelog" -> "Find last version tag";
"Find last version tag" -> "Parse commits since tag";
"Parse commits since tag" -> "Determine version bump";
"Determine version bump" -> "Group by commit type";
"Group by commit type" -> "Generate changelog entry";
"Generate changelog entry" -> "Prepend to CHANGELOG.md";
"Prepend to CHANGELOG.md" -> "Show result to user";
}
Run:
git tag --sort=-v:refname | head -1
If no tags exist, parse all commits from the beginning of history. Ask the user what the initial version should be (suggest 0.1.0).
Run:
git log <last-tag>..HEAD --format="%H%n%s%n%b%n---COMMIT-END---"
If no tag exists:
git log --format="%H%n%s%n%b%n---COMMIT-END---"
For each commit, extract:
type, scope, and summary using pattern ^(\w+)\(([^)]+)\): (.+)$Why: block — everything after Why: until end of body or next blank lineCheck the commit types collected:
feat → minor bump (e.g., 1.2.0 → 1.3.0)fix, perf, refactor, etc. → patch bump (e.g., 1.2.0 → 1.2.1)BREAKING CHANGE: → major bump (e.g., 1.2.0 → 2.0.0)Present the suggested version to the user and let them confirm or override.
Group commits by type using this mapping:
| Commit Type | Section Heading |
|---|---|
| feat | Features |
| fix | Fixes |
| refactor | Refactors |
| perf | Performance |
| docs | Documentation |
| chore | Maintenance |
| test | Tests |
| style | (omit from changelog) |
| (no match) | Other |
Format each entry:
With Why: block:
- **scope**: summary
> Why text here
Without Why: block:
- **scope**: summary
Without conventional commit format:
- commit subject as-is
Omit empty sections. Order sections: Features → Fixes → Performance → Refactors → Documentation → Maintenance → Tests → Other.
Compose the full entry:
## [<version>] - <YYYY-MM-DD>
### <Section>
- **scope**: summary
> Why text
...
If CHANGELOG.md exists, prepend the new entry after the # Changelog header (or at the top if no header). If it doesn't exist, create it with:
# Changelog
## [<version>] - <YYYY-MM-DD>
...
Display the generated entry to the user. Ask if they want to:
Merge branch..., Merge pull request...)Co-Authored-By out of the changelog — only parse subject and Why: blockWhy: to end of body, trimming trailing whitespacenpx claudepluginhub sharifli4/why-logProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.