Set up a GitHub bot that triages and patches bugs
They built a GitHub bot that sorts issues, reviews pull requests, answers with citations, and opens patch PRs for humans to check.
- What they did
- They ran the bot in GitHub Actions with OpenCode and Muse Spark. Each agent lived in its own markdown file with a limited tool list, and different GitHub events sent work to different agents: new issues went to triage, pull requests went to review, and a special label triggered bug fixing. A maintainer could also use a /oc comment to hand work to an orchestrator agent.
- How it went
- For bug fixes, the bot tried to reproduce the problem, apply a patch, add a test, run pytest, and open a PR for review. It could not merge changes itself. Example outputs showed it asking for a reproduction, calling out emoji churn as low-quality AI content, and catching a prompt injection attempt; there was no benchmark yet, and some long review runs came back empty so they had to be run again.
- Tips
- The prompts were tuned around Python, pytest, and uv, so they need adjustment for other stacks. The allow lists are not the main protection; human review and branch rules are what keep it safe.
Try it yourself with Claude Code
You are helping me build a GitHub bot for [owner/repo]. Set up event-based agents that can label new issues, review pull requests, answer repo questions with citations to docs or code, and flag low-effort AI-written contributions. For simple bugs, reproduce the issue, make a fix, add a test, run the project’s test command, and then open a patch PR for human review only. Before you do anything that sends comments, opens a PR, deletes files, or changes repository state, stop and ask me to approve that step. First show me the agent layout, the trigger rules, and a dry-run on a few existing issues or PRs so I can review the output before anything is posted.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Run a two-pass bug check before opening a PR
Use an agent to flag possible bugs first, then have it verify each one before any pull request is opened.
Build your own daily-use apps with an agent
A developer used coding agents to make personalized replacements for core tools, then waited a week before deciding whether each change should stick.
Use agents to benchmark and tune Rust performance
Have an agent measure Rust code, make one optimization at a time, and keep only changes that improve runtime.
Check traces for hidden agent errors
Laminar’s flow-1 reviews agent traces end to end so quiet mistakes can be caught without sampling.
Use agents to propagate one ML improvement across ranking models
Meta used custom agents to help adapt and roll out a training technique across ads ranking models, with engineers approving plans and final shipping.
Deploy static pages on your own Cloudflare domain
An agent can install a Cloudflare Workers app that publishes HTML pages on your domain and keeps a dated list of deployments.