Skip to content

Add an AI skill and slash command for generating PR descriptions - #4587

Merged
ggivo merged 6 commits into
redis:masterfrom
atakavci:ali/aiSkills
Jul 24, 2026
Merged

ggivo merged 6 commits into
redis:masterfrom
atakavci:ali/aiSkills

Conversation

@atakavci

@atakavci atakavci commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a reusable Claude Code skill that generates a GitHub PR title and description from the diff between two local branches, plus a /createPRDescription slash command that invokes it. Output is written to prDescription.md at the repo root. This is agent tooling only and does not touch any Jedis library code.

Key Decisions & Assumptions

  • The skill definition lives under .agents/skills/ and is exposed to Claude Code via a symlink at .claude/skills/, keeping a single source of truth while satisfying the .claude discovery path.
  • Branch resolution defaults are baked in: with no arguments, base falls back to main (then master), and target defaults to the current branch. Only those two base names are checked — no broader branch scanning.
  • The skill relies only on standard git commands, so it is portable across agents and environments.

Behavioral / Conceptual Changes

  • A new /createPRDescription [base-branch] [target-branch] command is available; both positional arguments are optional and resolved per the documented defaulting rules.
  • Running the skill overwrites prDescription.md in the repo root and, if gh is available, offers to open the PR after confirmation.

Notes

  • This is the only commit on the branch and introduces tooling/config files exclusively.

Note

Low Risk
Documentation and agent configuration only; no runtime, auth, or product code paths change.

Overview
Introduces agent-only tooling so contributors can draft GitHub PR titles and bodies from local branch diffs without touching application/library code.

A new skill under .agents/skills/creating-description-for-gh-pr defines the workflow: resolve base/target branches (defaults: main or master → current branch), run standard git diff / git log, analyze the change, and overwrite prDescription.md at the repo root using a fixed section template. It ends by optionally suggesting gh pr create after user confirmation.

.claude/commands/createPRDescription exposes this as /createPRDescription [base] [target], passing positional args into the skill’s branch rules without redefining the steps.

.claude/skills/creating-description-for-gh-pr symlinks to the .agents skill so Claude Code discovers a single source of truth.

Reviewed by Cursor Bugbot for commit 266c8af. Bugbot is set up for automated code reviews on this repo. Configure here.

@atakavci
atakavci requested a review from ggivo July 1, 2026 13:34
@atakavci atakavci self-assigned this Jul 1, 2026
@atakavci
atakavci requested a review from Copilot July 1, 2026 13:34

@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 using default effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit b06c5c5. Configure here.


## 5. Confirm

After writing, give a short confirmation (don't reprint the file) and offer to run `gh pr create --title "..." --body-file prDescription.md` if `gh` is available. Include the provided/resolved base and target branch names into the suggested command as part of the suggestion. At the end, ask if the user wants to open the PR now and wait for confirmation before proceeding. If the user declines, stop and say the PR description is ready in `prDescription.md`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gh suggest omits base head

Medium Severity

Step 5’s example gh pr create only shows --title and --body-file, while asking to add resolved base and target names without naming --base or --head. gh pr create ignores bare branch names, so a PR opened from that suggestion can use the repo’s default base instead of the branches used for the diff.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b06c5c5. Configure here.

@ggivo
ggivo merged commit 7aef6e8 into redis:master Jul 24, 2026
9 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants