Skip to content

chore(repo): add release-pr skill#2657

Open
xsahil03x wants to merge 2 commits into
masterfrom
chore/add-release-pr-skill
Open

chore(repo): add release-pr skill#2657
xsahil03x wants to merge 2 commits into
masterfrom
chore/add-release-pr-skill

Conversation

@xsahil03x
Copy link
Copy Markdown
Member

@xsahil03x xsahil03x commented May 18, 2026

Linear: FLU-

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (N/A — documentation/tooling only)

Description of the pull request

Adds a project-level Claude Code skill at .claude/skills/release-pr/SKILL.md.

Invoked locally via /release-pr <version> (e.g. /release-pr 9.24.0). The skill walks the maintainer through the established release-PR flow:

  1. Auto-derives the base branch from the version shape: X.Y.Zmaster, X.Y.Z-beta.Nv10.0.0, any other suffix → asks for the feature branch.
  2. Bumps versions in melos.yaml (the command.bootstrap.environment.dependencies block) and the 5 packages/*/pubspec.yaml version: fields, then runs melos bs to propagate to every other workspace pubspec and regenerate packages/stream_chat/lib/version.dart via the existing post-bootstrap hook.
  3. Finalises the 5 CHANGELOG.md files via a 4-rule decision tree (rename ## Upcoming Changes, add user-facing bullets, add the dep-bump line, or fall back to - Minor bug fixes and improvements).
  4. Sanity-checks with melos run analyze + melos run lint:pub.
  5. Commits with the load-bearing chore(repo): release v<X.Y.Z> message (parsed by release_tag.yml after merge).
  6. Generates the PR body from GitHub's releases/generate-notes API — exactly what the "Generate release notes" button produces in the release UI. Read-only; creates no release.
  7. Opens the PR. For beta/named pre-releases, surfaces the manual git tag + push reminder (release_tag.yml only fires on master).

Safety rails

  • disable-model-invocation: true — Claude can't autonomously decide to cut a release; user invokes manually.
  • The skill never creates a GitHub release, never pushes a tag, never runs melos run release:pub, never merges the PR. The existing release_tag.yml + release_publish.yml workflows own tagging and pub.dev publishing after merge.
  • allowed-tools is minimal: git, gh, melos, which, grep, plus Read / Edit / Write.

Test plan

  • Cut the next release using /release-pr <version> and confirm the resulting PR diff matches the shape of recent release PRs (e.g. chore(repo): release v9.23.0 #2492 for v9.23.0).
  • Verify the skill bails cleanly when any pre-flight check fails (dirty tree, missing gh auth, existing release branch, red CI on base).
  • Confirm the beta-release path surfaces the manual tag-push reminder in the success message.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive release process guidance documentation.

Review Change Stack

Project-level Claude Code skill at .claude/skills/release-pr/SKILL.md
for opening release PRs.

Invoked via `/release-pr <version>` (e.g. `/release-pr 9.24.0`).
- Auto-derives base branch from version shape: stable -> master,
  `-beta.N` -> v10.0.0, other suffix -> asks for the feature branch.
- Walks version bumps in melos.yaml + 5 pubspecs, then `melos bs`.
- Finalises CHANGELOGs via a 4-rule decision tree (rename upcoming,
  describe user-facing changes, dep-bump line, or minor fixes).
- Generates the PR body from GitHub's release-notes API (read-only,
  matches the "Generate release notes" button in the release UI).
- For beta/named pre-releases, surfaces the manual tag-push reminder.

disable-model-invocation: true so Claude can't autonomously decide to
cut a release. Read-only with respect to publishing: never creates
GitHub releases, never pushes tags, never merges. The release_tag.yml
+ release_publish.yml workflows handle tagging and pub.dev publishing
after merge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

📝 Walkthrough

Walkthrough

This PR introduces a comprehensive Claude skill document that codifies the release pull request workflow for stream-chat-flutter. The skill defines input validation, pre-flight checks, version/changelog update procedures, GitHub API-based PR body generation, and post-merge tag handling instructions, along with explicit prohibited actions to prevent common release mistakes.

Changes

Release PR Skill Documentation

Layer / File(s) Summary
Skill configuration and overview
.claude/skills/release-pr/SKILL.md
Front-matter metadata, overall behavior description, branch/base selection logic for stable (master) and beta (v10.0.0) releases, input specification, and tag selection for release-notes diffs.
Pre-flight validation
.claude/skills/release-pr/SKILL.md
Mandatory checks covering git state cleanliness, tool availability (melos, gh), GitHub authentication, absence of existing release branch, and CI pipeline status; all must pass before proceeding.
Version bumping and changelog updates
.claude/skills/release-pr/SKILL.md
Release branch creation, melos.yaml and package pubspec.yaml version editing, melos bootstrap, decision-tree-based changelog finalization across multiple packages with required version section formatting.
PR creation and merge workflow
.claude/skills/release-pr/SKILL.md
Post-edit linting/analysis verification, commit with required message format, GitHub release-notes API-based PR body generation, PR creation via gh cli, conditional post-merge tag reminders for beta/named releases, and explicit prohibited actions (no GitHub releases, tag pushes, or local publish).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A skill to release with careful thought,
Branch and tag and changelog brought,
Version bumps through melos flow,
GitHub notes to guide the show,
No forbidden paths hereto! 📋

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(repo): add release-pr skill' accurately describes the main change: adding a new Claude skill document for release PR management.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-release-pr-skill

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.claude/skills/release-pr/SKILL.md (1)

60-61: ⚡ Quick win

Clarify the CI green check criteria.

The instruction fetches 5 runs but says "no failures on the most recent runs" without specifying how many must pass. Consider clarifying to either "no failures in the latest run" or "no failures in any of the 5 most recent runs" to ensure consistent pre-flight validation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/release-pr/SKILL.md around lines 60 - 61, Clarify the CI
green check sentence that currently reads "Latest CI on the base-branch tip is
green: `gh run list --branch <base> --limit 5` — no failures on the most recent
runs." by making the pass criterion explicit: update the phrasing to either "no
failures in the latest run" or "no failures in any of the 5 most recent runs"
(or choose a different fixed count) so the intent is unambiguous; modify the
SKILL.md line containing the "Latest CI on the base-branch tip is green" text to
reflect the chosen explicit criterion.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.claude/skills/release-pr/SKILL.md:
- Around line 60-61: Clarify the CI green check sentence that currently reads
"Latest CI on the base-branch tip is green: `gh run list --branch <base> --limit
5` — no failures on the most recent runs." by making the pass criterion
explicit: update the phrasing to either "no failures in the latest run" or "no
failures in any of the 5 most recent runs" (or choose a different fixed count)
so the intent is unambiguous; modify the SKILL.md line containing the "Latest CI
on the base-branch tip is green" text to reflect the chosen explicit criterion.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8b6be64b-2310-4cf7-94c4-2e715bac7fc3

📥 Commits

Reviewing files that changed from the base of the PR and between 1139f35 and f527cb7.

📒 Files selected for processing (1)
  • .claude/skills/release-pr/SKILL.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants