chore: update Claude skills, README badges, and add PR template#208
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe pull request updates documentation templates and workflow configuration for pull request handling. Changes include removing suggested commit sections from PR summary templates, restructuring the open-PR workflow to handle feature branch creation, introducing a new GitHub PR template with checkboxes, and updating README badge styling and content. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the Claude automation skills for opening and summarizing pull requests. Key improvements include a new workflow to automatically create feature branches when changes are detected on main, the addition of a standard GitHub pull request template, and a cleanup of the README badges. Feedback highlights a missed header deletion in the PR summary skill and suggests clarifying the branch naming convention to match the provided examples.
|
|
||
| ## 💬 Suggested Commit | ||
|
|
||
| `feat: <short description>` |
There was a problem hiding this comment.
| 2. **Infer the PR title** | ||
| 2. **Ensure changes are on a feature branch** | ||
| - If the current branch is `main` (or the default branch): | ||
| - Inspect the unstaged/staged changes (via `git diff` and `git status`) to infer a branch name in kebab-case that matches the type of change (e.g. `docs/update-readme`, `feat/add-login`, `fix/crash-on-startup`). |
There was a problem hiding this comment.
The instruction mentions "kebab-case", but the examples use a type/description format (e.g., docs/update-readme). It would be clearer to specify the expected format to ensure the AI agent names branches consistently.
| - Inspect the unstaged/staged changes (via `git diff` and `git status`) to infer a branch name in kebab-case that matches the type of change (e.g. `docs/update-readme`, `feat/add-login`, `fix/crash-on-startup`). | |
| - Inspect the unstaged/staged changes (via git diff and git status) to infer a branch name using the format <type>/<description> (e.g. docs/update-readme, feat/add-login, fix/crash-on-startup). |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.claude/skills/open-pr/SKILL.md (1)
19-20: Add branch-name validation beforegit checkout -b.The workflow infers a branch name on Line 19 but proceeds directly to
git checkout -bon Line 20 without validating that the name is a valid Git ref. Addgit check-ref-format --branch <name>to validate the inferred name and provide a deterministic fallback (e.g., a timestamp-based name) if validation fails.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/skills/open-pr/SKILL.md around lines 19 - 20, The workflow infers a branch name and immediately runs git checkout -b <inferred-branch-name> without validating it; add a validation step using git check-ref-format --branch "<inferred-branch-name>" and if that command fails, replace the inferred name with a deterministic fallback (e.g., "auto-branch-<timestamp>" or similar) before calling git checkout -b, and ensure the validation/fallback logic runs wherever the inferred name is produced/used so checkout always receives a valid Git ref.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/skills/open-pr/SKILL.md:
- Around line 17-24: The workflow currently hardcodes "main" in several places
(e.g., references to origin/main, the --base main flag, and other direct "main"
strings) but the comment says it must support the repository's default branch;
update the logic to detect the repo's default branch at runtime (e.g., use git
rev-parse --abbrev-ref origin/HEAD or git symbolic-ref refs/remotes/origin/HEAD
and fall back to local default) and replace the hardcoded occurrences
(origin/main, --base main, plain "main") to use that detected variable instead;
ensure the branch-detection value is used when constructing the base ref for
checkout/merge/compare and in any messaging about the default branch.
- Around line 21-23: The workflow currently uses a broad "git add -A" which can
stage unintended new files; change the step in .claude/skills/open-pr/SKILL.md
to stage only the files discovered by the initial inspection (the same list used
to infer the branch name) instead of using "git add -A" or "git add .".
Concretely, replace the broad staging step with a targeted "git add <file1>
<file2> ..." using the previously collected file list from the initial git
diff/inspection, ensuring the automation stages exactly those detected changes
and nothing else.
---
Nitpick comments:
In @.claude/skills/open-pr/SKILL.md:
- Around line 19-20: The workflow infers a branch name and immediately runs git
checkout -b <inferred-branch-name> without validating it; add a validation step
using git check-ref-format --branch "<inferred-branch-name>" and if that command
fails, replace the inferred name with a deterministic fallback (e.g.,
"auto-branch-<timestamp>" or similar) before calling git checkout -b, and ensure
the validation/fallback logic runs wherever the inferred name is produced/used
so checkout always receives a valid Git ref.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4324b549-eb8a-479e-be37-04ec704076d3
📒 Files selected for processing (5)
.claude/commands/pr-summary.md.claude/skills/open-pr/SKILL.md.claude/skills/pr-summary/SKILL.md.github/pull_request_template.mdREADME.md
💤 Files with no reviewable changes (2)
- .claude/commands/pr-summary.md
- .claude/skills/pr-summary/SKILL.md
| 2. **Ensure changes are on a feature branch** | ||
| - If the current branch is `main` (or the default branch): | ||
| - Inspect the unstaged/staged changes (via `git diff` and `git status`) to infer a branch name in kebab-case that matches the type of change (e.g. `docs/update-readme`, `feat/add-login`, `fix/crash-on-startup`). | ||
| - Run `git checkout -b <inferred-branch-name>` to create and switch to the new branch. | ||
| - Stage all changed files with `git add -A` and commit them with an appropriate conventional-commit message. | ||
| - Continue with the rest of the workflow from the new branch. | ||
| - If there are no commits ahead of `main` **and** no staged/unstaged changes, inform the user and stop. | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify hardcoded `main` references in open-pr skill
rg -n -C2 'origin/main|--base main|current branch is `main`|default branch' .claude/skills/open-pr/SKILL.mdRepository: heroesofcode/xrun
Length of output: 1398
Default-branch handling is inconsistent with the stated behavior.
Line 18 claims support for "main (or the default branch)", but the workflow hardcodes main throughout: Lines 14–15 use origin/main, Line 45 uses --base main, and Lines 74–75 reference main directly. This breaks workflows in repositories whose default branch is not main. The skill needs to dynamically determine and use the actual default branch instead of hardcoding it.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/skills/open-pr/SKILL.md around lines 17 - 24, The workflow currently
hardcodes "main" in several places (e.g., references to origin/main, the --base
main flag, and other direct "main" strings) but the comment says it must support
the repository's default branch; update the logic to detect the repo's default
branch at runtime (e.g., use git rev-parse --abbrev-ref origin/HEAD or git
symbolic-ref refs/remotes/origin/HEAD and fall back to local default) and
replace the hardcoded occurrences (origin/main, --base main, plain "main") to
use that detected variable instead; ensure the branch-detection value is used
when constructing the base ref for checkout/merge/compare and in any messaging
about the default branch.
| - Stage all changed files with `git add -A` and commit them with an appropriate conventional-commit message. | ||
| - Continue with the rest of the workflow from the new branch. | ||
| - If there are no commits ahead of `main` **and** no staged/unstaged changes, inform the user and stop. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check whether other automation docs also rely on broad staging patterns
rg -n -C2 'git add -A|git add \.' .claude/skills .claude/commandsRepository: heroesofcode/xrun
Length of output: 832
🏁 Script executed:
cat .claude/skills/open-pr/SKILL.mdRepository: heroesofcode/xrun
Length of output: 3251
Stage only detected changes, not all files, in this automated workflow.
The git add -A on line 21 is risky in this automated context. Between the initial git diff inspection (used to infer the branch name) and the staging step, new untracked files could appear, leading to unintended commits. For an automated skill, stage only the files detected in the initial inspection rather than all changes. This is the only instance of broad staging (git add -A or git add .) across skills and commands.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/skills/open-pr/SKILL.md around lines 21 - 23, The workflow currently
uses a broad "git add -A" which can stage unintended new files; change the step
in .claude/skills/open-pr/SKILL.md to stage only the files discovered by the
initial inspection (the same list used to infer the branch name) instead of
using "git add -A" or "git add .". Concretely, replace the broad staging step
with a targeted "git add <file1> <file2> ..." using the previously collected
file list from the initial git diff/inspection, ensuring the automation stages
exactly those detected changes and nothing else.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1f5e2ad. Configure here.
|
|
||
| ## 💬 Suggested Commit | ||
|
|
||
| `feat: <short description>` |
There was a problem hiding this comment.
Orphaned "Suggested Commit" header left in template
Medium Severity
The ## 💬 Suggested Commit header was left in pr-summary/SKILL.md (line 71) after its content was removed. This creates an empty section in generated PR summaries and conflicts with the pr-summary command file, open-pr skill, and project pull_request_template.md, which all omit it. The workflow also still instructs generating a commit suggestion.
Reviewed by Cursor Bugbot for commit 1f5e2ad. Configure here.


✨ Summary
open-prskill to handle changes onmainby auto-creating a feature branchpr-summaryskill and command.github/pull_request_template.mdfor standardized PR descriptionsflattofor-the-badgestyle🔧 Type of Change
Note
Low Risk
Low risk: changes are limited to Claude PR-helper docs/templates and README badge styling, with no production code or runtime behavior impacted.
Overview
Aligns PR authoring automation with the repo’s standard template by removing the “Suggested Commit” section from the
pr-summarycommand/skill and introducing.github/pull_request_template.md.Enhances the
open-prskill to avoid pushing directly tomainby auto-creating a feature branch (and committing changes) when work is detected onmain, and updates the README badges tofor-the-badgestyling while dropping the release/deploy badges.Reviewed by Cursor Bugbot for commit 1f5e2ad. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
Documentation
Chores