agentleFS
netanelavrnetanelavr/dotcursor/skills/kit-triage-comments/SKILL.md

kit-triage-comments

Skill6 starsChanged 27 days agoMITView on GitHub

Triage PR review comments — choose batch (collect/classify/approve as a set) or one-by-one walkthrough with the user before fixing. Use after review feedback lands.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Not a full PR code review (kit-review)

    line 13
  2. Distinctive:

    Not silent auto-fix — triage first unless the user says “fix as we go” in walkthrough mode

    line 14
  3. Distinctive:

    If mode omitted → ask once: batch or walkthrough

    line 21
  4. Distinctive:

    Recommendation: Must Fix · Should Fix · Optional · Skip

    line 59
  5. Very specific:

    After confirm, post a short summary (Fixed / Skipped with reasons) via gh pr comment using --body-file -.

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Triage Comments

Triage review comments, then fix only what was approved.

What this is NOT

  • Not a full PR code review (kit-review)
  • Not silent auto-fix — triage first unless the user says “fix as we go” in walkthrough mode

Input

kit-triage-comments [PR_URL_OR_NUMBER] [batch|walkthrough] (all optional)

  • Full URL or number, or no input → auto-detect PR from current branch
  • If mode omitted → ask once: batch or walkthrough
ModePaceBest when
batchFull list → approve as a setSpeed / high trust
walkthroughOne comment → waitDecide with the human

Shared: collect & classify

1. Resolve PR

PR_NUM=$(gh pr view --json number --jq '.number')
OWNER=$(gh pr view --json headRepositoryOwner --jq '.headRepositoryOwner.login')
REPO_NAME=$(gh pr view --json headRepository --jq '.headRepository.name')
REPO="$OWNER/$REPO_NAME"

2. Extract all comment types

# A. General PR discussion
gh api repos/$REPO/issues/$PR_NUM/comments

# B. Line-specific review comments
gh api repos/$REPO/pulls/$PR_NUM/comments

# C. Review submissions
gh api repos/$REPO/pulls/$PR_NUM/reviews

3. Drop resolved / outdated threads

gh api graphql -f query='query { repository(owner: "'$OWNER'", name: "'$REPO_NAME'") { pullRequest(number: '$PR_NUM') { reviewThreads(first: 100) { nodes { id isResolved isOutdated comments(first: 10) { nodes { id body author { login } }}}}}}}'

Skip isResolved or isOutdated.

4. Classify each remaining comment

Severity: Critical · Important · Minor · Noise
Recommendation: Must Fix · Should Fix · Optional · Skip

Guidelines:

  • Human comments rank higher than bots
  • Bot “Critical” → treat as Important until verified
  • “Will this break production?” → Critical
  • Preference-only → Minor/Noise

Mode: batch

Present a structured list grouped by severity. For each item include: #, severity, recommendation, author, file:line, quoted comment, proposed solution, short reasoning.

Then ask:

Which should I fix? Reply with numbers (1, 3), ranges (1-5), severity (all critical), all (Must Fix + Should Fix), or none.

Mode: walkthrough

  1. Present only the next comment (quote/paraphrase + link).
  2. Propose severity + one-line action (fix / reply / defer / disagree).
  3. Wait for the user’s decision; record it.
  4. Continue until done.
  5. Apply approved fixes as a small batch (or fix-as-you-go if they asked).

Rules: no silent fixes during triage; deferred needs a reason.

After approval (both modes)

  1. Implement only approved fixes; follow repo standards; lint.
  2. Resolve addressed threads when appropriate:
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "<ID>"}) { thread { isResolved }}}'
  1. Pause — ask the user to commit/push and confirm before posting on the PR.
  2. After confirm, post a short summary (Fixed / Skipped with reasons) via gh pr comment using --body-file -.

Output

Fixed X/Y approved comments | Lint clean | PR updated (when summary posted)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.