GitHub Issue Resolver

👤 ashwinhegde19 📦 v1.0.0 ⭐ 4.4 ⬇️ 2.4K 下载
🤖 AI-Agent 免费 🔑 需 API Key

📖 技能介绍


name: github-issue-resolver description: Autonomous GitHub Issue Resolver Agent with guardrails. Use when the user wants to discover, analyze, and fix open issues in GitHub repositories. Triggers on requests like "fix GitHub issues", "resolve issues in repo", "work on GitHub bugs", or when the user provides a GitHub repository URL and asks for issue resolution. Supports the full workflow from issue discovery to PR submission with safety guardrails preventing scope creep, unauthorized access, and dangerous operations.


GitHub Issue Resolver

Autonomous agent for discovering, analyzing, and fixing open GitHub issues — with a 5-layer guardrail system.

⚠️ GUARDRAILS — Read First

Every action goes through guardrails. Before any operation:

  1. Load guardrails.json config
  2. Validate scope (repo, branch, path)
  3. Check action gate (auto/notify/approve)
  4. Validate command against allowlist
  5. Log to audit trail

For guardrail details, see references/guardrails-guide.md.

Key Rules (Non-Negotiable)

小葱技能站7w4.net发现了升级插件。

  • Never touch protected branches (main, master, production)
  • Never modify .env, secrets, CI configs, credentials
  • Never force push
  • Never modify dependency files without explicit approval
  • Never modify own skill/plugin files
  • One issue at a time — finish or abandon before starting new
  • All dangerous actions require user approval (write code, commit, push, PR)
  • Everything is logged to audit/ directory

Workflow

Phase 1 — Issue Discovery

Trigger: User provides a GitHub repository (owner/repo).

Steps:

  1. Validate repo against guardrails: bash python3 scripts/guardrails.py repo <owner> <repo> If blocked, tell the user and stop.

  2. Fetch, score, and present issues using the recommendation engine: bash python3 scripts/recommend.py <owner> <repo> This automatically fetches open issues, filters out PRs, scores them by severity/impact/effort/freshness, and presents a formatted recommendation.

Always use recommend.py — never manually format issue output. The script ensures consistent presentation every time.

For raw JSON (e.g., for further processing): bash python3 scripts/recommend.py <owner> <repo> --json

⏹️ STOP. Wait for user to select an issue.


Phase 2 — Fixing

Trigger: User selects an issue.

Steps:

  1. Lock the issue (one-at-a-time enforcement): bash python3 scripts/guardrails.py issue_lock <owner> <repo> <issue_number>

  2. Read full issue thread including comments.

  3. Clone the repo (Gate: notify): bash python3 scripts/sandbox.py run git clone https://github.com/<owner>/<repo>.git /tmp/openclaw-work/<repo>

  4. Create a safe branch (Gate: auto): bash python3 scripts/sandbox.py run git checkout -b fix-issue-<number>

  5. Explore codebase — read relevant files. For each file: bash python3 scripts/guardrails.py path <file_path>

  6. Plan the fix — explain approach to user: ``` ## Proposed Fix

  7. Problem: [root cause]
  8. Solution: [what changes]
  9. Files: [list of files and what changes in each]
  10. Estimated diff size: [lines] ```

⏹️ STOP. Wait for user to approve the plan before implementing.

  1. Implement the fix (Gate: approve):
  2. Apply changes
  3. Check diff size: python3 scripts/guardrails.py diff <line_count>
  4. Log: python3 scripts/audit.py log_action write_code success

Phase 3 — Testing

After implementing:

  1. Find and run tests (Gate: notify): bash python3 scripts/sandbox.py run npm test # or pytest, cargo test, etc.

  2. If tests fail AND autoRollbackOnTestFail is true:

  3. Revert all changes
  4. Notify user
  5. Suggest alternative approach

  6. If no tests exist, write basic tests covering the fix.

  7. Report results to user.


Phase 4 — Draft PR for Review (Approval REQUIRED)

⚠️ NEVER create PR automatically. Always ask first.

Do NOT dump full diffs in chat. For any non-trivial project, push the branch and let the user review on GitHub where they get syntax highlighting, file-by-file navigation, and inline comments.

  1. Commit changes (Gate: approve): bash python3 scripts/sandbox.py run git add . python3 scripts/sandbox.py run git commit -m "Fix #<number>: <title>"

  2. Show a change summary (NOT the raw diff) — keep it concise: ``` ## Changes

  3. src/models.py — Added field validation (title length, enum checks)
  4. app.py — Added validation to POST endpoint, 400 error responses
  5. tests/test_app.py — 22 new tests covering validation rules
  6. 4 files changed, ~100 lines of source + ~150 lines of tests
  7. All tests passing ✅ ```

  8. Ask explicitly: "Ready to push and create a draft PR?"

  9. Only after user says "yes" (Gate: approve): bash python3 scripts/sandbox.py run git push -u origin fix-issue-<number> python3 scripts/sandbox.py run gh pr create --draft --title "..." --body "..." Note: PRs are always created as draft by default. The PR body should include a detailed description of all changes, test results, and link to the issue (Closes #N).

  10. Share the PR link — user reviews on GitHub.

  11. Unlock the issue: bash python3 scripts/guardrails.py issue_unlock


Scripts Reference

Script Purpose Run Without Reading
scripts/recommend.py Primary entry point — fetch, score, and present issues
scripts/fetch_issues.py Raw issue fetcher (used internally by recommend.py)
scripts/analyze_issue.py Deep analysis of single issue
scripts/create_pr.py PR creation wrapper
scripts/guardrails.py Guardrail enforcement engine
scripts/sandbox.py Safe command execution wrapper
scripts/audit.py Action logger

References

🤖 AI 评测

这个 Skill 质量不错,自动化程度高,能从发现 GitHub 问题到提交修复代码全流程处理。最值得肯定的是它的安全保护措施很完善,所有危险操作都要用户确认,不会乱改重要文件或推送到主分支。问题评分功能帮助快速找到值得修复的 issue。不过依赖外部工具才能创建 PR,且默认配置不一定适合所有项目。总体来说是一款既智能又安全的工具。

📊 多维度评分

适应性4.7
规范性4.3
有效性4.5
可靠性4.3
可信度4.3

📁 包含文件 (13 个)

📄 SKILL.md 6.2 KB
📄 _meta.json 140 B
📄 guardrails.json 5.1 KB
📄 references/guardrails-guide.md 4.8 KB
📄 references/quick-reference.md 2.2 KB
📄 scripts/analyze_issue.py 3.2 KB
📄 scripts/audit.py 9.3 KB
📄 scripts/create_pr.py 2.6 KB
📄 scripts/fetch_issues.py 4.5 KB
📄 scripts/guardrails.py 25.7 KB
📄 scripts/recommend.py 21.7 KB
📄 scripts/sandbox.py 9.7 KB
📄 skill-card.md 2.7 KB