Update the PR description for the current branch
71%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/pr-update-desc/SKILL.mdUse this skill when the user asks to run the migrated command pr-update-desc or invokes $pr-update-desc.
Regenerate and update the GitHub PR description for the current branch based on all commits in the PR.
Read ~/.agents/skills/pr-style/SKILL.md and apply its formatting conventions.
If the target repo has its own PR template (detected in Step 3), the repo template replaces the pr-style default body, while pr-style still governs title format (unless the template's frontmatter specifies one), labels, assignment, and draft policy.
Run a single combined command:
remote=$(git remote | head -1)
branch=$(git branch --show-current)
default_branch=$(git symbolic-ref refs/remotes/${remote}/HEAD 2>/dev/null | sed "s|refs/remotes/${remote}/||" || echo "main")
echo "remote=${remote} branch=${branch} default=${default_branch}"gh pr view --json number,url,title,body --jq '"\(.number)|\(.title)|\(.url)"'If no PR exists for the current branch, stop and report: "No open PR found for branch ${branch}."
Get all commits on this branch since it diverged from the default branch:
git log --oneline ${default_branch}..HEADAlso get the full diff stat for a high-level summary of what changed:
git diff --stat ${default_branch}...HEADThese outputs are used when filling in the selected PR template (or the pr-style default body if no repo template is found).
Read-only lookup, run in parallel with the diff inspection. Check GitHub's template locations in order:
pull_request_template.md (or .txt) in the repo root, docs/, or .github/*.md in .github/PULL_REQUEST_TEMPLATE/.github/docs/ single template whose content is only links of the form ?quick_pull=1&template=<file> — it routes to the .github/PULL_REQUEST_TEMPLATE/ files; treat it as the multiple-templates case and never use the picker itself as the body format.Read every candidate template found (full content, including any YAML frontmatter). Also read repo-local AGENTS.md (or CLAUDE.md / .cursorrules if present) and note any PR-template or PR-format guidance it carries. Do not select a template yet — selection happens at body generation (Step 4), because the commit log can flip the choice.
Apply in order (first match wins):
AGENTS.md explicitly mandates a template or required PR format → follow that; an explicit mandate (e.g. "always use release.md", required extra sections, sign-off blocks) overrides the rules below.bump version / chore(release): v<semver> / version <semver>) and a release-named template exists (e.g. release.md) → use the release template.feature.md, change.md, bug_fix.md matching the change type from commit prefixes) when one exists.AGENTS.md carries no PR-format guidance → record "no template found"; the pr-style default body applies, with any AGENTS.md PR conventions (required sections, trailers, sign-offs) layered on as extra requirements.--- fenced), strip it from the PR body. For an existing PR, gh pr edit --body only rewrites the body, so do not change the PR title or existing labels based on frontmatter; still record the template source in the report. If labels must be updated, direct the user to $pr-create/gh pr edit options rather than inventing label edits here.AGENTS.md conventions per 4a rule 6.gh pr edit --body "<generated description>"Use a HEREDOC to pass the body to preserve formatting:
gh pr edit --body "$(cat <<'EOF'
<generated description>
EOF
)"Output:
✅ Updated PR #<number> description
<pr_url>
Template: <name or default pr-style body>phatblat/dotfiles
4d65cab
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.