changelog-update
Sync CHANGELOG.md unreleased section with recent commits. Use when the user wants to update the changelog, sync it with commits, or prepare changelog entries. Also handles first-time changelog initialization when no CHANGELOG.md exists.
- License 许可
- MIT
- 所属仓库
- nseng-ai/ns
- 最近更新
- 2026-10-02
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- changelog-update
- description
- Sync CHANGELOG.md unreleased section with recent commits. Use when the user wants to update the changelog, sync it with commits, or prepare changelog entries. Also handles first-time changelog initialization when no CHANGELOG.md exists.
- allowed-tools
- [ "Bash(git *)", "Bash(date *)" ]
- disable-model-invocation
- true
02 资源文件 4
- 参考文档agents/openai.yaml43 B
- 参考文档references/changelog-format.md2.6 KB
- 参考文档references/commit-categorization.md6.0 KB
- 参考文档references/commit-fetching.md2.4 KB
03 SKILL.md 正文
changelog-update
Sync the CHANGELOG.md [Unreleased] section with commits merged since the
last update. Uses pure git commands -- no external tools or language-specific
dependencies.
Workflow
Phase 1: Detect / Initialize
Check if CHANGELOG.md exists in the repository root.
If it does not exist:
- Get the current HEAD hash:
git rev-parse --short HEAD - Create
CHANGELOG.mdusing the template fromreferences/changelog-format.mdwith the<!-- As of: {HEAD} -->marker set to the current HEAD - Report: "Initialized CHANGELOG.md with empty Unreleased section (as of {HEAD})."
- Stop. There are no commits to categorize since the marker is at HEAD.
If it exists: proceed to Phase 2.
Phase 2: Fetch Commits
Follow the procedure in references/commit-fetching.md to:
- Parse the "As of" marker from the
[Unreleased]section - Fall back to the last release tag if no marker exists
- Get all commits since the base using
git log --first-parent - Collect details for each commit (subject, body, files changed, PR number)
If no commits found:
- Update the "As of" marker to current HEAD
- Report: "CHANGELOG.md is already up-to-date. Updated marker to {HEAD}."
- Stop.
Phase 3: Categorize
- Read existing entries in the Unreleased section to avoid suggesting duplicates.
- Apply categorization rules from
references/commit-categorization.md:- Classify each commit into: Major Changes, Added, Changed, Fixed, Removed
- Filter out internal-only changes (tests, CI, docs, build tooling, etc.)
- Detect roll-ups (multiple related commits -> single entry)
- Flag low-confidence categorizations
Phase 4: Present Proposal
CRITICAL: Do NOT edit the changelog yet.
Display the proposal in this format:
Found {n} commits since last sync ({since_commit}).
**Proposed Entries:**
**Major Changes ({count}):**
1. `{hash}` - {proposed description}
- Reasoning: {why this is a major change}
**Added ({count}):**
1. `{hash}` - {proposed description}
**Changed ({count}):**
...
**Fixed ({count}):**
...
**Removed ({count}):**
...
**Filtered Out ({count}):**
- `{hash}` - "{original message}" -> {reason for filtering}
---
**Low-Confidence Categorizations:**
- `{hash}` - Categorized as {category}, but could be {alternative}
- Uncertainty: {explanation}
---
Would you like me to:
1. Approve and update the changelog?
2. Adjust any categorizations?
3. Rephrase any entry descriptions?
4. Include or exclude any commits?
Only include category sections that have entries. Omit empty categories. Only include the Low-Confidence section if there are flagged entries.
Wait for the user to approve or request changes.
Phase 5: Update CHANGELOG.md
Only proceed after the user confirms or provides adjustments.
- Update the "As of" marker to the current HEAD commit hash
- Add new entries under the appropriate category headers in the Unreleased section
- Preserve existing entries -- do not remove or modify them
- If a category header already exists, append new entries below existing ones
Category order and header rules: references/changelog-format.md §Category Order.
Phase 5 Report
After successful update:
Updated CHANGELOG.md:
- Processed {n} commits
- Added {m} entries to: {categories}
- Filtered {f} commits
- Now as of {HEAD}
Entry format
Entry format examples (unreleased-with-hash, released-stripped, Major Changes):
references/changelog-format.md §Entry Format.
Writing guidelines:
- Start with a verb: Add, Fix, Improve, Remove, Move, Migrate
- Focus on user benefit, not implementation details
- Be concise but clear (one sentence)
- Include the short commit hash in parentheses
- For roll-ups covering multiple commits, list all hashes:
(hash1, hash2, hash3)
04 同仓库更多 Skills
pr-make-accountable
Interview a PR author to establish shared understanding of intent and design decisions, then co-author the What / Why / Changes PR body with opt-in Requested reviewer focus.
typescript-style
Opinionated style guide for strict, portable TypeScript. Use when writing, designing, or reviewing TypeScript: type design, boundary validation, error handling, module architecture, and review discipline.
typescript-fake-driven-testing
TypeScript fake-driven testing architecture. Use when writing or reviewing TS code with external dependencies, gateway interfaces, real adapters, in-memory fakes, or CLI scenario tests.
ns-typescript
TypeScript overlay for ns-style projects. Use when editing or reviewing TS in this repo: tsconfig baseline, pnpm/Vitest/oxlint/oxfmt/native tsc commands, relative .ts imports, workspace subpath exports, and the exactOptionalPropertyTypes spread idiom. Repo-specific enforcement (test lanes, time seams, style guard) lives in the host repo's AGENTS.md.
ns-typescript-style-tripwire
Invoke the ns TypeScript style Tripwire against a supplied diff or current branch.
skill-management
Manage skills with `npx skills`: add, edit, remove, rename, update, or list skills (local or GitHub), and the nested `skills/<disposition>/.../<name>/` / flat `.agents/skills/` layout conventions.