Wiki · Integrations

GitHub

An agent with repository access has the same rights you do. How to grant them sensibly and what to give it to do.

✅ Verified 17. 10. 2026Source: official documentation →📋 Copy for your AI
🐙
An agent with repository access is not “just a reader” — it has the same rights you do. Give it a write token and it can push, delete branches and close pull requests. Start read-only, in one repository, and add rights only as you actually need them.

What it takes

ItemPurpose
GitHub CLI ghThe agent does everything through it — PRs, issues, reviews, repos
gh auth loginInteractively, or with a token (GH_TOKEN in the environment)
A running gatewayWithout it neither scheduled jobs nor webhooks work
The bundled github skillA ready-made guide to working with gh

Verify it works

gh auth status # who am I and what may I do gh pr list --repo owner/repo --state open --limit 3 gh pr diff 42 --repo owner/repo # what the PR changes

If this passes, the agent has access and you can hand it work. If not, the error usually names the missing scope.

Reviewing a pull request

Review this pull request: read the diff and look for bugs, security problems and poor code. Be specific — line numbers and quotes of the problematic code.

The agent fetches the diff, reads it and writes a structured review. If you want it done the same way every time, turn that into a skill (your own review rules) — then it does not have to guess what you care about.

Two ways to automate reviews

Scheduled job (cron)Webhook
How it worksEvery 2 hours the agent asks what is newGitHub calls in as soon as a PR appears
Needs a public addressNo — works behind a firewallYes (through a reverse proxy)
DelayUp to the intervalSeconds
Best forSmall teams, personal reposA company where speed matters

Cron is the safer start: nothing is exposed to the internet and every PR still gets reviewed. Add a webhook when the delay starts to hurt (see the webhooks page).

What the agent can do in a repository

TaskExample
Review and comment on PRsA review with concrete findings, posted as a PR comment
Create a branch and commitA fix that then goes through CI
IssuesOpen, comment on, label, close
CI and checksRead run results and find what failed
Releases and tagsPrepare a release (with a write token)

Things to watch

SituationWhat to do
The agent pushes straight to mainEnable branch protection and make it work through PRs only
A token in git or chatTokens belong in .env (or a password manager); revoke if leaked
The review is generic (“looks good”)Write a skill with your rules and examples; without them the agent guesses what matters
It comments on every PR, even where it should notLimit the job to specific repositories and labels
Missing permissionsgh auth status names the scope; fine-grained tokens need it added

How we do it

HabitWhy
Read-only token until writing is actually neededMost work is reading and commenting
Always a branch and a PR, never straight to mainEven when the agent can push, a human has the last word
A dedicated skill with review rulesThe review is consistent day to day and does not miss what we care about
Results to Telegram, not e-mailWe see them immediately and they do not get buried

Where next

← Back to the wiki