write-review-commentlisted
Install: claude install-skill ku5ic/dotfiles
## Procedure
1. Get the scratch directory: `!`scratch-dir.sh``.
2. Parse $ARGUMENTS. If the first token resolves to an existing file, treat it as the report path and any remaining token as the PR author username. Otherwise treat the whole of $ARGUMENTS as the PR author username and leave the report path unset.
3. If no report path was resolved, use the latest one: `ls -t "$(scratch-dir.sh)"/review-\*.md | head -1`. If none exist, stop and ask for a path (forked: follow CLAUDE.md's forked decision protocol instead of guessing).
4. Read the review report. It follows the `rules/markdown-report.md` format: a severity rubric (failure/warning/info), each finding with file, line, "What", "Why it matters", and "Fix".
5. Look for a PR number in the report's `Scope:` line, its filename, or body (patterns like `pr-123`, `PR #123`, `PR: 123`). If found, run `gh pr view <n> --json author,headRefOid`. Use `.author.login` as the auto-detected author and `.headRefOid` as the ref for links.
6. Resolve the repo slug: `gh repo view --json nameWithOwner -q .nameWithOwner`. If this fails (no remote, no auth), fall back to plain backticked `path:line` text for every finding - no links - and say so at the top of the comment.
7. Resolve the ref for links: the PR's head sha from step 5 if a PR was found; otherwise the current commit, `git rev-parse HEAD`.
8. Pull the summary line and every failure/warning finding. Include an info finding only if it is a quick win or visibly affects code quality; dro