Journal ·

How I made Claude Code and Antigravity share one set of instructions

Flat diagram where one document with a yellow marker connects by right-angled lines to two identical nodes holding the Claude and Antigravity logos and to a row of folders marked with the Obsidian logo

I keep my study notes, a small knowledge base and my portfolio work in one Obsidian vault. It started as a Claude Code setup: one CLAUDE.md file with my rules and a handful of custom commands. Later I added Google Antigravity, Google's agent-based development environment that runs on Gemini models, so I could work on the same folder from both sides. Both agents now read the same folder. Until this week, though, they weren't really reading the same instructions, and I only noticed once the copies had already started to differ.

The problem: the same rules in two places

The vault had grown the way most setups do, one useful addition at a time:

None of this was broken. But every improvement meant remembering to edit two files, and every new session started with an agent guessing where things lived.

The change: one source, pointers everywhere else

I had just read Interpretable Context Methodology: Folder Structure as Agent Architecture (Van Clief & McDermott, 2026). Its core idea is that for sequential, human-reviewed AI work, folder structure can do the job an orchestration framework would: numbered folders give order, small Markdown files tell the agent what each folder is for, and the agent loads only what the current task needs. The authors also publish a skill, icm-architect, that applies these rules to an existing folder.

I applied the parts that fit a personal vault and skipped the rest:

Before

CLAUDE.md                 ← all rules
AGENTS.md                 ← "read CLAUDE.md"
.claude/commands/*.md     ← 7 skills
.agent/skills/*/SKILL.md  ← the same 7 skills, copied

After

AGENTS.md                 ← the only source of rules (57 lines, mostly routing)
CLAUDE.md                 ← @AGENTS.md
GEMINI.md                 ← @./AGENTS.md (for the Gemini CLI)
.agent/skills/*/SKILL.md  ← the only source of each skill
.claude/commands/*.md     ← one-line pointers to the skills
02-Osaaminen/CONTEXT.md   ← what this folder is for, what not to load
03-Portfolio/CONTEXT.md
…

Each CONTEXT.md is about 15 lines. It states the folder's one job, what's in it and how files are named, which skill writes there, and what an agent should not load. I also added two rules to AGENTS.md: load only what the target folder's CONTEXT.md names, and put new content into a numbered folder, never the root.

What it changes in practice

Daily use stayed the same: same commands, same folders, and the same "show me before saving" step.

Try this

  1. Pick one entry file. Use AGENTS.md and make every tool-specific file (CLAUDE.md, GEMINI.md) a one-line pointer to it.
  2. Find your duplicates. Any instruction that exists twice gets one home, and the other copy becomes a link.
  3. Give each working folder a 10–15 line CONTEXT.md: its job, its contents, who writes there, and what not to load.

Copy the prompt

Paste this into your own agent. It maps your setup first and changes nothing until you approve the plan.

I use more than one AI agent on the same folder (for example Claude Code and Antigravity, Gemini CLI, Codex or Cursor). Restructure the folder so every agent reads the same instructions from one place.

1. Inventory first and change nothing yet. List every instruction file (CLAUDE.md, AGENTS.md, GEMINI.md, Cursor rules and so on), every custom command or skill, and every instruction that exists in more than one place. Point out where copies already differ.
2. Propose a plan and wait for my approval:
   - AGENTS.md becomes the only source of rules. Keep it under about 60 lines: who I am, how to work, and a table of where things live. It routes; it does not hold content.
   - Tool-specific files become one-line pointers: CLAUDE.md contains `@AGENTS.md`, GEMINI.md contains `@./AGENTS.md`.
   - Each duplicated skill or command keeps one source file, and every other copy becomes a short pointer to it.
   - Each working folder gets a CONTEXT.md of 10–15 lines: its one job, what is in it and how files are named, what writes there, and what an agent should not load.
3. After I approve, apply the plan. Back up every file you change, delete nothing, and keep my existing commands working.
4. Finish with a short report: files changed, duplicates removed, and anything you could not verify.

Sources