Skip to content

chore: update Claude skills, README badges, and add PR template#208

Merged
joaolfp merged 1 commit into
mainfrom
chore/update-claude-skills-and-readme
Apr 5, 2026
Merged

chore: update Claude skills, README badges, and add PR template#208
joaolfp merged 1 commit into
mainfrom
chore/update-claude-skills-and-readme

Conversation

@joaolfp

@joaolfp joaolfp commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

✨ Summary

  • update open-pr skill to handle changes on main by auto-creating a feature branch
  • remove "Suggested Commit" section and example from pr-summary skill and command
  • add .github/pull_request_template.md for standardized PR descriptions
  • update README badges from flat to for-the-badge style
  • remove GitHub Release and deploy workflow badges from README

🔧 Type of Change

  • ✨ Enhancement
  • 🐞 Bug fix
  • 🔐 Security fix
  • 💥 Breaking change
  • 🚀 New feature
  • 📦 New release
  • 📚 Documentation
  • ♻️ Refactor

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-summary command/skill and introducing .github/pull_request_template.md.

Enhances the open-pr skill to avoid pushing directly to main by auto-creating a feature branch (and committing changes) when work is detected on main, and updates the README badges to for-the-badge styling 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

    • Added structured GitHub Pull Request template with checklist format for submissions
    • Updated README badge styling for improved visual presentation
  • Chores

    • Enhanced PR generation workflow with automatic feature branch management

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
PR Summary Templates
claude/commands/pr-summary.md, .claude/skills/pr-summary/SKILL.md
Removed "💬 Suggested Commit" sections and example content from PR summary command and skill documentation, eliminating placeholder commit guidance from templates.
Workflow Documentation
.claude/skills/open-pr/SKILL.md
Restructured workflow steps to insert feature branch creation phase before PR title inference; added early-stop condition when no commits exist ahead of main and no local changes; updated notes to prevent direct pushes to main.
GitHub PR Template
.github/pull_request_template.md
Added new GitHub pull request template with "✨ Summary" section and "🔧 Type of Change" checkboxes covering enhancement, bug fix, security fix, breaking change, new feature, release, documentation, and refactor categories.
Documentation
README.md
Removed GitHub releases and Release workflow badges; changed badge style parameter from flat to for-the-badge for remaining shields (crates.io, CI workflow, MIT license).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰✨ A rabbit hops through template meadows,
Trimming commits that cast long shadows,
Building branches with feature flair,
New checklists bloom in GitHub's air,
The workflow dances, refined and light!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating Claude skills, README badges, and adding a PR template, which aligns with all file modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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/update-claude-skills-and-readme

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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>`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The ## 💬 Suggested Commit header at line 71 is still present in this file, whereas it was correctly removed in .claude/commands/pr-summary.md. To maintain consistency with the PR's objective of removing the "Suggested Commit" section, this header and the following empty line should also be deleted.

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`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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.

Suggested change
- 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).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

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

19-20: Add branch-name validation before git checkout -b.

The workflow infers a branch name on Line 19 but proceeds directly to git checkout -b on Line 20 without validating that the name is a valid Git ref. Add git 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

📥 Commits

Reviewing files that changed from the base of the PR and between 33ee378 and 1f5e2ad.

📒 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.md
  • README.md
💤 Files with no reviewable changes (2)
  • .claude/commands/pr-summary.md
  • .claude/skills/pr-summary/SKILL.md

Comment on lines +17 to +24
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 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.md

Repository: 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.

Comment on lines +21 to +23
- 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 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/commands

Repository: heroesofcode/xrun

Length of output: 832


🏁 Script executed:

cat .claude/skills/open-pr/SKILL.md

Repository: 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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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>`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1f5e2ad. Configure here.

@joaolfp joaolfp merged commit 1f98112 into main Apr 5, 2026
5 checks passed
@joaolfp joaolfp deleted the chore/update-claude-skills-and-readme branch April 5, 2026 23:49
@joaolfp joaolfp mentioned this pull request Apr 5, 2026
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.

1 participant