# Add Github

Add GitHub channel integration via Chat SDK.

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill add-github -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill add-github -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill add-github -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill add-github -g -a gemini-cli -y`

## Description

Add GitHub channel integration via Chat SDK. PR and issue comment threads as conversations.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Add GitHub Channel

Adds GitHub support via the Chat SDK bridge. The agent participates in PR and
issue comment threads. NanoClaw doesn't ship channels in trunk, this skill
copies the GitHub adapter in from the `channels` branch.

The mechanical steps under **Apply** carry `nc:` directive fences: an agent
reads the prose and applies them, and a parser can apply them deterministically
from the same document. Every directive is idempotent, so the whole skill is
safe to re-run; anything a parser can't apply falls back to the prose beside it.

## Prerequisites

You need a **dedicated GitHub bot account** (not your personal account). The adapter uses this account to post replies and filters out its own messages to avoid loops. Create a free GitHub account for your bot (e.g. `my-org-bot`), then invite it as a collaborator with write access to the repos you want monitored.

## Apply

### 1. Copy the adapter

Fetch the `channels` branch and copy the GitHub adapter into `src/channels/`
(overwrite, the branch is canonical):

```nc:copy from-branch:channels
src/channels/github.ts
src/channels/github-registration.test.ts
```

### 2. Register the adapter

Append the self-registration import to the channel barrel (skipped if the line
is already present). This one line is the skill's only reach-in into core:

```nc:append to:src/channels/index.ts
import './github.js';
```

### 3. Install the adapter package

Pinned to an exact version, the supply-chain policy rejects ranges and `latest`:

```nc:dep
@chat-adapter/github@4.41.1
```

### 4. Build and validate

The build guards the typed `createChatSdkBridge(...)` core call and proves the
dependency is installed (the adapter import throws if `@chat-adapter/github`
isn't present):

```nc:run effect:build
pnpm run build
```
```nc:run effect:test
pnpm exec vitest run src/channels/github-registration.test.ts
```

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/add-github/SKILL.md
