TalentDelta

Our site is fully accessible by humans and agents (via WebMCP).

Learn

Keep your agent in Git

Instructions and skills are files, so they take a commit like any other file. Git gives an agent three things it needs: a second copy, a diff of what you told it, and a way back to last month.

Guide · 4 min read · Updated 5 October 2026

What goes in, and what never does

WhatIn the repository?Why
Instructions and skillsYesThe diff becomes the record of what you asked for.
The READMEYesIt is the pack's front page, and it changes with the pack.
Keys and .env filesNoA committed key is a published key, and it stays in the history.
Memory and logsNoThey belong to one machine, and often hold private detail.
Examples and fixturesYes, if no real data is in themThey are what makes a change checkable.

The ignore file is the first thing you write, not the thing you remember later. Once a key is committed, removing the line does not remove the key.

Three things it gives you

  • A second copy: the repository is the version you did not lose with the laptop.
  • A diff: what you told the agent, changed line by line, in a form a person can read.
  • A way back: a version you can name, return to, and compare against.

The diff is the part people undervalue. It is the only honest record of the instructions you gave, and it is what you read the day an agent starts behaving differently.

The first commit

in the folder holding your agent
git init
printf '.env\nmemory/\nlogs/\n' >> .gitignore
git add -A
git commit -m "First working version"

Then commit the state that works, before you change anything else. A working version you can name is worth more than a tidy history you cannot.

The habit worth more than the tooling

Commit first, let the agent change one thing, then read the diff. It takes thirty seconds and it is how you notice a prompt edit that quietly broke three weeks of work.

Branches, tags and the version people run

A branch keeps an experiment away from the version that works. A tag names the version worth returning to, so you can get back to it by name rather than by date.

A published pack is a tag other people download. Its history is what Run your first agent template tells a reader to check before pulling a newer one.

GitHub's own flow is ordinary and worth following: branch, commit, open a pull request, have it reviewed, then merge (GitHub flow). The same shape works when the second reader is you, six weeks from now.

A change to a prompt needs a test

Code review catches what a person can see. A prompt change is invisible in a diff's effect: the words look fine and the behaviour moved. So pair the diff with a small set of checks that must pass.

Anthropic's engineering guidance calls automated evaluations useful before launch and in continuous integration, run on every agent change and model upgrade, as a first line of defence (demystifying evals). Five good examples beat fifty vague ones.

Secrets in a build follow the same rule as everywhere else: they live in the settings, not in the file. GitHub's documented habit is to store them as encrypted repository secrets and refer to them by name (using secrets).

Why this is a copy problem

A written note about why the agent is shaped this way belongs beside the code. Architecture decision records are the convention for that, and a folder of short dated notes is enough (adr.github.io).

Somewhere else, or it is not a backup

A repository on one disk is a copy, not a backup. Push it to a remote you control, and check once that the push arrived.

Two cautions before a client's work goes in. A public repository publishes your instructions and skills to anyone who looks. And a remote holds a copy on somebody else's service, so read their terms before the client's material goes up.

Open private, publish deliberately

Start every agent's repository private. Making it public later is a setting; unpublishing something that has already been read is not.

Where to go next