Getting useful results from your AI assistant often comes down to the instructions you give it. Most developers treat that step casually, then wonder why the output is mediocre.
One of the simplest ways1 to improve this is to keep one set of
master instructions in an AGENTS.md file. In it, you define persistent rules
that shape every interaction with the agent.
Writing those instructions once is easy enough. Keeping them in sync is the annoying part.
If you use more than one tool, things drift fast. So I keep one repo as the source of truth for my AI setup, then wire my tools and projects back to it.
This post is the simple version of that setup.
Most coding tools have since
consolidated around AGENTS.md as the standard. That
makes this much simpler than it used to be.
I talked about this topic in detail on my AI development podcast:
How I organize my AI instructions #
I keep my setup at two levels:
- User-level instructions: my personal defaults that I want available everywhere
- Project-level instructions: the rules and context that only apply to one repo
User level: one source of truth #
I keep my shared AI setup in a single repo. That repo holds the things I want to maintain in one place:
AGENTS.md- reusable
skills/ - reusable
commands/ - compatibility shims like
CLAUDE.md
Then I wire my local tools back to that repo with one command from the
repo’s Makefile:
make setup
That command creates the symlinks for me. I am not updating the same instructions by hand for Claude, Codex, and OpenCode. I edit the shared files once in my repo, and the tools point back to them.
At the user level, I keep it direct. The repo is the source of truth, so the tool-specific paths symlink straight to it. For example:
~/.claude/agents -> ~/my-local-directory/aikado/agents
~/.config/opencode/agents -> ~/my-local-directory/aikado/agents
So the maintenance story is simple:
- keep shared defaults in one repo
- symlink tools back to that repo
- edit once
Project level: thin local scaffolding #
For each codebase, I still want a project-local AGENTS.md and a place
for project-specific assets.
So when I start a new repo, I run the project setup target from that same
Makefile:
make setup-project dir=~/dev/oss/some-repo
That command creates the local directories and symlinks, and the result looks like this:
AGENTS.md
CLAUDE.md
.agents/
agents/
skills/
commands/
plans/
tmp/
.claude/
agents -> ../.agents/agents
commands -> ../.agents/commands
skills -> ../.agents/skills
.opencode/
agents -> ../.agents/agents
.codex/
prompts -> ../.agents/commands
The role of each piece is straightforward:
AGENTS.md: the main instructions for this projectCLAUDE.md: just points Claude back atAGENTS.md.agents/agents/: project-specific agents shared by Claude and OpenCode.agents/skills/: project-specific skills.agents/commands/: project-specific reusable commands.agents/plans/: execution plans for larger work.agents/tmp/: scratch output for the current session
That gives me a clean split:
- shared behavior lives in my AI repo.
- project-specific behavior lives in the project’s
AGENTS.mdand.agents/
I do not force the exact same structure at both levels.
- at the user level, direct symlinks are simpler
- at the project level,
.agents/gives me one obvious place for agents, skills, commands, plans, and temp files
AGENTS.mdIf you do not already have a good project AGENTS.md, start with an init
command that analyzes the repo and writes a first draft. I use a custom
/initialize command for this.
AGENTS.mdMost AI tools support nested AGENTS.md files. If one subdirectory needs
extra instructions, add another one there and keep the root file lean.
Most tools now read AGENTS.md directly. Claude still wants CLAUDE.md, so I
keep a tiny compatibility file that just says See @AGENTS.md.
Fine-Tuning Your Rules #
To see what context your AI is actually using, ask it: “What custom instructions or context files are you currently using for this project?” Use that feedback to prune redundancy and clarify ambiguous rules.
Revisions #
- 2026-03-08:
- clarify that user-level setup keeps direct symlinks to the
aikadorepo - document the shared project-local
.agents/agentsdirectory
- clarify that user-level setup keeps direct symlinks to the
- 2026-03-07:
- simplify the post around the current
aikadoworkflow - clarify that shared instructions, skills, and commands live in one source of truth repo
- focus the setup story on
make setupandmake setup-project
- simplify the post around the current
- 2026-02-17: add OpenCode instructions (natively reads
AGENTS.mdand.agents/skills/) - 2026-02-09: migrate
.ai→.agents(and update symlink examples) - 2026-01-02:
- skills is now an open standard
- cleaned up old instructions for clarity
- 2025-10-12: removing artifacts (then
.ai/): rules, checkpoints, docs- the notion of ExecPlans makes more sense than checkpoints
- AGENTS.md should have instructions, README.md should have docs
- rules should be incorporated into the AGENTS.md file
- 2025-09-18: switch to AGENTS.md as more tools consolidate around it
I wrote a later post distilling the three things that matter most for getting good AI coding results. ↩︎
Comments via 🦋