Agent skill
init-changelog
Create the foundational structure for changelog management. Use when the agent needs to start changelog management by creating a new `CHANGELOG.md` file and the commit pointer to update the changelog.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/init-changelog-mystilleef-llm-agent-skills
SKILL.md
Initialize changelog
This skill creates the main CHANGELOG.md file in the repository root
and initializes the commit pointer for incremental updates.
Purpose
This skill creates the foundational structure for changelog management:
- Main
CHANGELOG.mdfile in repository root .last-aggregated-commitpointer for tracking last processed commit- Proper Keep a Changelog format with standard sections
- Initial version detection from git tags or
package.json - Smart pointer initialization based on repository size
When to use
Invoke this skill when the user or agent needs to create CHANGELOG.md
and start changelog management.
Prerequisites:
- Git repository initialized (optional but recommended)
Behavior:
- Exits gracefully if
CHANGELOG.mdalready exists (no overwrite) - Creates Keep a Changelog format structure (non-customizable)
- Auto-detects version from git tags,
package.json,Cargo.toml, orpyproject.toml - Smart pointer initialization: first commit if ≤100 commits,
HEAD~100if >100
Workflow
- Run
scripts/init-changelog.sh - Verify
CHANGELOG.mdand.last-aggregated-commitcreation - Communicate success or failure to user
Logic overview
The script performs the following steps:
-
Verify prerequisites: Checks if
CHANGELOG.mdalready exists. If it does, exits gracefully with aWARNmessage. -
Detect current version: Checks for version in priority order:
- Git tags (using
git describe --tags) package.json(Node projects)Cargo.toml(Rust projects)pyproject.toml(Python projects)- Default to "0.1.0" if no version found
- Git tags (using
-
Create
CHANGELOG.md: Generates the main changelog file following Keep a Changelog format with all standard sections (Added, Changed, Deprecated, Removed, Fixed, Security). Includes both[Unreleased]section and a version section if the script detects a version. -
Initialize pointer: Creates
.last-aggregated-commitfile with smart detection:- ≤100 commits: Sets pointer to first commit (enables full history backfill)
- >100 commits: Sets pointer to
HEAD~100(backfillsrecent history, avoids slow initial run) - Non-git repository: Skips pointer creation
-
Verify creation: Ensures the script created
CHANGELOG.mdsuccessfully and outputs appropriate message.
Output
Files created:
CHANGELOG.md- Main changelog file in repository root.last-aggregated-commit- Pointer file for incremental updates (if git repository)
Status communication:
- Exit code
0: Success or warning (no action required) - Exit code
1: Failure
Stdout format: first line contains status:
SUCCESS: [message]- Changelog initialized successfullyWARN: [message]- Already exists, no changes madeERROR: [message]- Failed to create files (also exit 1)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?