Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Github Pr.Describe

БесплатноБез исполняемых скриптовНе проверен

Describe one or more PRs in a fixed format, score complexity and quality, and suggest a review order

gpsaggeseот gpsaggese★ 158 звёзд на GitHub

Об этом скилле

Goal

  • Given a GitHub PR, or a list of PRs, write a short description of each PR in a fixed format with the facts a reviewer needs before reading the diff
  • Score each PR for review complexity and for quality
  • Given a list, suggest the order in which to review the PRs

Workflow

Get the Input

  • Take the PRs from the arguments
    • Arguments are one PR or a list, separated by spaces, commas, or newlines
    • A list can mix forms and repos
  • Resolve each argument following .claude/skills/github_pr.rules.md ## Resolve the PR Argument
    • Do not get the local code: this skill reads the PR from GitHub
  • Keep the order given and drop the arguments that give the same PR
  • Apply all the steps below to every PR in the list
    • Process each PR on its own, do not mix data between PRs
    • If an argument gives no PR, report the error, write no file for it, and continue
    • If a PR cannot be fetched, write unknown for its fields, report the error, and continue with the next PR

Fetch the PR Metadata

  • Fetch all the fields in one call:
    > gh pr view <PR_URL> --json number,title,url,author,headRefName,baseRefName,headRepository,isDraft,mergeable,reviewDecision,additions,deletions,changedFiles,body,closingIssuesReferences,statusCheckRollup,files
    
  • Fetch the diff and read it:
    > gh pr diff <PR_URL>
    
    • If the diff is over ~2000 lines, read the file list and the key files only

Find the Issue

  • Pick the first match, in this order:
    • closingIssuesReferences from the metadata
    • The issue number next to a keyword in the PR body: Closes, Fixes, Resolves, Related to, Part of, or a full issue URL
      • Ignore other #<NUM> refs in the body, often sibling PRs in a stack
    • The Task<NUM> token in the head branch name
      • E.g., UmdTask640_Noesis_PR_S4_spec gives 640
    • If nothing matches, write none for both Issue and Issue link
  • Get the issue link from GitHub, do not build it by hand:
    > gh issue view <ISSUE_NUM> --repo <OWNER>/<REPO> --json url,state
    

Build the Fields

  • PR link: url from the metadata
  • Title: title from the metadata, used only in the H1 title
  • PR name: headRefName from the metadata, used only in the output file name
    • Replace each character other than letters, digits, ., _, - with _
    • If two PRs in the list give the same name, append _<PR_NUM>
    • If the PR cannot be fetched, use PR<PR_NUM>
  • How to check it out:
    • If headRepository.nameWithOwner equals <OWNER>/<REPO>:
      > git fetch origin <HEAD_BRANCH>
      > git checkout <HEAD_BRANCH>
      
    • Otherwise (fork):
      > gh pr checkout <PR_NUM> --repo <OWNER>/<REPO>
      
    • Write the commands in a fenced block, never run them
  • Author: author.name, falling back to author.login
    • Do not prefix with @
  • Size: <changedFiles> files, +<additions> / -<deletions>
  • Base: baseRefName
    • If the base is not master or main, the PR is stacked
    • Find the parent PR and append (stacked on PR #<PARENT_NUM>):
      > gh pr list --repo <OWNER>/<REPO> --head <BASE_BRANCH> --json number
      
  • Reference material: up to 3 files from files that explain the change
    • Prefer ADDED files whose path contains spec, design, plan, README, or how_to_guide
    • Add files linked from the PR body
    • If none, write none

Build the Status

  • Write draft if isDraft is true, otherwise ready
  • Map mergeable:
    • MERGEABLE: mergeable
    • CONFLICTING: has conflicts
    • UNKNOWN: mergeability unknown
  • Append approved or changes requested when reviewDecision is APPROVED or CHANGES_REQUESTED, otherwise omit it
  • Summarize statusCheckRollup as the CI result:
    • If a check appears more than once, keep the latest run by completedAt
    • Failing: conclusion is FAILURE, TIMED_OUT, CANCELLED, ACTION_REQUIRED, or STARTUP_FAILURE; or state is FAILURE or ERROR
    • Ignore SKIPPED and NEUTRAL checks
    • If any check fails: CI `<CHECK_NAME>` failed, one entry per failing check
    • Otherwise, if any check is not completed: CI pending
    • Otherwise, if there are no checks: no CI checks
    • Otherwise: CI passed
  • Shorten a check name over 40 characters to its tool or job identifier
    • E.g., Run pytest_log on class content dirs becomes pytest_log

Write What Changes

  • Write exactly 5 bullets, one line each
  • Describe what changes and why, not a file-by-file list
  • Base the bullets on the diff, not only on the PR body
    • If the body claims something the diff does not show, trust the diff

Assess the Quality

  • Check these axes:
    • Scope and clarity: one purpose, size matches the purpose, title and body match the diff
    • Correctness: bugs and risky spots
    • Tests and docs: code changes come with tests, docs match the code
    • CI: failing checks, and
Полный SKILL.md на GitHub

Установить Github Pr.Describe в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Github Pr.Describe?

Describe one or more PRs in a fixed format, score complexity and quality, and suggest a review order

Как установить скилл Github Pr.Describe?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Github Pr.Describe запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Github Pr.Describe с