Agents
Keep an agent in GitHub
Making an agent from a GitHub repository, what is taken from it and what is left out, and updating the agent from the repository when you ask.
An agent can live in a GitHub repository. You name the repository and the app makes an agent from what it holds. Later, when the repository changes, you ask the agent to update from it. The repository is only read: nothing is ever written back to it, and nothing in it runs here.
Create the agent
Choose New agent, then Create from GitHub, under the examples. Write the repository as owner/repo or paste its
link from github.com. Add a branch if you want one other than the repository’s main one, then choose Create agent.
While it works the screen says “Reading the repository and creating the agent…”, and then Agent info opens for the new
agent.

You always get a new agent of your own. The iOS app has the same form.
If the repository cannot be used, a line under the form says why, in place, and the form keeps what you typed so you can correct it. Nothing is created. The reasons are the repository is not found or is private and out of reach, it is too large, it is not an agent, GitHub could not answer just now, or you already made an agent from it a moment ago.
What a repository can hold
Two layouts work.
- A Claude Code project. The repository has a
CLAUDE.md, a.claude/CLAUDE.mdor anAGENTS.mdfile, or a.claudefolder. The instructions file becomes the agent’s instructions, with the files it includes by name on a line of their own folded in, and so do the files in.claude/rules. Skills, commands and agents under.claudebecome the agent’s skills, as when an agent installs skills from GitHub. Every other file becomes a file in the agent’s workspace, at the same path. - An unpacked agent file. The repository holds what Export agent saves,
unzipped: an
agent.jsonand aworkspacefolder. The agent gets that name, purpose, look and files.
A repository that is neither is refused, and the line names what it does hold at the top level.
Public and private repositories
A public repository needs nothing from you. A private one is read through the GitHub account you connected, and only the private repositories where you installed the GitHub App. See Connecting GitHub. Only the repository you name is read with your account.
What is left out
Some parts of a repository do not come in, and the agent’s Agent info names each with its reason after an update:
- Secrets and saved sign-ins, such as
.envfiles, keys and certificates,.npmrcand similar files. No secret comes in from a repository. - Claude Code’s own settings, hooks and tool connections, which do not apply here.
- The repository’s own automation in
.github. - Dependencies, git’s own files, and links to files elsewhere.
- A few paths the agent’s workspace keeps for itself.
Source on Agent info
An agent made this way has a Source section on its Agent info. It reads “From owner/repo, at” and the first seven characters of the version it is at, with the branch in brackets when you asked for one. Choose it to open the repository at that version on GitHub, in a new tab. Under it is how many of the agent’s files came from the repository.
Update from GitHub
Update from GitHub reads the repository again and applies what changed. Nothing updates on its own, and the app never reads the repository unless you ask.
The result says what it did, such as “Added 1 file. Updated 2 files.” or “The agent is up to date with its repository.”
- Files the repository added are added, and files it changed are changed.
- Files the repository removed are removed.
- A file you or the agent changed since is kept, and named under Kept as they are with what the repository did to it. An update never loses what the agent learned.
- Files the agent wrote itself are never touched.
An update changes files only: the agent keeps its name and purpose.
To put back the repository’s version of the files that were kept, choose Replace the kept files. It asks first, because what was changed in them is lost. After you confirm, the app updates again and replaces them.
An update uses the GitHub account the agent acts through, which you choose on Agent info under GitHub account.