Meet NanoCo, maintainers of NanoClaw: we raised $12M to give every member of your team a professional assistant →
Skills
Messaging Official

GitHub

Add GitHub as a messaging channel. The agent participates in PR and issue comment threads when @-mentioned.

What it does

  • Agent participates in PR and issue comment threads
  • @-mention triggers initial response, thread auto-subscribes after
  • Per-thread session isolation — each PR or issue gets its own session
  • Strict mode for public repos limits triggers to registered members
  • Public mode for private repos lets all collaborators trigger the agent

What you'll need

  • NanoClaw installed and running
  • A dedicated GitHub bot account (not your personal account)
  • Repo admin access to set up the webhook

Install

/add-github

How it works

The /add-github skill connects NanoClaw to GitHub as a comment-thread participant. A webhook delivers issue_comment and pull_request_review_comment events to NanoClaw, the agent replies via the GitHub REST API, and each PR or issue becomes its own per-thread session.

The agent only responds when @-mentioned in a comment. After that first mention, the thread is auto-subscribed and the agent responds to all follow-up comments in it.

Setup

You need a dedicated bot account — not your personal GitHub account. The adapter filters out its own messages to avoid loops, and using your personal account means the agent could never reply to comments from you. Create a free account (e.g. my-org-bot) and invite it to your repos as a collaborator with write access.

Then:

  1. Log in as the bot account → Settings → Developer Settings → Personal Access Tokens.
  2. Create a fine-grained token with Pull requests (Read & Write) and Issues (Read & Write) scopes for the repos you want the bot in.
  3. On each repo, Settings → Webhooks → Add webhook:
    • URL: https://your-domain/webhook/github
    • Content type: application/json
    • Secret: a random string (openssl rand -hex 20)
    • Events: Issue comments + Pull request review comments

Add to .env:

GITHUB_TOKEN=github_pat_...
GITHUB_WEBHOOK_SECRET=your-webhook-secret
GITHUB_BOT_USERNAME=your-bot-username

What you get

  • PR comments and reviews — the agent reads PR comment threads and review comments and can reply in either.
  • Issue comments — same thing for issues.
  • Per-thread sessions — each PR or issue gets its own isolated agent session, so context doesn’t bleed across unrelated conversations.
  • @-mention gating — the bot stays quiet until called.

Modes

Pick unknown_sender_policy based on the repo:

  • Private repopublic. Only collaborators can comment, so it’s safe to let all comments through.
  • Public repostrict. Only registered members can trigger the agent. Add trusted collaborators with INSERT INTO agent_group_members .... Strangers’ comments are dropped silently — preventing them from consuming agent resources.

Tips

  • Use per-thread session mode in messaging_group_agents so each PR or issue gets its own session.
  • The platform ID is github:owner/repo (one messaging group per repo). The thread within is identified per-PR/issue automatically.
  • Find a GitHub user’s numeric ID with gh api users/<username> --jq .id — that’s what you put in users.id for member registration.
  • Wire to a dedicated agent group if the repo contains sensitive code. The agent’s tools and memory are scoped to that group.