Skip to content

Instantly share code, notes, and snippets.

@ruvnet
Created June 14, 2026 20:15
Show Gist options
  • Select an option

  • Save ruvnet/a1e9a4b3da25e64ccfcc1124515f722d to your computer and use it in GitHub Desktop.

Select an option

Save ruvnet/a1e9a4b3da25e64ccfcc1124515f722d to your computer and use it in GitHub Desktop.
Ready-made Claude Code repo bot: triager on Haiku, reviewer on Sonnet, release manager on Opus, GitHub MCP pre-wired, gh allowlist set. One command: npx @metaharness/repo-maintainer@latest my-bot

Intro

@metaharness/repo-maintainer is a one-command scaffold for an open-source repo maintenance bot that runs on top of Claude Code. Instead of stitching together agents, prompts, MCP servers, and permission allowlists yourself, you run a single npx command and get a folder with three coordinated agents — a triager, a reviewer, and a release manager — already wired to the GitHub MCP server, the gh CLI, and the lint/test commands declared in a config file.

It's aimed at maintainers who already use Claude Code and want an opinionated starting point for offloading the high-volume, low-judgement parts of running a repo: labeling issues, asking for missing repros, dedup-ing against the existing backlog, running the test suite on a PR diff, leaving inline review comments, drafting a changelog from merged PRs, and opening a release PR. It deliberately does not auto-merge, force-push, or open release tags without your acceptance — the default permission mode requires acceptEdits for anything beyond reads.

Usage details

npx @metaharness/repo-maintainer@latest my-bot
cd my-bot
npm install
harness doctor

harness doctor validates that your Node version is supported, that the GitHub MCP server can authenticate (it looks for GITHUB_TOKEN first, then falls back to gh auth status), and that the claude CLI is on PATH. If anything is missing it prints a single fix command per row.

To actually use the bot, either open Claude Code in the scaffolded folder (the agents and slash commands register automatically) or run headless:

claude -p --plugin-dir my-bot "/triage #482"
claude -p --plugin-dir my-bot "/review pr 19"
claude -p --plugin-dir my-bot --permission-mode plan "/release patch"

The --permission-mode plan flag is useful for the release flow — it shows you the changelog and version bump without actually committing or pushing.

Features

  • Three pre-wired agents. triager runs on Haiku (cheap, high-volume), reviewer runs on Sonnet (diff-aware, calls your test/lint commands), release-manager runs on Opus (synthesizes long history into a changelog). Models are overridable in harness.config.json.
  • GitHub MCP server, pre-scoped. Issues, pulls, and releases scopes are declared in .mcp.json. No manual MCP wiring.
  • Permission allowlist that matches the agents. .claude/settings.json allows gh issue *, gh pr *, gh release *, plus read-only git commands and your declared npm test / npm run lint. Everything else still prompts.
  • Slash commands. /triage, /review, and /release are the entry points — they pull state from GitHub, decide a plan, and execute against your allowlist.
  • Config-driven label taxonomy. Add a label to harness.config.json and the triager picks it up at next session start. No prompt-rewriting.
  • Escalation handle. Set the maintainer field and the bot @-mentions you on uncertain decisions instead of guessing.

Advanced

A few flows worth knowing about.

Tuning model routing. If your issue tracker is noisy enough that Haiku struggles, set triager.model = "sonnet" in harness.config.json. If the repo is security-sensitive, bind the reviewer to opus. The agent prompts don't change — only the model in the agent frontmatter does.

Headless CI usage. The same /triage and /review commands work under claude -p, so you can wire the bot into a cron or a GitHub Action that calls Claude Code in print mode. Combine with --max-budget-usd to cap spend per invocation.

Dry-run a release. claude -p --plugin-dir my-bot --permission-mode plan "/release minor" will draft the changelog, show the proposed version bump, and stop without writing anything. Useful for catching a release-note before it goes out.

Swapping platforms. This vertical targets gh and the GitHub MCP server. If you're on GitLab or Bitbucket, you're better off starting from the bare host scaffold (@metaharness/claude-code) and building up — the three command files here assume gh semantics throughout.

Validating after edits. Once you've customized prompts or added agents, run harness validate to check that the agent frontmatter still parses, the command files reference real agents, and the MCP config is syntactically valid. CI-friendly.

Built on metaharness. MIT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment