agentleFS
QubinodeQubinode/qubinode_navigator/.claude/skills/github-issue-resolver/SKILL.md

github-issue-resolver

Skill1 starsChanged 10 months agoMITView on GitHub

name: github-issue-resolver description: Strategically resolves GitHub Actions failures, failed pull requests, and Dependabot issues using the gh CLI. Use when asked to fix CI failures, triage GitHub Actions errors, manage failed PRs, handle Dependabot updates, or perform repository maintenance. allowed-tools: Automates GitHub repository maintenance: diagnosing and fixing CI failures, managing failed PRs, and handling Dependabot updates using the gh CLI. Before starting, verify the environment: If gh is not authenticated, stop and ask the user to run gh auth login.

  • Installs packages
  • Commits and pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    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
  1. Distinctive:

    Before starting, verify the environment:

    line 23
  2. Very specific:

    If gh is not authenticated, stop and ask the user to run gh auth login.

    line 30
  3. Distinctive:

    Always process issues in this order:

    line 34
  4. Distinctive:

    If logs are truncated, download the full log:

    line 58
  5. Very specific:

    Run local verification when possible (e.g., python3 -m pytest)

    line 81
  6. Very specific:

    Commit with message: fix(ci): <description of fix>

    line 82
  7. Distinctive:

    If the rerun fails with the same error, investigate deeper.

    line 92
  8. Distinctive:

    If the branch is behind base, update it:

    line 114
  9. Distinctive:

    Needs rebase: - Use Dependabot command:

    line 174
  10. Distinctive:

    If trivial (import path changes, minor API tweaks): fix in-place

    line 190
  11. Distinctive:

    If complex (major version breaking changes): comment findings and leave for human review

    line 191
  12. Distinctive:

    After processing, provide a structured report:

    line 199

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

name: github-issue-resolver description: Strategically resolves GitHub Actions failures, failed pull requests, and Dependabot issues using the gh CLI. Use when asked to fix CI failures, triage GitHub Actions errors, manage failed PRs, handle Dependabot updates, or perform repository maintenance. allowed-tools:

  • Bash
  • Read
  • Edit
  • Write
  • Grep
  • Glob
  • Task

GitHub Issue Resolver

Automates GitHub repository maintenance: diagnosing and fixing CI failures, managing failed PRs, and handling Dependabot updates using the gh CLI.

Prerequisites

Before starting, verify the environment:

gh auth status
gh repo view --json nameWithOwner -q .nameWithOwner

If gh is not authenticated, stop and ask the user to run gh auth login.

Priority Triage Order

Always process issues in this order:

  1. Security vulnerabilities - Dependabot security alerts and CVE-related PRs
  2. Broken main/master branch - Failures on the default branch
  3. Blocking PR failures - PRs with failed required checks
  4. Dependabot updates - Dependency version bumps
  5. Flaky tests / intermittent failures - Non-deterministic issues

Workflow 1: GitHub Actions Failure Resolution

Step 1: Identify failed runs

gh run list --status failure --limit 20 --json databaseId,displayTitle,headBranch,conclusion,createdAt,workflowName

Step 2: Analyze failure logs

For each failed run:

gh run view <run-id> --log-failed 2>&1 | tail -200

If logs are truncated, download the full log:

gh run view <run-id> --log-failed > /tmp/gh-run-<run-id>.log

Step 3: Diagnose the root cause

Classify the failure into one of these categories:

CategoryIndicatorsAction
Test failureFAILED, AssertionError, pytest exit codeRead test file, understand assertion, fix code or test
Build errorModuleNotFoundError, SyntaxError, compilation errorsFix imports, syntax, or dependency declarations
Lint/formatruff, black, flake8, shellcheck violationsRun formatter locally, commit fixes
Dependencypip install failures, version conflictsUpdate requirements, pin versions
InfrastructureTimeout, runner error, service unavailableRerun the workflow - do not change code
PermissionsPermission denied, token errorsFlag for manual intervention

Step 4: Implement fixes

  1. Checkout the failing branch: git checkout <branch>
  2. Make targeted fixes based on diagnosis
  3. Run local verification when possible (e.g., python3 -m pytest)
  4. Commit with message: fix(ci): <description of fix>
  5. Push and verify: git push

Step 5: Rerun and verify

gh run rerun <run-id> --failed
gh run watch <run-id>

If the rerun fails with the same error, investigate deeper. If it fails with a different error, treat it as a new failure.

Workflow 2: Failed Pull Request Management

Step 1: List PRs with failed checks

