Skip to content

Commit f1d2bb3

Browse files
authored
chore(claude): Add changelog updating to PR and standalone skills (#926)
## Summary Integrates changelog updating into the Claude Code PR creation workflow and adds a standalone `/update-changelogs` skill. Moves the changelog documentation from the README into a dedicated file at `docs/contributing/updating-changelogs.md` so it can be referenced by both skills and human contributors. - Add a mandatory "Update changelogs" phase (Phase 4) to the PR skill, before PR creation - Add a standalone `update-changelogs` skill for ad-hoc changelog updates - Move changelog documentation from `README.md` to `docs/contributing/updating-changelogs.md` with minor wording improvements - Update `.gitignore` to track `docs/contributing/` ## Testing These changes are to documentation and Claude Code skill definitions. Verified that: - The relative links from skill files to the changelog docs resolve correctly - The `.gitignore` change correctly tracks the new `docs/contributing/` directory - The README link to the extracted documentation is valid 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to documentation, Claude skill instructions, and `.gitignore` rules with no runtime code or release logic changes. > > **Overview** > Adds a mandatory **"Update changelogs"** phase to the `.claude/skills/pr` workflow, requiring contributors to follow `docs/contributing/updating-changelogs.md` and commit changelog updates before running `gh pr create`. > > Introduces a standalone `.claude/skills/update-changelogs` skill for ad-hoc changelog updates, moves the changelog guidance from `README.md` into `docs/contributing/updating-changelogs.md`, and updates `.gitignore` so `docs/contributing/` is tracked. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit d4c0024. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent a9f755c commit f1d2bb3

5 files changed

Lines changed: 50 additions & 31 deletions

File tree

.claude/skills/pr/SKILL.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,20 @@ Otherwise, after all launched subagents complete:
107107
- Abort
108108
4. If there are no blockers, briefly summarize the findings and proceed.
109109

110-
## Phase 4: Create the PR
110+
## Phase 4: Update changelogs
111111

112-
5. Run `gh pr create` to create a pull request. The PR body should include:
112+
**MANDATORY — DO NOT SKIP.** Each PR must update changelogs for all packages with consumer-facing changes.
113+
Read the instructions in [`docs/contributing/updating-changelogs.md`](../../../docs/contributing/updating-changelogs.md) and follow them to the letter.
114+
Commit the changes to the current branch with the commit message "docs: Update changelogs" before creating the PR.
115+
116+
## Phase 5: Create the PR
117+
118+
1. Run `gh pr create` to create a pull request. The PR body should include:
113119

114120
- A brief narrative description of the PR
115121
- A summary of the changes (bullet points)
116122
- A brief description of how the code is tested (narrative, not a checklist)
117123

118124
**If this is a stacked PR**, add `--draft` to create it as a draft PR.
119125

120-
6. Return the PR URL and any relevant information. If a review was performed, include the review summary.
126+
2. Return the PR URL and any relevant information. If a review was performed, include the review summary.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: update-changelogs
3+
description: Updates changelogs for all packages with consumer-facing changes.
4+
---
5+
6+
When asked to update changelogs, follow these steps:
7+
8+
1. Read the instructions in [`docs/contributing/updating-changelogs.md`](../../../docs/contributing/updating-changelogs.md) and follow them to the letter.
9+
2. Commit the changes to the current branch with the commit message "docs: Update changelogs" before creating the PR.
10+
3. Return the commit hash and the commit message.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dist/
33
coverage/
44
docs/*
55
!docs/*.md
6+
!docs/contributing
67

78
# Logs
89
logs

README.md

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -64,34 +64,7 @@ See [`packages/create-package/README.md`](packages/create-package/README.md).
6464

6565
### Updating changelogs
6666

67-
Each package in this repo has a file named `CHANGELOG.md` which is used to
68-
record consumer-facing changes that have been published over time. All
69-
changelogs follow the ["Keep a Changelog"](https://keepachangelog.com/)
70-
specification (enforced by `@metamask/auto-changelog`).
71-
72-
If a PR introduces a consumer-facing change to one or more packages, their changelogs must
73-
be updated. This is enforced by CI. When updating changelogs, keep the following in mind:
74-
75-
- A changelog is not a git history; it is a summary of consumer-facing changes introduced by
76-
a particular release.
77-
- Consider each PR from the perspective of a consumer of an individual package. Changelog
78-
entries may differ between packages.
79-
- For example, if you're introducing feature X to package A, and it contains an incidental
80-
change Y to package B, the package changelogs should reflect this.
81-
- Place new entries under the "Unreleased" section.
82-
- Place changes into categories. Consult the ["Keep a Changelog"](https://keepachangelog.com/en/1.1.0/#how) specification for the list.
83-
- Highlight breaking changes by prefixing them with `**BREAKING:**`.
84-
- Omit non-consumer facing changes from the changelog.
85-
- Do not simply reuse the commit message, but describe exact changes to the API or usable
86-
surface area of the project.
87-
- Use a list nested under a changelog entry to enumerate more details about a change if need be.
88-
- Include links (e.g. `#123) to the pull request(s) that introduced each change.
89-
- Combine like changes from multiple pull requests into a single changelog entry if necessary.
90-
- Split disparate changes from the same pull request into multiple entries if necessary.
91-
- Omit reverted changes from the changelog.
92-
93-
If your PR does not contain any consumer-facing changes, add the label `no-changelog`, and the
94-
changelog validation CI job will be skipped.
67+
See [`docs/contributing/updating-changelogs.md`](docs/contributing/updating-changelogs.md).
9568

9669
### Releasing
9770

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Updating changelogs
2+
3+
Each package in this repo has a file named `CHANGELOG.md` which is used to
4+
record consumer-facing changes that have been published over time. All
5+
changelogs follow the ["Keep a Changelog"](https://keepachangelog.com/)
6+
specification (enforced by `@metamask/auto-changelog`).
7+
8+
If a PR introduces a consumer-facing change to one or more packages, their changelogs must
9+
be updated. This is enforced by CI. When updating changelogs, keep the following in mind:
10+
11+
- A changelog is not a git history; it is a summary of consumer-facing changes introduced by
12+
a particular release.
13+
- Consider each PR from the perspective of a consumer of an individual package. Changelog
14+
entries may differ between packages.
15+
- For example, if you're introducing feature X to package A, and it contains an incidental
16+
change Y to package B, the package changelogs should reflect this.
17+
- Describe entries in natural language; do not simply reuse the commit message.
18+
- Unless you're cutting a new release, place new entries under the "Unreleased" section.
19+
- Place changes into categories. Consult the ["Keep a Changelog"](https://keepachangelog.com/en/1.1.0/#how) specification for the list.
20+
- Highlight breaking changes by prefixing them with `**BREAKING:**`.
21+
- Omit non-consumer facing changes from the changelog.
22+
- Use a list nested under a changelog entry to enumerate more details about a change if need be.
23+
- Include links (e.g. `#123) to the pull request(s) that introduced each change.
24+
- Combine like changes from multiple pull requests into a single changelog entry if necessary.
25+
- Split disparate changes from the same pull request into multiple entries if necessary.
26+
- Only included reverted changes if they were previously released.
27+
28+
If your PR does not contain any consumer-facing changes, add the label `no-changelog`, and the
29+
changelog validation CI job will be skipped.

0 commit comments

Comments
 (0)