@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.
npx @metaharness/repo-maintainer@latest my-bot
cd my-bot
npm install
harness doctorharness 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.
- Three pre-wired agents.
triagerruns on Haiku (cheap, high-volume),reviewerruns on Sonnet (diff-aware, calls your test/lint commands),release-managerruns on Opus (synthesizes long history into a changelog). Models are overridable inharness.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.jsonallowsgh issue *,gh pr *,gh release *, plus read-onlygitcommands and your declarednpm test/npm run lint. Everything else still prompts. - Slash commands.
/triage,/review, and/releaseare 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.jsonand the triager picks it up at next session start. No prompt-rewriting. - Escalation handle. Set the
maintainerfield and the bot @-mentions you on uncertain decisions instead of guessing.
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.