Skip to content

Recipes

Lane Holloway edited this page Oct 21, 2026 · 1 revision

Recipes

Ready-made auto rules for common workflows. Each goes under auto_rules in config.json, globally or for one repo, or can be built on the Rules tab. Replace you with your GitHub login. Remember that once any rule exists, only the keys your rules list auto-run, so combine the recipes you want.

Auto-run must be on for the repo (a on the Repos tab) for repo triggers to run on their own.

Merge Dependabot PRs when they're green

Claude waits for CI and merges. If CI fails, it fixes the code for the new version, including breaking changes from major upgrades, then merges once it passes. If it can't, it leaves a comment and doesn't merge. Merge conflicts are handed back to Dependabot.

"pull_request": [
  {
    "authors": ["dependabot[bot]"],
    "prompt": "Handle Dependabot pull request #{{.Number}} \"{{.Title}}\" in {{.Repo}}.\nURL: {{.URL}}\n\nWait for CI to finish with gh pr checks {{.Number}} --watch.\nIf every check passes, merge it with gh pr merge {{.Number}} --squash --delete-branch (use --merge if squash merges are not allowed).\nIf checks fail, check out the PR, read the failing logs (gh run view --log-failed), fix the code so it works with the new version, push the fix to the PR branch, wait for CI again, and merge once it passes.\nIf there are no checks, run the build and tests locally and merge if they pass.\nIf you cannot get it passing, leave the PR open and comment on it explaining what breaks.",
    "model": "claude-sonnet-5-5",
    "allow": ["edit", "update_pr", "comment", "merge"]
  }
],
"pull_request:checks_failed": [
  { "authors": ["dependabot[bot]"], "allow": ["edit", "update_pr", "comment", "merge"] }
],
"pull_request:conflict": [
  {
    "authors": ["dependabot[bot]"],
    "prompt": "Dependabot PR #{{.Number}} in {{.Repo}} has merge conflicts. Comment \"@dependabot rebase\" with gh pr comment {{.Number}} and do nothing else.",
    "allow": ["comment"]
  }
]

Fix CI on your own PRs

"pull_request:checks_failed": [
  { "authors": ["you"], "allow": ["edit", "update_pr"] }
]

Claude reads the failing logs, fixes the cause on your PR branch and pushes, or tells you the failure is unrelated (a flaky test, an outage).

Address review feedback on your PRs

"pull_request:changes_requested": [
  { "authors": ["you"], "allow": ["edit", "update_pr", "comment"] }
],
"pull_request:commented": [
  { "authors": ["you"], "allow": ["edit", "update_pr", "comment"] }
]

When a reviewer requests changes or comments, Claude makes the changes on the PR branch, pushes, and replies to each comment, in the review thread when there is one. authors here is who opened the PR, so this only touches your own PRs. Comments from bots never trigger anything.

Keep your PRs mergeable

"pull_request:conflict": [
  { "authors": ["you"], "allow": ["edit", "update_pr"] }
]

Claude merges the base branch into the PR, resolves the conflicts, runs the tests and pushes, without force-pushing.

Review PRs others open

"pull_request": [
  { "skip_drafts": true, "skip_bots": true, "skip_authors": ["you"], "model": "claude-opus-5-5", "effort": "high" }
]

Claude reviews each new PR and asks before submitting the review. Add "allow": ["review"] to let it submit on its own.

Submit reviews when you're asked

"pull_request:review_requested": [
  { "allow": ["review"], "model": "claude-opus-5-5", "effort": "high" }
]

By default a review request runs Claude but asks before submitting. This lets it submit. It works on any repo through the inbox.

Fix issues labeled bug

"issue": [
  { "labels": ["bug"], "skip_labels": ["needs-design"], "allow": ["edit", "push_branch", "open_pr"] }
],
"issue:labeled": [
  { "labels": ["bug"], "allow": ["edit", "push_branch", "open_pr"] }
]

New issues opened with the bug label, and existing issues that get it later, are reproduced, fixed on a new branch with a test, and opened as a PR. The PR waits for your review.

Patch serious Dependabot alerts

"dependabot_alert": [
  { "min_severity": "high", "model": "claude-haiku-5-5", "effort": "low", "allow": ["edit", "push_branch", "open_pr"] }
]

For high and critical alerts, Claude upgrades the dependency on a branch, runs the tests, and opens a PR, unless Dependabot already did. A fast model and low effort keep routine bumps cheap.

Have Claude draft replies to mentions

"inbox": { "enabled": true, "auto_run": true }

This is the default. Claude reads the thread and drafts a reply, then asks before posting. To have it only list mentions and review requests for you, set "auto_run": false.

Clone this wiki locally