From 4fe9ea1072cf3a57592ab7af8d5169cbb47d0d87 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Mar 2026 03:29:52 +0000 Subject: [PATCH 1/4] Initial plan From fe1539b37c6774ceefff4489c71899dde31c19c7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Mar 2026 03:31:14 +0000 Subject: [PATCH 2/4] feat: add .cursor/skills/pr-summary.md and ignore pr-description.md Co-authored-by: joaolfp <36343338+joaolfp@users.noreply.github.com> --- .cursor/skills/pr-summary.md | 68 ++++++++++++++++++++++++++++++++++++ .gitignore | 5 ++- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 .cursor/skills/pr-summary.md diff --git a/.cursor/skills/pr-summary.md b/.cursor/skills/pr-summary.md new file mode 100644 index 0000000..4ffc862 --- /dev/null +++ b/.cursor/skills/pr-summary.md @@ -0,0 +1,68 @@ +# PR Summary Skill + +Generate a pull request summary by reviewing local git changes and writing a structured description following the project template. + +## Steps + +1. **Gather change context** by running git commands: + ``` + git diff main --stat + git diff main + git log main..HEAD --oneline + ``` + +2. **Infer type of change** from the diff and file list: + - `feat` / Feature – new functionality added + - `fix` / Bug Fix – incorrect behaviour corrected + - `refactor` – internal restructuring without behaviour change + - `docs` – documentation only changes + - `test` – test additions or updates + - `chore` – maintenance, tooling, or dependency updates + +3. **Write summary as topic bullets** – one short bullet per logical change, grouped by area (e.g. Sources, Tests, CI, Documentation). + +4. **Output in template format** (see below). + +5. **Deliver the result** in a markdown code block and write the content to `pr-description.md` in the repository root. + +--- + +## Output Template + +```markdown +## Type of change + +- [ ] Bug fix +- [ ] New feature +- [ ] Refactoring +- [ ] Documentation +- [ ] Tests +- [ ] Chore / maintenance + +## Description + + + +## Changes + +- + +## Testing + +- [ ] Existing tests pass +- [ ] New tests added / updated +``` + +--- + +## Example Usage + +Ask Cursor: + +> "Summarize my current PR changes" + +Cursor will: +1. Run the git commands above to collect the diff, file list, and commit log. +2. Determine the change type from the modified files and diff content. +3. Produce a filled-in version of the template as a markdown code block. +4. Write the same content to `pr-description.md` at the repository root. diff --git a/.gitignore b/.gitignore index 1d1473c..1cbb18c 100644 --- a/.gitignore +++ b/.gitignore @@ -88,4 +88,7 @@ fastlane/test_output # https://github.com/johnno1962/injectionforxcode iOSInjectionProject/ -Derived/ \ No newline at end of file +Derived/ + +# Cursor +pr-description.md \ No newline at end of file From 6dc57c91be42b4df4bf94d75dda09216e88c2d57 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Mar 2026 03:53:38 +0000 Subject: [PATCH 3/4] refactor: rename pr-summary.md to pr-summary/SKILL.md Co-authored-by: joaolfp <36343338+joaolfp@users.noreply.github.com> --- .cursor/skills/{pr-summary.md => pr-summary/SKILL.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .cursor/skills/{pr-summary.md => pr-summary/SKILL.md} (100%) diff --git a/.cursor/skills/pr-summary.md b/.cursor/skills/pr-summary/SKILL.md similarity index 100% rename from .cursor/skills/pr-summary.md rename to .cursor/skills/pr-summary/SKILL.md From cb9b670c1a214fb530cd1927808cd71cb48275cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lucas?= Date: Sun, 8 Mar 2026 01:01:26 -0300 Subject: [PATCH 4/4] fix: missing some informations Updated PR Summary Skill documentation to reflect new structure and steps for generating pull request summaries. --- .cursor/skills/pr-summary/SKILL.md | 114 +++++++++++++++++------------ 1 file changed, 67 insertions(+), 47 deletions(-) diff --git a/.cursor/skills/pr-summary/SKILL.md b/.cursor/skills/pr-summary/SKILL.md index 4ffc862..ec246d2 100644 --- a/.cursor/skills/pr-summary/SKILL.md +++ b/.cursor/skills/pr-summary/SKILL.md @@ -1,68 +1,88 @@ -# PR Summary Skill +--- +name: pr-summary +description: Reviews local git changes and generates a pull request summary following the project template. Use when the user asks to automate PR summary, generate PR description, fill PR template, or review local changes for a PR. +--- -Generate a pull request summary by reviewing local git changes and writing a structured description following the project template. +# PR Summary from Local Changes -## Steps +Generates a PR description that matches `.github/pull_request_template.md` by analyzing the repository's local changes (staged and/or unstaged). -1. **Gather change context** by running git commands: - ``` - git diff main --stat - git diff main - git log main..HEAD --oneline - ``` +## Workflow -2. **Infer type of change** from the diff and file list: - - `feat` / Feature – new functionality added - - `fix` / Bug Fix – incorrect behaviour corrected - - `refactor` – internal restructuring without behaviour change - - `docs` – documentation only changes - - `test` – test additions or updates - - `chore` – maintenance, tooling, or dependency updates +1. **Gather change context** + - Run `git status` to see modified/added/deleted files and current branch. + - Run `git diff --staged` for staged changes; if empty, run `git diff` for unstaged changes (or both if the user wants everything). + - Optionally run `git log -1 --oneline` or `git log origin/main..HEAD --oneline` to see recent commits on the branch. -3. **Write summary as topic bullets** – one short bullet per logical change, grouped by area (e.g. Sources, Tests, CI, Documentation). +2. **Infer type of change** + From the diff and file list, choose one or more types that fit: + - **Enhancement** – improvements to existing behavior + - **Bug fix** – fixes to incorrect behavior + - **Security fix** – security-related changes + - **Breaking change** – API or behavior changes that break compatibility + - **New feature** – new functionality + - **New release** – version/release bumps or release notes + - **Documentation** – docs, comments, README only + - **Refactor** – restructuring without changing behavior -4. **Output in template format** (see below). +3. **Write the summary as topic bullets** + - Use only bullet points (topics), no paragraph text. + - One short line per change, e.g. "add ...", "fix ...", "update ...", "remove ...". + - No extra explanation; keep each line concise. -5. **Deliver the result** in a markdown code block and write the content to `pr-description.md` in the repository root. +4. **Output in template format** + Use this structure (from the project template). Replace the summary text and check the applicable type(s). ---- +5. **Deliver the result** + - Reply with the PR summary in a **markdown code block** (so the user can copy it from the chat). + - **Also write** the same content to `pr-description.md` in the repository root so the user can open the file and copy from there. Tell the user the file path; they can delete the file after pasting into the PR. ## Output Template -```markdown -## Type of change +Use this exact structure. Under "Summary", list only bullet-point topics (no paragraph). In "Type of Change", check only the box(es) that apply (use `[x]` for checked, `[ ]` for unchecked). -- [ ] Bug fix -- [ ] New feature -- [ ] Refactoring -- [ ] Documentation -- [ ] Tests -- [ ] Chore / maintenance +```markdown +## ✨ Summary + +- +- +- ... + +## 🔧 Type of Change + +- [ ] ✨ Enhancement +- [ ] 🐞 Bug fix +- [ ] 🔐 Security fix +- [ ] 💥 Breaking change +- [ ] 🚀 New feature +- [ ] 📦 New release +- [ ] 📚 Documentation +- [ ] ♻️ Refactor +``` -## Description +## Example - +**After reviewing a diff that adds a new Swift API and updates README:** -## Changes +```markdown +## ✨ Summary -- +- add public `validate(input:)` method +- update README with usage docs -## Testing +## 🔧 Type of Change -- [ ] Existing tests pass -- [ ] New tests added / updated +- [ ] ✨ Enhancement +- [ ] 🐞 Bug fix +- [ ] 🔐 Security fix +- [ ] 💥 Breaking change +- [x] 🚀 New feature +- [ ] 📦 New release +- [x] 📚 Documentation +- [ ] ♻️ Refactor ``` ---- - -## Example Usage - -Ask Cursor: - -> "Summarize my current PR changes" +## Notes -Cursor will: -1. Run the git commands above to collect the diff, file list, and commit log. -2. Determine the change type from the modified files and diff content. -3. Produce a filled-in version of the template as a markdown code block. -4. Write the same content to `pr-description.md` at the repository root. +- If there are no local changes, say so and suggest running from a branch with changes or staging files first. +- Prefer the project template at `.github/pull_request_template.md` if it diverges from the template above; the template in this skill matches the current project standard.