Summary
The code-review skill currently posts its findings as a regular PR comment using gh pr comment. It would be much more useful if it posted inline review comments with GitHub's suggestion syntax instead, so that reviewers get an "Apply suggestion" button directly in the GitHub UI.
Current behavior
Step 8 of the skill posts a single PR comment with links to the relevant code. This works, but the reviewer has to manually navigate to each file and make the changes themselves.
Proposed behavior
Use the GitHub Reviews API to post inline comments with suggested changes:
gh api repos/{owner}/{repo}/pulls/{number}/reviews \
--method POST \
--input - <<'JSON'
{
"commit_id": "<full_sha>",
"event": "COMMENT",
"comments": [
{
"path": "path/to/file.kt",
"start_line": 10,
"line": 12,
"side": "RIGHT",
"start_side": "RIGHT",
"body": "Description of the issue.\n\n```suggestion\nfixed code here\n```"
}
]
}
JSON
This gives the PR author a clickable "Apply suggestion" / "Commit suggestion" button in the GitHub UI, making it much faster to act on review feedback.
Additional context
- The
allowed-tools in the skill frontmatter would need to include Bash(gh api:*) in addition to the existing gh pr permissions.
- For issues where a concrete fix can be suggested, use inline comments with
suggestion blocks. For more general observations without a clear single-line fix, a regular review body comment is still fine.
Summary
The
code-reviewskill currently posts its findings as a regular PR comment usinggh pr comment. It would be much more useful if it posted inline review comments with GitHub'ssuggestionsyntax instead, so that reviewers get an "Apply suggestion" button directly in the GitHub UI.Current behavior
Step 8 of the skill posts a single PR comment with links to the relevant code. This works, but the reviewer has to manually navigate to each file and make the changes themselves.
Proposed behavior
Use the GitHub Reviews API to post inline comments with suggested changes:
This gives the PR author a clickable "Apply suggestion" / "Commit suggestion" button in the GitHub UI, making it much faster to act on review feedback.
Additional context
allowed-toolsin the skill frontmatter would need to includeBash(gh api:*)in addition to the existinggh prpermissions.suggestionblocks. For more general observations without a clear single-line fix, a regular review body comment is still fine.