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
Create a fast phone agent with live voice streaming
They assembled a call-answering agent with live transcription, generation, and speech output, then moved it closer to the services to get about 400ms latency.
Have coding agents test your onboarding flow
Run coding agents through your product’s onboarding and get a scorecard, fix list, and session traces.
Use an agent to inspect and explain COBOL on z/OS
A desktop agent connected to a mainframe to read COBOL, submit jobs, and summarize failures from spool output.
Let your agent patch its own repo
A developer reported that their custom agent made its first code edit in its own repository.
Deploy a project and register a domain from one agent flow
A custom agent can set up a Cloudflare account, buy a domain, and ship an app with only brief approval steps.
Trace C# symbol usage with a Roslyn-backed index
Graphify C# helps agents map real C# usages, including overrides and implementations, from compiler-resolved project data.