Sub topic 15
Sharing and versioning with your team
This chapter assumes you can write a prompt file, a custom agent, and a skill, and that you know basic Git. It covers how to keep these files in a repository so a team can share, review, and update them. Paths and file names differ between tools, so check your tool's documentation for the exact locations.
Treat instructions as code
Prompt files, agent definitions, and skills are plain text. That makes them easy to store in the same repository as the code they describe. Once they are in version control, you get what you get for any other file:
- A history of who changed what and why.
- Pull request review before a change reaches everyone.
- The ability to revert a change that made the agent worse.
- A version of the instructions that matches the version of the code.
The last point matters most. If the build system changed in a release, the instructions that describe it should change in the same commit.
Project scope and personal scope
Most tools read these files from two places: a folder inside the repository, and a folder in your home directory. Use them for different purposes.
| Scope | Where it lives | Use it for |
|---|---|---|
| Project | Inside the repository | Workflows the whole team shares |
| Personal | Your home directory | Your own habits and experiments |
Commit project files. Keep personal files out of the repository. A useful path is to experiment in personal scope, then move a file into the repository once it works and others want it.
your-repo/
├── AGENTS.md
├── tool-config/
│ ├── prompts/
│ │ └── review-staged.md
│ ├── agents/
│ │ └── code-reviewer.md
│ └── skills/
│ └── changelog-entry/
│ ├── SKILL.md
│ └── reference/
│ └── format.md
└── src/The tool-config folder name is a placeholder. Use the folder your tool actually reads.
Reviewing changes to instructions
A change to an instruction file changes how the agent behaves for everyone. Review it like code, and ask different questions than you would for a function:
- Does the description still say when to use it? A vague edit can make a skill trigger at the wrong times.
- Did the tool list grow? Added tools mean added power, so the reviewer should ask why.
- Does the file still do one job? Instruction files tend to grow until they conflict with each other.
- Was it tested on a realistic task? Attach the before and after output to the pull request.
Versioning and compatibility
Teammates receive changes when they pull, so a bad merge affects everyone at once. Some habits reduce the damage:
- Keep changes small, so a revert is clean.
- Add a short note in the file or in the pull request description when behavior changes on purpose.
- Use tags or releases if you share a skill collection across several repositories. Consumers can then pin a known version.
- Avoid renaming a prompt file or skill without telling the team. People type those names, and other files may refer to them.
Not every tool supports the same files. If your team uses more than one tool, put shared guidance in a common file such as AGENTS.md, and keep tool-specific files thin.
Exercise
Your teammate edits a skill's description and the skill starts triggering on unrelated requests. Name two ways that keeping the skill in the repository helps you deal with this.
Show answer
Version history shows exactly which commit changed the description, and you can revert that commit to restore the previous behavior. The pull request for the change would also have been a chance for review to catch the vague wording before it merged.