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
- Triage the overnight issues: a morning digest grouped by label, age and open questions
- Draft a review comment on a pull request, with the diff quoted, for you to approve before posting
- Answer “why did this test fail last night?” by reading CI logs through the API
- Keep the agent's own run history in an issue thread — visible, auditable, free
- Watch releases and turn changelogs into a summary for your users
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
GITHUB_TOKEN— a fine-grained personal access token, scoped to specific repositories and permissionsGITHUB_APP_*— optional: GitHub App credentials, which are the better choice for anything shared
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
- Pull requests appear in the issues list. Any count or digest over
/issuesdouble-counts work unless you filter on the presence ofpull_request. - 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.
- Secondary rate limits punish concurrency. Many simultaneous requests get a 403 that says “secondary rate limit”; add jitter and serialise the calls.
- Webhook payloads are untrusted until verified. Compute
HMAC-SHA256over the raw body with the shared secret and compare it toX-Hub-Signature-256before acting. - Write permissions are silently broader than you expect. An agent with
contents: writecan 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.
🔥 Ready to Build Your AI Agent?
SOUL.md Mega Pack Complete Bundle ($29) Get SOUL.md Mega Pack → Download 5 Free TemplatesBefore 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.