OpenClaw + GitHub — The Honest Integration Guide (PAT, Webhook Verification)

GitHub is not an OpenClaw channel. It works through the REST API with a token — here are the endpoints that matter, how to verify webhooks properly, and the rate limits.

⚡ Skip the boilerplate

A ready-made SOUL.md already knows the GitHub playbook — copy it, start your agent, ship today.

Want every guide + every template? Complete Bundle — $29 best value

First, the honest part: is GitHub an OpenClaw channel?

GitHub is not a native OpenClaw channel. There is no channels.github. GitHub is connected through its REST API with a personal access token, or through the gh CLI that ships with most Linux images.

Most “OpenClaw + X” write-ups online get this wrong: they paste a channels: block for a tool OpenClaw has no adapter for. OpenClaw accepts that key silently (its config schema allows extra channel keys) and then nothing happens — no token, no webhook, no error. That is the single most common reason a “connected” agent stays silent.

What you can actually build with GitHub

How OpenClaw connects to GitHub

GitHub's API is a documented REST surface with predictable pagination and clear scopes. An agent can read issues and pull requests, open new ones, comment on threads, and read repository contents — with a token that only carries the scopes you grant.

Whichever path you take, the agent still needs a personality and a job description. A bare API key tells OpenClaw it may call GitHub; a SOUL.md tells it when to call it and what a good answer looks like. Skipping that step is why most integrations produce impressive demos and nothing else.

Credentials

🔐 Scope it down. Use a fine-grained token with per-repository access and read-only permissions to start. A classic repo-scoped PAT is a full account key for every repository you can see — fine for a script, reckless for an agent.

Setup

Step 1 — Issue a fine-grained token

GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens. Pick only the repositories the agent needs, and only the permissions it needs (read-only contents and pull requests covers most triage).

Step 2 — Learn the three endpoints that cover most work

GET /repos/{owner}/{repo}/issues for issues and pull requests together, GET /repos/{owner}/{repo}/pulls/{n}/comments for review threads, and GET /repos/{owner}/{repo}/contents/{path} for files. All paginate with per_page and a page parameter.

Step 3 — Verify webhooks if you accept them

If anything pushes events into OpenClaw, verify X-Hub-Signature-256 with the shared secret before acting on the payload. An unverified webhook endpoint is an open door to your agent.

Copy-paste config

# 1. list issues + pull requests (both live under /issues)
curl -s "https://api.github.com/repos/OWNER/REPO/issues?state=open&per_page=50" \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  -H "X-GitHub-Api-Version: 2022-11-28" | head -c 300

# 2. open an issue
curl -s -X POST https://api.github.com/repos/OWNER/REPO/issues \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  -H "Content-Type: application/json" \
  -d '{"title":"Agent summary","body":"Overnight triage: ..."}'

# 3. read a file from the default branch
curl -s https://api.github.com/repos/OWNER/REPO/contents/README.md \
  -H "Authorization: Bearer $GITHUB_TOKEN" | head -c 200

The raw API call underneath

One detail that breaks most scripts: GET /issues returns pull requests as well as issues. Filter on pull_request being present in the response object:

curl -s "https://api.github.com/repos/OWNER/REPO/issues?state=open" \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  | python3 -c "import json,sys; d=json.load(sys.stdin); \
print('issues:', sum(1 for i in d if 'pull_request' not in i), '| PRs:', sum(1 for i in d if 'pull_request' in i))" 

Gotchas that cost people an afternoon

  1. Pull requests appear in the issues list. Any count or digest over /issues double-counts work unless you filter on the presence of pull_request.
  2. Search has a much lower limit than core. The search API allows about 30 requests per minute authenticated and 10 unauthenticated — the most common 403 you will see on GitHub.
  3. Secondary rate limits punish concurrency. Many simultaneous requests get a 403 that says “secondary rate limit”; add jitter and serialise the calls.
  4. Webhook payloads are untrusted until verified. Compute HMAC-SHA256 over the raw body with the shared secret and compare it to X-Hub-Signature-256 before acting.
  5. Write permissions are silently broader than you expect. An agent with contents: write can push code. Keep that off until you have a review step in the loop.

FAQ

Can the agent push code?

Technically yes, with write scope. For anything beyond a scratch branch, keep writes behind a human approval step — the Complete Bundle covers the review patterns.

Does it need a GitHub App instead of a PAT?

For personal use, no. For anything shared across a team, yes — an App gives you per-repository installations and no shared long-lived secret.

Why did my agent report no issues when the repo has dozens?

Usually the search API rate limit, or the repo was not included in the token's repository selection. Both look identical from the outside.

Where to start

Three paths, cheapest first. The free pack is the fastest way to see the whole agent workflow end to end; the bundle is where the multi-channel setup patterns live.

Before you wire anything up, work through the free deployment checklist — it is the rollout order that keeps a half-configured agent from eating your quota.

🔥 Get All 10 Premium Products for $29 Save 70% with the Complete Bundle
Get Bundle → Free Deployment Checklist →