thiagowfx's avatar

¬ just serendipity 🍀 (not just serendipity)

Google Gemini: read CLAUDE.md or AGENTS.md

• 255 words • 2 min • updated

Problem statement: Make Google’s Gemini read CLAUDE.md and/or AGENTS.md. By default, it reads only GEMINI.md.

Update ~/.gemini/settings.json to either:

json
{
  "contextFileName": "AGENTS.md"
}

or

json
{
  "contextFileName": "CLAUDE.md"
}

My config:

json
{
  "contextFileName": "CLAUDE.md",
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  },
  "ui": {
    "theme": "Default"
  }
}

Why not use GEMINI.md? Claude Code provides, by far, a superior experience1. Either way, AGENTS.md is the closest to becoming a standard.

It is unfortunate2 that Claude Code does not yet support AGENTS.md. One file to rule them all would have been the best.

Alternatively, we could symlink GEMINI.md to one of the aforementioned files:

shell
ln -s AGENTS.md GEMINI.md

or

shell
ln -s CLAUDE.md GEMINI.md

…but that needs to be repeated in each repository, whereas the settings.json change is global.

Update(2025-11-17): Even better, as per docs:

json
{
  "contextFileName": [
      "AGENTS.md",
      "CLAUDE.md",
      "GEMINI.md"
  ]
}

contextFileName (string or array of strings):

Corollary: It still pays to RTFM directly, even in the LLM era.

Once you launch gemini with this config, it gets automatically updated to:

json
{
  "context": {
    "fileName": [
      "AGENTS.md",
      "CLAUDE.md",
      "GEMINI.md"
    ]
  },
}

…which suggests it to be the canonical form3.

We know it works because, upon launching gemini within a repository that contains CLAUDE.md, it displays Using: 1 context file.


  1. Citation needed? This statement comes from experience. Or personal vibes, if you will. ↩︎

  2. And likely intentional, as it would be trivial to support it. ↩︎

  3. They aren’t great at updating their own docs, eh? This is not yet documented there. ↩︎