Gives Agent Zero reliable, skill-guided GitHub abilities through the gh CLI. The plugin installs gh for you, authenticates it from a token you keep in Agent Zero's Secrets, and bundles a small pack of process skills with tested command templates — so the agent knows the workflow, not just the tool, and even smaller local models run GitHub tasks correctly.
If this plugin is useful to you, you can support the developer.
Once installed and given a token, the agent can:
- Open pull requests (
github-open-pr) — create a branch, commit, push, and open a PR with a real title and body. - Triage issues (
github-triage-issue) — list, read, label, assign, comment on, create, and close issues. - Review pull requests (
github-review-pr) — read a PR, inspect its diff, check CI status, and approve / comment / request changes. - Search GitHub (
github-search) — find code, issues, PRs, or repositories, and call the GitHub REST/GraphQL API directly. - Create releases (
github-create-release) — tag a version and publish a GitHub release with real, user-facing notes (matched to the project version); refuses to overwrite an existing release.
Each ability ships as a focused skill containing the exact gh commands for that workflow, so the agent doesn't have to guess.
Use any of Agent Zero's install methods: the Plugin Hub (Browse), install from a GitHub repo URL, or upload the plugin ZIP. After it lands, enable it in the Plugins list. On first run it downloads gh into its own folder — this needs outbound internet once.
Either token type works. A classic PAT is the quickest to set up; a fine-grained token is more secure (per-repository, least-privilege) and is the better choice if the agent only needs a few repos.
-
Go to https://github.com/settings/tokens/new (or: your avatar → Settings → Developer settings → Personal access tokens → Tokens (classic) → Generate new token (classic)).
-
Note: name it something like
agent-zero-github. -
Expiration: pick a sensible window (e.g. 90 days). Shorter is safer — when it lapses you just regenerate and update the Secret.
-
Select scopes — tick the boxes for what you need:
Scope What it enables Needed for repoFull read/write on repositories you can access (code, pull requests, issues, commit statuses) Required — open/review PRs, triage issues, push branches, search private repos workflowPush changes to .github/workflows/filesOpening PRs that add or edit GitHub Actions workflows (the push is rejected without it) read:orgRead org and team membership and org projects Triaging org issues/projects and searching within an organization read:userRead your own profile Optional — helps ghresolve@mefilters (e.g. "issues assigned to me")The minimum is
repo. For most usersrepo+workflow+read:orgis the comfortable set. -
Click Generate token and copy it immediately — GitHub shows it only once. Classic tokens start with
ghp_. -
Org SSO: if any of your repos belong to a SAML/SSO-protected organization, click Configure SSO next to the new token and Authorize it for that org, or org calls will return
403.
-
Go to https://github.com/settings/personal-access-tokens/new (Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token).
-
Set a token name and expiration.
-
Resource owner: your own account, or the organization that owns the repos. (Org-owned tokens may need the org to allow fine-grained tokens and may require admin approval.)
-
Repository access: choose Only select repositories and pick the ones the agent will work on (or All repositories).
-
Repository permissions — set these to Read and write; leave everything else at No access:
Permission Level Needed for Contents Read and write push/pull, branches (open PR), tags + releases (create release) Pull requests Read and write create and review PRs Issues Read and write triage issues Workflows Read and write PRs that touch .github/workflows/Commit statuses Read-only gh pr checks(CI status)Metadata Read-only mandatory (auto-selected) — repo lookup and search -
Click Generate token and copy it. Fine-grained tokens start with
github_pat_.
Tip: grant the least you need — you can always regenerate with more later. Because auth is read fresh on every operation, widening a token just means updating the
GITHUB_TOKENSecret (step 3) and restarting; nothing else changes.
This is the only configuration step. In Agent Zero:
- Open Settings (gear icon).
- Go to External Services → Secrets.
- In the Secrets box (the masked one — not Variables), add a line:
GITHUB_TOKEN=ghp_your_token_here - Save.
The key name
GITHUB_TOKENis the default. If you prefer a different key, changesecret_keyin the plugin's config and use that name here instead.
Restart Agent Zero (or toggle the plugin off and on). That's it — try a prompt like "open a PR for my changes" or "list the open issues on this repo" and the agent will discover the matching skill and run gh.
Authentication is stateless — your token is never copied into a gh login file or a git credential store. It lives only in Agent Zero's Secrets, and is read fresh for each operation:
- The plugin installs a thin
ghwrapper on yourPATH. Each timeghruns, the wrapper readsGITHUB_TOKENfrom your Secrets and hands it to that singleghprocess (viaGH_TOKEN, whichghreads natively) — then it's gone. git push/git pullforgithub.comare routed through the same wrapper using a scoped git credential helper, so git transport uses the same token without storing it either.
Because the token is read at call time, rotating it just means updating the Secret — no re-login. And because Agent Zero masks Secrets from prompts, chat history, and logs, the token never appears in the conversation.
default_config.yaml (override per scope in the plugin config UI):
| Key | Default | Meaning |
|---|---|---|
transport |
gh |
How the agent talks to GitHub. mcp is planned. |
secret_key |
GITHUB_TOKEN |
Which A0 Secret holds the token. |
gh_version |
latest |
gh release to install, or a pinned tag like v2.63.2. |
Uninstall through the Plugins UI for a clean removal: the gh binary and the plugin's files are deleted with the plugin folder, and the uninstall hook removes the gh wrapper and the git credential helper it added. (A manual rm -rf of the folder skips that hook, leaving a dangling /usr/local/bin/gh wrapper to remove by hand.)
- The downloaded
ghbinary lives entirely inside the plugin directory, and is verified against GitHub's published SHA-256 checksum before it is installed — a tampered or corrupted download is refused. - The only changes outside the plugin folder are the
ghwrapper onPATHand onegithub.comgit credential-helper line — both removed on uninstall. - The token is read from your A0 Secret at call time and passed only to the
gh/gitprocess that needs it; it is never written to aghlogin file or git credential store, and never printed. - Requires outbound network access on first run to download
gh.
If you use this in your work, please cite it (use the "Cite this repository" button on GitHub, or):
@misc{a0githubplugin2026,
title = {a0-github-plugin: skill-guided GitHub operations for Agent Zero},
author = {King0James0},
year = {2026},
howpublished = {\url{https://github.com/King0James0/a0-github-plugin}},
note = {GitHub repository}
}MIT — see LICENSE.