Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .claude/skills/running-in-ci/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,28 @@ gh api "repos/{owner}/{repo}/actions/runs?branch=main&status=completed&per_page=
If you cannot verify, say "I haven't confirmed whether these failures are
pre-existing."

## Applying GitHub Suggestions

When a reviewer posts a GitHub suggestion (`suggestion` code block), apply it
with exact scope — change only the lines the suggestion covers. Do not
reinterpret the suggestion's intent or extend it to adjacent lines.

If the suggestion seems incomplete or you think more lines should change, apply
the literal suggestion first and note the potential improvement in your reply.

## Replying to Comments

Before posting a comment, check for recent bot comments on the same
PR/issue to avoid duplicates from concurrent runs:

```bash
gh api repos/{owner}/{repo}/issues/{number}/comments \
--jq '.[] | select(.user.login == "{bot_login}") | {id, created_at, body: (.body | .[0:100])}'
```
Comment on lines +120 to +123
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issues API returns comments oldest-first by default. Without --paginate, only the first 30 are returned — on a busy PR, a bot comment from 2 minutes ago won't appear. Consider fetching only the tail:

Suggested change
```bash
gh api repos/{owner}/{repo}/issues/{number}/comments \
--jq '.[] | select(.user.login == "{bot_login}") | {id, created_at, body: (.body | .[0:100])}'
```
```bash
gh api repos/{owner}/{repo}/issues/{number}/comments \
--jq '[.[] | select(.user.login == "{bot_login}")] | last | {id: .url, created_at: .created_at, body: (.body | .[0:100])}'

Using `last` on the full paginated result works, but `--paginate` is slow on busy PRs. An alternative: `?sort=created&direction=desc&per_page=5` to fetch only the 5 most recent comments, then filter for the bot.


If you already commented on the same topic within the last 5 minutes, do not
post again.
Comment on lines +117 to +126
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to what extent does this duplicate existing guidance?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review-pr skill has dedup logic, but it's specific to flaky test issue comments (editing an existing bot comment on a tracking issue). This one targets a different scenario: concurrent claude-mention runs both responding to the same issue_comment event and posting near-identical PR comments seconds apart.

That said, if you think the pattern is general enough that skills should just know to check, happy to drop this and rely on convention.


Reply in context rather than creating new top-level comments:

- **Inline review comments** (`#discussion_r`): Reply in the review thread:
Expand Down
Loading