gh pr list --state open --json number,title,author,headRefName,statusCheckRollup --jq '.[] | select(.statusCheckRollup != null) | select([.statusCheckRollup[] | select(.conclusion == "FAILURE")] | length > 0) | {number, title, author: .author.login, branch: .headRefName}'

Step 2: Inspect a specific PR

gh pr checks <pr-number>
gh pr view <pr-number> --json title,body,headRefName,baseRefName,mergeable,mergeStateStatus
gh pr diff <pr-number>

Step 3: Fix the PR

  1. Checkout: gh pr checkout <pr-number>
  2. Analyze failures using gh pr checks <pr-number> --json and gh run view
  3. If the branch is behind base, update it:
    gh pr update-branch <pr-number>
  4. Implement fixes, commit, and push
  5. Comment on the PR explaining the fix:
    gh pr comment <pr-number> --body "Fixed CI failure: <explanation>"

Step 4: Handle merge conflicts

gh pr view <pr-number> --json mergeable -q .mergeable

If CONFLICTING:

  1. Checkout the PR branch
  2. Merge or rebase the base branch
  3. Resolve conflicts
  4. Push the resolution
  5. Comment explaining the resolution

Workflow 3: Dependabot Issue Handling

Step 1: List Dependabot PRs

gh pr list --author "app/dependabot" --json number,title,labels,createdAt,headRefName --jq 'sort_by(.createdAt)'

Step 2: Categorize updates

Classify each PR by update type:

TypeRiskStrategy
Security patch (any version)High priorityMerge immediately after checks pass
Patch version (x.y.Z)LowBatch and merge
Minor version (x.Y.0)MediumReview changelog, merge if checks pass
Major version (X.0.0)HighReview breaking changes, test thoroughly

Step 3: Check for conflicts and failures

For each Dependabot PR:

gh pr checks <pr-number>
gh pr view <pr-number> --json mergeable -q .mergeable

Step 4: Handle common Dependabot scenarios

Checks pass, no conflicts - Merge:

gh pr merge <pr-number> --squash --auto

Needs rebase - Use Dependabot command:

gh pr comment <pr-number> --body "@dependabot rebase"

Merge conflicts Dependabot cannot resolve:

  1. Checkout the PR branch
  2. Resolve conflicts manually
  3. Push resolution
  4. Let checks run, then merge

Failed checks on Dependabot PR:

  1. Analyze what broke (API changes, deprecated features)
  2. If trivial (import path changes, minor API tweaks): fix in-place
  3. If complex (major version breaking changes): comment findings and leave for human review

Step 5: Batch compatible updates

Group related dependency updates (e.g., multiple @types/* packages) and merge them together when possible.

Workflow 4: Summary and Reporting

After processing, provide a structured report:

## Repository Maintenance Report

### Resolved
- [#PR] Description - fix applied

### Merged
- [#PR] Dependabot: package x.y.z -> x.y.w

### Needs Manual Attention
- [#PR] Reason it cannot be auto-resolved

### Rerun (Infrastructure Failures)
- [Run ID] Workflow name - rerun triggered

Safety Guidelines

Always confirm before:

  • Force-pushing any branch
  • Closing or merging PRs
  • Deleting branches
  • Making changes to workflow files (.github/workflows/)
  • Merging major version Dependabot updates

Never:

  • Force-push to main/master
  • Merge PRs with failing required checks without user approval
  • Modify secrets or environment variables
  • Skip CI checks with [skip ci] commits
  • Dismiss reviews without user approval

When to escalate to the user:

  • Security-related failures requiring credential rotation
  • Persistent failures after 2 fix attempts
  • Major version dependency updates with breaking changes
  • Workflow file modifications needed
  • Merge conflicts in generated files (lockfiles, compiled assets)

Error Handling

ErrorRecovery
gh: Not FoundVerify repo permissions: gh repo view
gh: HTTP 403Token lacks required scopes: gh auth status
Rate limitedWait and retry: gh api rate_limit
Rerun failsDownload full logs, analyze offline
Branch protectedCannot push directly - create a new PR with fix

Decision Tree: Should I Auto-Fix?

Is it a test failure?
├─ Yes: Is the fix obvious (typo, import, assertion update)?
│  ├─ Yes → Fix it
│  └─ No → Report to user
└─ No: Is it a lint/format issue?
   ├─ Yes → Run formatter, commit
   └─ No: Is it a dependency issue?
      ├─ Yes: Is it a patch/minor?
      │  ├─ Yes → Update and test
      │  └─ No → Report to user
      └─ No: Is it infrastructure?
         ├─ Yes → Rerun workflow
         └─ No → Report to user

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.