weigh-comments
Installation
SKILL.md
A teammate's comment gets a verdict from the code, and the user decides what goes back to them. Nothing is posted from this skill unless the user explicitly says to post it.
1. Gather
Take the PR from the request, else the current branch's PR. Fetch its review threads with their resolved state:
gh api graphql -f query='query($o:String!,$r:String!,$n:Int!){repository(owner:$o,name:$r){pullRequest(number:$n){headRefOid reviewThreads(first:100){nodes{isResolved isOutdated path line comments(first:20){nodes{author{login} body createdAt url}}}} comments(first:100){nodes{author{login} body createdAt url}} reviews(first:50){nodes{author{login} state body submittedAt}}}}}' -F o=<owner> -F r=<repo> -F n=<number>
Keep comments from people: drop bots (CodeRabbit, Greptile, Macroscope, [bot] logins). When the user names someone, keep theirs; otherwise keep the unresolved ones and anything newer than the latest push.
Done when you have a list of comments, each with its author, file and line, and URL.
2. Verdict
For each comment, check its claim against the code at the PR head: open the file, follow the call, run the case it describes when you can. Give each one a verdict: