fix-bugbot-pr-comments
Skill2 starsChanged 6 months agoMITView on GitHub
Fetch, triage, and fix unresolved Cursor Bugbot or automated PR review comments. Use when the user asks to fix Bugbot findings, babysit a PR, resolve automated review comments, or make a pull request merge-ready.
- Commits and pushes
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ethereum-developmentSkill
- financial-analysisSkill
- find-skillsSkill
- frontend-designSkill
- github-workflowsSkill
- guarded-db-migrationSkill
- multi-agent-worktree-disciplineSkill
- npm-publishSkill
- phase-pr-review-loopSkill
- plan-writingSkill
- research-intelligence-workflowsSkill
- simplified-technical-englishSkill
- skills-organizationSkill
- software-development-workflowsSkill
- subagent-orchestrationSkill
- turn-closeoutSkill
- web3-protocol-designSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 19 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use this workflow to make a PR merge-ready after Cursor Bugbot or other automated review comments appear.
- Very specific: line 19
Use gh for all GitHub operations.
- Distinctive: line 21
Read only each comment body plus the minimum path, line, and URL needed to act.
- Distinctive: line 23
Keep changes minimal and scoped to the PR.
- Distinctive: line 24
Do not modify CI workflows or config just to make checks pass.
- Distinctive: line 25
Do not include unrelated files or generated artifacts in commits.
- Distinctive: line 26
If a branch requires signed commits and this environment cannot produce a verified signature, stop and report the exact blocker instead of …
- Distinctive: line 30
Start from the current branch:
- Distinctive: line 38
If there are local changes, determine whether they are yours and relevant before touching them.
- Very specific: line 42
Use GraphQL so resolved threads are filtered before reading bodies.
- Distinctive: line 104
Read the referenced file and the smallest surrounding context needed.
- Distinctive: line 106
Add or update focused tests when behavior changes.
- Distinctive: line 107
Run scoped tests first.
- Distinctive: line 108
Run broader checks only when scoped checks pass or when the change touches shared behavior.
- Distinctive: line 117
If a build rewrites a tracked binary or generated artifact unrelated to the fix, restore it before committing.
- Distinctive: line 124
Before chasing CI, fetch the base branch and check freshness:
- Distinctive: line 131
Do not blame Bugbot for stale-base CI failures until the failing logs prove the PR change caused them.
- Distinctive: line 135
Use PR checks as the source of truth:
- Distinctive: line 141
If checks are pending:
- Very specific: line 152
If the failure is unrelated and likely already fixed upstream, fetch and merge latest origin/main.
- Distinctive: line 153
If fixing would require changing CI itself, stop and report.
- Distinctive: line 182
Keep the report short:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.
Files
Fix Bugbot PR Comments
Use this workflow to make a PR merge-ready after Cursor Bugbot or other automated review comments appear.
Core Rules
- Use
ghfor all GitHub operations. - Fetch unresolved review threads first; filter out resolved threads before reading comment bodies.
- Read only each comment body plus the minimum path, line, and URL needed to act.
- Fix only clear, correct, in-scope feedback.
- Keep changes minimal and scoped to the PR.
- Do not modify CI workflows or config just to make checks pass.
- Do not include unrelated files or generated artifacts in commits.
- If a branch requires signed commits and this environment cannot produce a verified signature, stop and report the exact blocker instead of force-pushing or bypassing rules.
Resolve PR Context
Start from the current branch:
git status --short --branch
gh pr view --json number,url,title,headRefName,baseRefName,mergeStateStatus,reviewDecision,isDraft
gh pr checks --json name,bucket,state,workflow,linkIf there are local changes, determine whether they are yours and relevant before touching them.
Fetch Unresolved Comments
Use GraphQL so resolved threads are filtered before reading bodies. If a PR may have more than 100 review threads or 50 reviews, paginate with pageInfo { hasNextPage endCursor } and repeat until complete; do not silently assume first:100 covers everything:
OWNER_REPO="$(gh repo view --json owner,name -q '.owner.login + "/" + .name')"
OWNER="${OWNER_REPO%/*}"
REPO="${OWNER_REPO#*/}"
PR="$(gh pr view --json number -q .number)"
gh api graphql \
-f owner="$OWNER" \
-f repo="$REPO" \
-F number="$PR" \
-f query='query($owner:String!, $repo:String!, $number:Int!) {
repository(owner:$owner, name:$repo) {
pullRequest(number:$number) {
reviewThreads(first:100) {
nodes {
isResolved
isOutdated
path
line
comments(first:10) {
nodes {
author { login }
body
url
}
}
}
}
reviews(first:50) {
nodes {
author { login }
state
body
url
}
}
}
}
}' \
--jq '.data.repository.pullRequest as $pr |
{
unresolvedThreads: [
$pr.reviewThreads.nodes[]
| select(.isResolved == false)
| {path,line,isOutdated,comments:[.comments.nodes[] | {author:.author.login, body, url}]}
],
reviews: [$pr.reviews.nodes[] | {author:.author.login, state, body, url}]
}'Classify each unresolved thread:
- Fix now: Clear, correct, in-scope bug or missing test.
- Needs human: Product decision, ambiguous requested behavior, or tradeoff.
- Won't fix: Incorrect, stale, or out of PR scope. Reply with a short rationale if appropriate.
Fix Loop
For each clear in-scope issue:
- Read the referenced file and the smallest surrounding context needed.
- Make the smallest safe fix.
- Add or update focused tests when behavior changes.
- Run scoped tests first.
- Run broader checks only when scoped checks pass or when the change touches shared behavior.
- Re-check generated files and unrelated artifacts before staging.
Common generated-file guard:
git status --shortIf a build rewrites a tracked binary or generated artifact unrelated to the fix, restore it before committing.
Reviewer Filtering and Follow-up
Separate automated review findings from human review. Filter Cursor Bugbot and other bots by author login/body patterns, but keep human comments visible for product or maintainer decisions. After a fix, reply with a concise rationale and evidence when useful; resolve the thread only when the platform and repository convention allow it. For GitHub GraphQL thread resolution, use resolveReviewThread with the thread ID after verifying the fix is pushed.
Before chasing CI, fetch the base branch and check freshness:
git fetch origin
git merge-base --is-ancestor origin/main HEAD || echo "branch may need update/rebase"Do not blame Bugbot for stale-base CI failures until the failing logs prove the PR change caused them.
CI Loop
Use PR checks as the source of truth:
gh pr checks --json name,bucket,state,workflow,linkIf checks are pending:
gh pr checks --watch --fail-fastIf checks fail:
- Inspect the failing check link or GitHub Actions failed logs.
- Extract the first actionable error.
- Fix only failures caused by this PR.
- If the failure is unrelated and likely already fixed upstream, fetch and merge latest
origin/main. - If fixing would require changing CI itself, stop and report.
Commit And Push
Before committing:
git status --short --branch
git diff --check
git diff --cached --statStage only files changed for the Bugbot fixes. Use a concise message:
git commit -m "fix(scope): concise summary"
git pushAfter pushing, re-run:
gh pr checks --json name,bucket,state,workflow,linkThen fetch unresolved threads again. Continue until CI is green and all actionable comments are resolved or clearly reported.
Final Report
Keep the report short:
- Issues fixed.
- Tests/checks run.
- Current CI status.
- Remaining blockers, if any, with URLs.
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
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.

