Set up PyTorch Issue Triage safely

PyTorch's official issue-triage skill semi-automatically sorts GitHub issues using a label allowlist and validation hooks.

Published on 09.09.2026

What the PyTorch Issue-Triage skill is

The triaging-issues skill lives in the official PyTorch repository on GitHub, in the directory for Claude skills, and according to its description it is meant to triage newly incoming GitHub issues in the PyTorch project by routing them to the responsible on-call teams, applying appropriate labels, and, for pure questions, leaving a first-line reply and closing the issue. PyTorch is one of the most widely used open-source machine learning libraries and correspondingly receives a large number of issues daily, so a structured, partially automated first pass at sorting is, according to the project, useful for relieving human on-call teams and answering questions faster.

The triage flow in several steps

The flow described in the skill documentation is organized into several sequential steps. First it checks whether an issue has already been processed before, in which case the process is skipped. This is followed by distinguishing between a pure question and an actual bug or feature report, then checking whether external files are needed for a possible reproduction. The issue can then be transferred to a different team if needed, with a separate, more detailed rulebook file specifically for topics around PT2, i.e. torch.compile, containing specific labeling guidance. This is followed by a possible redirect to a secondary on-call team, the actual labeling of the issue with matching labels, an escalation tier for especially urgent cases requiring human review, and finally an automatic mark as bot-triaged and a final mark as triaged.

Technical safeguards via hooks and a fixed label list

A central safety feature of the skill is a strictly bounded list of allowed labels, stored in a separate file, which according to the documentation deliberately excludes CI trigger labels, test-config labels, release-note labels, deprecated labels, and labels that require a human decision. Per explicit instruction, only labels from this list may be used; inventing or guessing new label names is prohibited. The skill is additionally secured technically via so-called hooks that run automatically before and after every write-capable GitHub call, such as editing an issue, adding a comment, or transferring an issue to another repository. Before the actual action, a script validates the target of the operation, a second script checks the labels to be set against the allowed list, and after the action a third script automatically records that the issue was triaged by the bot.

Available tools and prerequisites

For the actual interaction with GitHub, the skill has several MCP tools available according to the documentation, which can retrieve issue details and existing labels, view existing comments, set labels or close issues, add new comments, and search for similar issues to provide better context. In addition, pre-written response templates are available in a separate file, used for recurring situations such as redirecting questions. Using the skill therefore requires an agent environment with access to a GitHub MCP server and write permissions in the PyTorch repository, which are typically granted only to a restricted, trusted bot account.

Limitations, security, and best practices

The documentation explicitly notes limitations of the first version, which deliberately keep the feature scope narrow to avoid misbehavior such as applying incorrect labels or unnecessary issue transfers. The combination of a fixed label allowlist, mandatory validation hooks before every write action, and automatic tracking of which issues the bot has already processed serves to significantly reduce the risk of faulty or duplicate processing. Nevertheless, the skill remains a partially automated tool that explicitly escalates especially urgent cases for human review rather than deciding them autonomously. Other projects can adopt the general structure of a rulebook, a vetted label list, and validation hooks as a template, but the concrete content such as labels and team assignments is tightly tailored to the PyTorch project and cannot be transferred to other repositories without adaptation.

Published on 09.09.2026

Categories

Frequently asked questions

Can the skill apply arbitrary labels?

No. According to the provider, only labels from labels.json may be used. Human-reserved or obsolete labels must not be invented.

What happens when an on-call label already exists?

The issue is skipped because it already belongs to a responsible queue.