Git, GitHub and a hub, with the plugin
This page is for someone who uses the Claude plugin in a Git repository and wants to know what it does with Git and GitHub, whether they need the local hub, and how to add a hub later.
The walkthrough the Claude plugin ends with /confighub:to-hub, copying the record into a hub.
What goes wrong without it. Git keeps the latest value of each setting and the commit message, not why an agent set it. A teammate's agent, or a CI job's, starts from the files and undoes a change it was never told about. A pull request shows changed lines, not which values change and why.
What you get. The record of what agents changed, and why, kept with your commits. A comment on each pull request that lists every changed value. And a hub when you want approvals, whether it is your organization's shared hub or a hub of your own.
Git: there is nothing to connect
The Claude plugin works in any folder and any repository. It keeps its record on your machine, in ~/.confighub/agent-changes. Nothing leaves your machine unless you turn on a setting that sends it somewhere.
To keep the record with your commits, set CUB_MINI_RECORD_IN_REPO=1. Each commit an agent makes then carries .cub-mini/changes/SESSION.record, with its signature beside it. Anyone who checks the repository out gets it: a teammate, a CI job, or a sandbox with an empty home folder. Their agent is told what earlier agents changed in a file, and why, before it changes the file (in CI or a sandbox).
Where the app started
Before the first recorded request in a project, the Claude plugin keeps the repository and full Git revision present then, and whether uncommitted files existed. If Git or its history is unavailable, it records that no revision was available. bin/confighub mini changes shows Starting point, marked first observed. It is not proof of the app's creation date or the commit it was originally forked from.
The metadata is signed separately and checked by bin/confighub mini changes --verify. Repository URLs lose passwords, query strings and fragments. No private request or file contents go into it. It stays when old sessions expire; bin/confighub mini changes --forget removes it. With CUB_MINI_RECORD_IN_REPO=1, the signed record in Git carries it to a colleague's checkout. From plugin 0.79.8, after a successful standalone git clone or gh repo create --template … --clone, supported shell hooks also record the inspected checkout's remote and HEAD as a separate Selected source. A nested checkout keeps this observation when opened directly. A requested template name is recorded without guessing its revision. Compound shell commands, expressions, failed commands and checkouts outside the project are not inferred.
GitHub, with no hub
- A comment on each pull request. The review is one step in a workflow file. It lists every configuration value the pull request changes, what each becomes on each cluster, and the reason from the record. Nobody installs anything, and no account is needed.
- Any Git host, with no CI job.
cub mini review --commit-summaryprints a short 3–6 line plain-text summary (credentials redacted) for any commit message or PR/MR description on GitHub, GitLab, Gitea, or Bitbucket. - Bring the next teammate and agent on board.
cub mini to-hub --share-setup --yesadds the plugin offer to.claude/settings.jsonand an idempotent ConfigHub section toAGENTS.md(preserving existing rules) so the next person or agent who clones the repository starts with the same workflow. - An agent in a GitHub Actions job. agent-plugin-only.yml runs Claude Code with the Claude plugin on a task and hands the result back as a pull request, with the record in it (agents in CI).
A hub, with no confighub mini
You need a hub for approvals: agents that propose, and a person who approves. If your organization has a ConfigHub, use it. You do not need the local hub.
- Install
cub, ConfigHub's command-line tool, and sign in:cub auth login. - In Claude Code, in the repository, type
/confighub:to-hub. It names the hub yourcubis signed in to, and lists what it would write: each file the record covers, and each change with its reason. - Type
/confighub:to-hub --yesto write it. Each file becomes a Component, and each recorded change a revision with its reason. Running it again writes only what was recorded since.
Then require approval for production, and give each agent a key of its own (approvals).
For a hub of your own, on your machine, type /confighub:to-hub --yes with no hub signed in: it starts one on this machine, downloading the local hub first if it is not here, and writes the record into it (install the local hub). To give an app a staging and a production copy of its settings too, type /confighub:staging in the app's folder instead. The other cub mini commands that move work between hubs, copy, connect and offer, come with the local hub (how the commands map).
A hub beside Git, with Git still delivering
If Argo CD or Flux deploys from Git, the hub can hold the approved copy while Git keeps delivering it:
- Take the repository in.
cub mini copy --from-gittakes a commit's values into the hub, each with the commit's message as its reason. - Change it in the hub. Agents propose, and the person you name approves.
- Write the approved copy out for Git.
cub mini copy COMPONENT --variant live --to-dir deploy/apiwrites a folder for each copy and aCHANGES.mdthat says why each value is set. Commit it on a branch, as a pull request. - Check each pull request against the hub. The check compares the pull request's files with the hub's approved copy, value by value, and sets the status "ConfigHub: api-live" on the commit, named after the copy. A value nobody approved fails, and is named. Branch protection that requires the status lets only the approved copy merge (the check).
GitHub's runners must reach the hub to run the check in the pull request's own job, so that needs your organization's shared hub or a server of your own. With the local hub on a laptop, run the same check from the laptop, and it sets the same status: cub mini copy COMPONENT --variant live --check-git deploy/api --github-status.
Or let the clusters deploy from the hub itself, over OCI, and keep Git for people to read (GitOps over OCI).
What branch protection then lets through
When main requires "ConfigHub: api-live", for administrators too, and the check runs from the approver's laptop:
| Pull request | Its status | The merge |
|---|---|---|
| The approved copy, written out from the hub | success | merged |
| The same, with 6 replicas typed in by hand | failure: Deployment/api/spec.replicas is 6 here, 4 in the hub | refused |
| A change the check never ran on | none | refused |
| The 6 replicas again, merged by the repository's owner with administrator rights | failure | refused: Required status check "ConfigHub: api-live" is failing. |