ai-changelog — Claude Code skill: setup and usage
ai-changelog sets up an AI-maintained CHANGELOG.md workflow across your project. Configures CalVer, SemVer, or simple date-based logging for non-code repositories.
Apache-2.0 ★ 173 updated 2026-11-04
npx skills add sammcj/agentic-coding --skill ai-changelog -a claude-codeWhat ai-changelog does
The skill inspects build manifests like package.json, Cargo.toml, or pyproject.toml to detect the project type and versioning format. In software projects, agents append bullet points only beneath the ## [Unreleased] block. Actual version bumping stays handled by automated build targets using an included scripts/version.py helper.
For documentation repositories or note collections without build systems, it switches to Dated mode. This path bypasses Python scripts completely and instructs the agent to log concise bullets under ## YYYY-MM-DD headers. The setup also injects logging rules into CLAUDE.md so models avoid logging trivial formatting edits.
Running scripts/version.py requires uv with Python 3.12+. When the [Unreleased] block contains no entries, release stamping exits cleanly to avoid creating empty version logs.
What it helps with
- automate changelog maintenance for coding agents
- set up CalVer or SemVer release stamping across project manifests
- add date-based change logs to non-software and doc repositories
- restrict agent changelog entries to concise, user-facing lines
Example prompts for the agent
- Set up an AI-driven changelog system for this repository
- Configure SemVer changelog stamping and update CLAUDE.md
- Add a date-based changelog workflow for our docs project
How to install ai-changelog
1Skills CLI (Vercel)
npx skills add sammcj/agentic-coding --skill ai-changelog -a claude-code2Manually: put the files in place
~/.claude/skills/ai-changelog/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ai-changelog/
1Skills CLI (Vercel)
npx skills add sammcj/agentic-coding --skill ai-changelog -a codex2Manually: put the files in place
.agents/skills/ai-changelog/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add sammcj/agentic-coding --skill ai-changelog -a cursor2Manually: put the files in place
.cursor/skills/ai-changelog/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install sammcj/agentic-coding Skills/ai-changelog/SKILL.md2Manually: put the files in place
.github/skills/ai-changelog/SKILL.md1Skills CLI (Vercel)
npx skills add sammcj/agentic-coding --skill ai-changelog -a gemini-cli2Platform CLI
gemini skills install https://github.com/sammcj/agentic-coding --path Skills/ai-changelogManually: put the files in place
.devin/skills/ai-changelog/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ai-changelog
How to install ai-changelog in Claude Code?
Run npx skills add sammcj/agentic-coding --skill ai-changelog -a claude-code in your terminal, or place the skill definition at ~/.claude/skills/ai-changelog/SKILL.md.
What does the ai-changelog skill do?
It configures CHANGELOG.md, installs the scripts/version.py script for manifest updates, and adds guidelines to CLAUDE.md so agents log changes properly.
What happens if a project already has a CHANGELOG.md?
Existing change history is preserved; the skill injects the [Unreleased] block or current date header directly above previous entries.
Source text
SKILL.md · Apache-2.0
--- name: ai-changelog description: Set up an AI-driven changelog system in any project, code or not. Suitable for both software projects and for non-code projects. Creates a CHANGELOG.md and instructions for agents to log changes. Use when the user wants to add or improve automated changelog management, AI-friendly changelog workflows, version stamping, or set up a changelog system for a new or existing project. allowed-tools: Read Write Edit Bash Glob Grep --- # AI-Driven Changelog Set up a changelog system AI agents maintain during development. Two shapes, chosen by project type: - **Software projects**: agents write entries under `## [Unreleased]`; automation stamps version numbers at release time (CalVer or SemVer). No agent ever writes version numbers; the build process handles that. - **Non-code projects** (no build system): agents add terse bullets under a date heading (`## YYYY-MM-DD`) by hand. No script, no version numbers. See `references/dated.md`. ## Setup workflow 1. **Detect the build system**: Check for Makefile, Justfile, package.json, Cargo.toml, pyproject.toml, go.mod. Note which config files contain a `"version"` field. 2. **Check whether this is a software project at all.** If there's no build system from step 1 and no version convention (a docs repo, writing or notes vault, content site, research or config collection), use **Dated** mode: date-based changelog headings, no version script, no build integration. Skip straight to `references/dated.md` and ignore the script/build steps below. Otherwise, **detect the versioning scheme** by inspecting (highest confidence first): - `CHANGELOG.md` heading style: `## [YYYY.M.N]` headings → CalVer; `## [X.Y.Z]` headings or prose mentioning "SemVer" → SemVer - Git tags from `git tag --list | head`: `vX.Y.Z` → SemVer; `YYYY.M.N` → CalVer - `VERSION` file with content matching `^[0-9]+\.[0-9]+\.[0-9]+` → SemVer - Manifest version field (`package.json`, `Cargo.toml`, `pyproject.toml`) matching `X.Y.Z` → SemVer If signals are absent or contradictory, ask the user. Suggest SemVer for projects with established version history (existing tags, manifest versions, prior changelog entries) and CalVer for greenfield projects where automatic versioning is preferable. Each scheme has trade-offs documented in its reference file. 3. **Read the scheme reference** that matches the chosen scheme. It contains the build integration recipes, CLAUDE.md snippet, GitHub Actions pattern, and scheme-specific gotchas: - CalVer → `references/calver.md` - SemVer → `references/semver.md` - Dated (non-code projects) → `references/dated.md` 4. **Ask the user** about optional features (CalVer/SemVer only; skip for Dated mode): - Pinned `## Known Bugs` section above `## [Unreleased]`? (default: yes) - GitHub Actions release workflow integration? (default: skip unless asked) 5. **Generate or update CHANGELOG.md**. For CalVer/SemVer use `references/changelog-template.md`; for Dated use the template in `references/dated.md`. If a CHANGELOG.md already exists, do NOT overwrite it; insert the HTML comment and the appropriate structure (`## [Unreleased]` for CalVer/SemVer, today's date heading for Dated) above existing entries. 6. **Copy `scripts/version.py`** from this skill into the target project's `scripts/` directory. Make it executable (`chmod +x`). _Skip in Dated mode - there is no script._ 7. **Apply the scheme reference**: follow the build-integration recipe from the chosen reference file. Add targets to the existing build system, or create a minimal Makefile if none exists. _Skip in Dated mode - there is no build integration._ 8. **Update CLAUDE.md** with the snippet from the chosen scheme reference. Insert into the project's development workflow section, or create one. In Dated mode this is the only mechanism that keeps the changelog current, so make sure the snippet lands. Add "Squash changes within the same day/version (do not add changes to changes)." Keep the snippet's what-to-log and entry-length rules intact - they are what stops agents logging trivia and writing paragraphs for simple changes. 9. **Verify**: - CalVer: `uv run scripts/version.py version` should print today's CalVer; then `uv run scripts/version.py stamp --dry-run` previews the stamp - SemVer: `uv run scripts/version.py stamp --version <current-version> --dry-run --changelog-only` previews the stamp without touching the canonical version source - Dated: confirm CHANGELOG.md has today's date heading and the CLAUDE.md snippet is in place; nothing to run ## Project detection Indicator, then what to stamp and how to integrate: - `Makefile` - stamp whatever config files the project has; add make targets - `Justfile` - same config files; add just recipes - `package.json` - stamp `package.json`; add npm scripts, or a Makefile - `Cargo.toml` - stamp `Cargo.toml`; Makefile wrapper - `pyproject.toml` - stamp `pyproject.toml`; Makefile wrapper - `go.mod` - stamp `VERSION` if present, otherwise nothing; Makefile wrapper - `VERSION` file - stamp `VERSION`; Makefile wrapper - No build system, code project - nothing to stamp; create a minimal Makefile - No build system, non-code project - Dated mode: no script, no Makefile ## How the script works `scripts/version.py` subcommands: - `version`: prints today's CalVer to stdout (CalVer projects only) - `stamp`: replaces `## [Unreleased]` with `## [VERSION] - DATE`, re-inserts a fresh `## [Unreleased]`, and stamps version into auto-discovered config files (`package.json`, `Cargo.toml`, `pyproject.toml`, `tauri.conf.json`, `VERSION`) Flags: `--version X.Y.Z` (required for SemVer; optional override for CalVer), `--dry-run`, `--changelog-only`, `--no-changelog`. The script is scheme-agnostic. With no `--version`, it auto-computes CalVer; with `--version`, it stamps whatever string you give it. Validation lives in the build system, so SemVer recipes always pass `--version` and reject malformed input before invoking the script. See `references/semver.md` for why this split matters. Run via `uv run scripts/version.py stamp` (stdlib only). uv supplies the Python 3.12+ its inline metadata requires. ## Gotchas - **Never overwrite existing changelog history.** If a CHANGELOG.md exists with content, merge the `[Unreleased]` structure into it rather than replacing the file. - **Empty Unreleased section**: stamping is a no-op if `[Unreleased]` has no content. This prevents empty version entries. - **`fetch-depth: 0` in CI for CalVer**: CalVer uses `git rev-list --count HEAD`. Shallow clones produce wrong commit counts. - **A changelog is not a commit log.** Two rules keep it useful, and both must appear in the HTML comment and the CLAUDE.md snippet: log only reader-visible changes (git history covers the rest), and keep entries to one line unless the change is genuinely complex. Without them agents log formatting tweaks and write paragraphs for one-line fixes. - **The HTML comment is the agent's instruction source.** The `<!-- AI agents: ... -->` comment in CHANGELOG.md tells future agents how to write entries. Don't omit it. - **Known Bugs stays pinned.** The stamp script preserves `## Known Bugs` above `## [Unreleased]`. If you add it, agents should maintain it there. - **SemVer + auto-CalVer = silent footgun.** If a Makefile in a SemVer project calls `uv run scripts/version.py stamp` without `--version`, the script auto-computes CalVer and writes that into the changelog. The recipes in `references/semver.md` always pass `--version`; preserve that contract in any custom integration. - **Run it with `uv`, not `python3`.** macOS's stock `python3` is 3.9 and fails on the script's `str | None` hints with a `TypeError`. - **Config file stamping is first-match-only for TOML.** The regex replaces only the first `version = "..."` line, which is the package version. Dependency versions are unaffected. - **VERSION file stamping requires existing semver-shaped content.** The script's `VERSION` handler only rewrites the file if its current content matches `^\d+\.\d+\.\d+`. Build numbers, tag-prefixed versions, or other formats are left alone.
© sammcj · Apache-2.0 · sammcj/agentic-coding