/tt-review-skills:tt-split-pr-by-codeownersfrom Tenstorrent Review Skills
Analyzes a pull request against CODEOWNERS rules and proposes a split to reduce required approvals. Plans only, does not execute.
Ships in Tenstorrent Review Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Given a pull request, work out who has to approve it and propose a split where each piece needs
fewer of them. Reads the PR through gh, which is allowed on the review path because every Actions
runner ships it authenticated. A workflow pinning this skill must allow gh and python3 in its
tools.bash list.
It plans. It does not execute — a proposal, then it stops. No branches, no pushes, nothing
written to GitHub. references/executing-the-split.md has the recipe for whoever carries it out.
A large diff is not automatically a hard review: what costs a reviewer is the number of independent
decisions held at once, and a 5,000-file mechanical rename is one decision. Size flags exactly the
PRs that do not need splitting. Blocking approvals are computable, and each is a person who must act
before the PR lands — on tt-metal, .github/CODEOWNERS is ~573 rules across ~160 owners.
Count approvals, not owners. Owners on one rule are alternatives — GitHub requires "an
approval from any of the owners", not all. A PR matching 36 owners can be unblocked by 7 approvals,
and splitting on the larger number buys nothing. scripts/codeowners_map.py reports both, and takes
the branch's required_approving_review_count as a floor: coverage is not the only gate.
gh pr view <n> --repo <owner>/<repo> --json baseRefName,changedFiles,title,author,reviewRequests
gh api repos/<owner>/<repo>/pulls/<n>/reviews --jq '[.[]|select(.state=="APPROVED")|.user.login]|unique'
Everything downstream keys off baseRefName — ownership, protection and merge base all resolve
against the PR's base, which is often not main.
gh pr view --json files silently caps at 100, and this skill's target is PRs larger than that.
Paginate, and fetch CODEOWNERS from the base branch by GitHub's location precedence —
references/fetching-pr-data.md has the commands and the other ways to get this wrong.
<paginated file list> | python3 scripts/codeowners_map.py \\
--codeowners CODEOWNERS.base --expect-files <n> --required-approvals <count> \\
--exclude "@<pr-author>" --approved "<logins who approved>" --json
Pass the PR author to --exclude. GitHub never accepts the author on their own PR, so leaving
them in the pool yields a minimum that cannot happen — for rules {author, A} and {author, B}
the author alone appears to cover both at a cost of one, when the answer is two.
Pass everyone who has approved to --approved. The cover is a property of the PR;
approvals_outstanding and files_still_blocked are what someone actually wants when they ask why
a PR needs so many reviewers. Often the honest answer is "it does not any more — go ask one person."
Do not read CODEOWNERS by eye — last-match-wins, owner alternatives and empty-owner resets are all
silent when got wrong. See references/codeowners-semantics.md, and
references/is-it-enforced.md for whether the base branch requires code-owner review at all.
Compare against reviewRequests as a smell test only; it proves nothing either way. Account for
every difference or call the parse unverified.
Cluster by owner set, merge clusters that add no new approver, stop once the next split saves
nothing. Wide mechanical refactors take expand / migrate / contract, with migrate batches cut along
owner-set boundaries. Strategy and the overriding rules are in references/split-strategy.md.
Output the proposal and hand it over; create nothing.
## Current
<n> files on base <branch>. <m> owners matched, but <a> approvals would unblock it: <who>.
Already approved: <who>. Still outstanding: <k> — <who> — blocking <j> of <n> files.
<If the branch floor binds, or a rule is owned only by ineligible people, say so.>
Cross-checked against reviewRequests: <agrees | differs, because ...>
## Proposed
### PR 1 — <what it does, as one idea>
Approvals: <who> (was <a>, now <recomputed for this slice, floor included>)
Files: <paths, or a pattern plus a count>
Depends on: —
### PR 2 — <...>
Depends on: PR 1 — <the symbol or shim that creates the dependency>
## Cost
<N>x CI, <N> review cycles, a <N>-deep rebase chain.
## Recommendation
<Split, or do not split, and why — in one sentence.>
Say so and stop: a couple of approvals already cover every file; the change is one decision spread wide, so splitting yields N PRs that must all land together; the base branch does not enforce code-owner review; or no split reduces the approval count, because ownership does not align with a seam here.
references/codeowners-semantics.md (opens in a new tab)references/executing-the-split.md (opens in a new tab)references/fetching-pr-data.md (opens in a new tab)references/is-it-enforced.md (opens in a new tab)references/split-strategy.md (opens in a new tab)scripts/codeowners_map.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tenstorrent/skills --plugin tt-review-skills15 skills in this plugin
/llk-perf-audit-reviewStatic performance review of Tensix compute kernels — wasted cycles, redundant register and memory traffic, loop-invariant work, and cheaper numerically-equivalent instruction sequences. Gated by a provenance lens (sfpi-compiled versus hand-written) and a semantic-equivalence test. Use when reviewing SFPU or Tensix kernel changes under tt_metal/tt-llk./llk-race-audit-reviewReviews tt-llk kernel changes for the nine intra-kernel race hazard classes plus stale hardware config across invocations — cfg-word overlap, dataflow CB sync, instruction latency, mailbox sync, MMIO ordering, NoC sync, reconfig stalls, semaphore handshakes, and srcreg bank sync — plus the cross-class seams between them. Use when reviewing changes under tt_metal/tt-llk./tt-comment-hygiene-reviewReviews comments and documentation surface — iteration-journey comments that describe how the code got here, unsurfaced tribal knowledge, magic tile and grid values, and ttnn op docstrings. Cheap to run alongside any other review. Use on any Tenstorrent diff./tt-l1-memory-reviewReviews per-core L1 footprint and circular-buffer sizing — buffer inventory discipline, data-movement cost across memory tiers, CB capacity versus tile counts, and accumulator sizing. Use when reviewing program factories, CB allocation, blocking or work-split changes, or any change that adds a buffer./tt-model-bringup-reviewReviews TTNN model code — layout and memory-config defaults, the decode residual contract, composite-op preference, program-config pitfalls, hidden host fallbacks, and logical batch versus tile padding. Use when reviewing model bringup or optimization changes under models/ or ttnn/ Python./tt-multichip-ccl-reviewReviews multi-chip and collective-communication code — num_links against device topology, bias-before-all-reduce numerics, distributed RMSNorm correctness, gather and reduce axes, fabric initialisation order, and CCL tuning claims. Use when reviewing changes touching CCL ops, mesh devices, fabric, or any all_gather / reduce_scatter / all_reduce path.Other plugins' skills for the same job