Command Palette

Search for a command to run...

Назад к скиллам
скилл № 11779

triage-prs

Triage open pull requests in nrwl/nx. Decides who handles a PR, converts it to a draft when CI is red, checks for a linked issue (GitHub or Linear), and…

БесплатноБез исполняемых скриптов
nrwlот nrwl★ 29 499 звёзд на GitHub

Установить triage-prs в Claude Code и Claude Desktop

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

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

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

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

Read Codex execution conventions before following this workflow.

Triage an nx pull request

Decide who handles this PR, whether it is ready to be looked at, and whether it should exist. Then stage those decisions for a human to approve.

This is not a review

Do not run review-pr. Do not check the branch out. Do not judge the implementation, the test coverage, or the approach. That is the assignee's job after triage, and doing it here costs the expensive part of a review while burying the cheap decision this workflow exists to make.

The one judgement about content you do make is whether the change should be on the table at all (decision 3 below), and that turns on who opened it and whether anyone agreed to it — not on whether the code is good.

Shared with issue triage

These are identical for issues and PRs, and live in one place so a correction lands once:

  • .agents/skills/triage-shared/owners.md — the owners table, the rotation and its guidance, the git-history fallback, and how a linked PR decides the owner.
  • .agents/skills/triage-shared/staging.md — records, the review pane, the feedback loop, the apply step, and the rules about never clearing the state directory.

Read both. The rest of this page is only what differs for a pull request.

1. Find the ones that need it

An open PR is untriaged when nobody owns it. Drafts are excluded — a draft is already out of the queue, which is the state this workflow puts failing PRs into:

gh pr list --repo nrwl/nx --state open --limit 300 --draft=false \
  --json number,title,author,assignees \
  --jq '[.[] | select(.assignees | length == 0)][].number' > /tmp/untriaged-prs.txt

2. Fetch them in one call

Same shape as issue triage — one aliased GraphQL query rather than a gh pr view per PR:

fragment P on PullRequest {
  number
  title
  isDraft
  author {
    login
  }
  authorAssociation
  assignees(first: 5) {
    nodes {
      login
    }
  }
  labels(first: 20) {
    nodes {
      name
    }
  }
  mergeable
  mergeStateStatus
  closingIssuesReferences(first: 5) {
    nodes {
      number
      title
    }
  }
  commits(last: 1) {
    nodes {
      commit {
        statusCheckRollup {
          state
        }
        checkSuites(first: 30) {
          nodes {
            status
            conclusion
            app {
              slug
            }
            workflowRun {
              workflow {
                name
              }
            }
          }
        }
      }
    }
  }
  body
}

statusCheckRollup.state alone is not the CI verdict, and trusting it is a live bug. It does not count a suite whose conclusion is ACTION_REQUIRED, so a fork PR whose workflows have never been allowed to start still rolls up as SUCCESS off a third-party check such as socket-security or netlify. Measured on one sweep of the open queue, 19 of 82 PRs rolled up SUCCESS while the CI workflow sat unapproved. checkSuites is what tells the two apart, which is why it is in the query.

closingIssuesReferences only populates for real closing keywords (Fixes #N), which is the point: a PR that merely mentions an issue has not linked it.

3. The seven decisions

Has CI run, and did it pass?

Two questions, in that order. A red PR is not ready for a reviewer's time, and a PR that was never built is not ready either. It just looks readier.

Count the GitHub Actions check runs on the head commit. If it is zero, the rollup means nothing, whatever it says. statusCheckRollup aggregates check runs, not check suites. An Actions suite that produced no check runs contributes nothing to it, so the rollup falls through to whatever third-party checks remain, which on a fork PR is usually a green socket-security or netlify. That one mechanism produces every false green below:

what happened suite conclusion Actions check runs rollup says
never approved ACTION_REQUIRED 0 SUCCESS
no workflow ever ran no suite at all 0 SUCCESS
failed before emitting a run FAILURE 0 SUCCESS

Measured on one sweep: 48 of 82 open PRs rolled up SUCCESS with zero Actions check runs, and only 18 had genuinely passed. Three were the last row, green in the rollup and failed underneath.

So query checkSuites { conclusion checkRuns { totalCount } app { slug } } and decide from that:

  • Zero Actions check runs, and a suite at ACTION_REQUIRED → CI is waiting on a maintainer, not on the author. Record "ci": "AWAITING_APPROVAL" and propose "approve_ci": true. Do not draft it. Nothing has failed, and the person who has to act is us. Approving is part of triage, because a PR nobody has allowed to build is a P
Полный SKILL.md на GitHub

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

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

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

Вложенные файлы

  • agents/openai.yaml

FAQ

Что делает скилл triage-prs?

Triage open pull requests in nrwl/nx. Decides who handles a PR, converts it to a draft when CI is red, checks for a linked issue (GitHub or Linear), and judges whether an unlinked community PR should stay open at all. Produces a plan you approve before anything is written to GitHub. This is NOT a code review — use review-pr for that. Use on "triage this PR", "triage open PRs", "which PRs need an owner", "should we close this PR", "is this PR ready for review".

Как установить скилл triage-prs?

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

Скилл triage-prs запускает скрипты?

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

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

Сравнить triage-prs с