From 787b46d974d4600c5a77eab2fb1273e5f6dd64ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Mon, 13 Jul 2026 22:38:58 +0200 Subject: [PATCH] feat(Agents): add generate-pr-description skill (#26586) --- .agents/README.md | 17 +++++ .../skills/generate-pr-description/SKILL.md | 69 +++++++++++++++++++ .claude/skills/generate-pr-description | 1 + 3 files changed, 87 insertions(+) create mode 100644 .agents/README.md create mode 100644 .agents/skills/generate-pr-description/SKILL.md create mode 120000 .claude/skills/generate-pr-description diff --git a/.agents/README.md b/.agents/README.md new file mode 100644 index 000000000..395f65b17 --- /dev/null +++ b/.agents/README.md @@ -0,0 +1,17 @@ +# .agents + +Source of truth for this repo's agent skills and rules: + +- `skills//SKILL.md` +- `rules/.md` + +Agent-specific directories expose each via a relative symlink — for Claude Code: + + .claude/skills/ -> ../../.agents/skills/ + .claude/rules/.md -> ../../.agents/rules/.md + +To add a skill or rule: create it here, then symlink it. + +The skills in this repository often build on those from +[agent-toolkit](https://github.com/eai-org/agent-toolkit/), invoking them when available. +Installing the toolkit at user level is therefore recommended. diff --git a/.agents/skills/generate-pr-description/SKILL.md b/.agents/skills/generate-pr-description/SKILL.md new file mode 100644 index 000000000..ea7b505cc --- /dev/null +++ b/.agents/skills/generate-pr-description/SKILL.md @@ -0,0 +1,69 @@ +--- +name: generate-pr-description +description: Generate the PR title and description from the current branch changes, following the repo's PR template. +metadata: + version: "1.0" +--- + +# Generate PR description + +Produce a copy-pasteable PR title and body for the current changes, based on the repo's +`pull_request_template.md`. Output text only — never create the PR, push, or run any +state-changing git command. + +If a `use-conversational-language` skill is available, invoke it and follow it when writing the +prose. If not available, fetch it from its [remote source](https://github.com/eai-org/agent-toolkit/blob/main/skills/use-conversational-language/SKILL.md). + +## Gather the changes + +"The changes" is the union of: + +- committed branch work: `git diff ...HEAD`, where `` is `origin/master` — + or `upstream/master` when the checkout is a fork with an `upstream` remote; +- staged and unstaged changes; +- the branch's commit messages (context only). + +If all three are empty, say so and stop. + +## Facts, never assumptions + +Only two sources may fill the description: the diff and facts stated in the conversation. Never +present anything else as fact — no assumed testing, sources, issue links, or TODOs. A section +without backing facts stays empty/unchecked, silently: an empty section is correct, a guessed one +is wrong. + +Ask the user only when unsure about substance — what the change does, which scope the title should +carry, contradictory information. Missing fill-in facts are never a reason to ask. + +## Title + +`type(Scope/Subscope): short description` — imperative, max 50 chars. Types: `feat`, `fix`, +`refactor`, `style`, `docs`, `test`, `chore`; scopes: `Core`, `Scripts`, `DB`. Copy subscope naming +from recent commits touching the same areas (`git log --oneline -- `). + +## Body + +Fill in `pull_request_template.md` (repo root): + +- Strip the instructional `` comments; keep the "How to Test AzerothCore PRs" footer + intact. +- Describe what the changes do and why. +- "Changes Proposed" checkboxes, from diff paths: `src/server/scripts/` → Scripts; `data/sql/` → + Database; other `src/` → Core. +- AI disclosure checkbox: always tick it; name the agent/model running this skill and state + whether AI produced the changes themselves or only this description, per the conversation. +- Issues Addressed, SOURCE, Tests Performed, How to Test, Known Issues/TODO: stated facts only + (see above). + +## Output + +Print exactly: + +~~~ +TITLE: + +PR DESCRIPTION: +```markdown +<body> +``` +~~~ diff --git a/.claude/skills/generate-pr-description b/.claude/skills/generate-pr-description new file mode 120000 index 000000000..3aff0944b --- /dev/null +++ b/.claude/skills/generate-pr-description @@ -0,0 +1 @@ +../../.agents/skills/generate-pr-description \ No newline at end of file