# GEMINI.md

> Canonical: https://skillalmanac.com/glossary/gemini-md | Last verified: 2026-11-24 | Index status: not offered to search engines

GEMINI.md is the default name of the context file that Google's open-source Gemini CLI reads to get persistent instructions and background for a project. It is plain Markdown, loaded from several places and sent to the model with prompts.

Also called: gemini md, GEMINI.md file, gemini cli context file, Gemini CLI GEMINI.md, gemini.md context.

## In plain language

GEMINI.md is a note you leave for Gemini CLI, Google's terminal AI agent. You write down things it should know every time, such as how your project is organised, how to run the tests, or how you like code written. Gemini CLI reads these notes and passes them to the model, so you do not have to repeat yourself in each conversation. You can keep a personal file for all projects and separate files inside particular projects. The limits: the model can still ignore or misread the notes, and long files use up space in each conversation, so keep it short and specific. Do not put passwords in it, since it is a plain text file in your folder.

## Technical definition

Per the Gemini CLI docs, the CLI uses a hierarchical system to source context. A global file at ~/.gemini/GEMINI.md supplies defaults; files in workspace directories and their parents are added; and files near anything a tool accesses are discovered just in time, up to a trusted root. Content is combined and sent with prompts. A file can import others with @file.md syntax, using relative or absolute paths. The /memory show command displays the combined context the model receives, and /memory reload rescans the files. The default filename can be changed with the context.fileName setting in settings.json, which accepts one name or a list such as AGENTS.md, CONTEXT.md and GEMINI.md.

## How it shows up when you use agents

GEMINI.md is the Gemini CLI form of an [agent instruction file](/glossary/agent-instruction-file). Put a short one in your repository root and Gemini CLI will find it when you work there. A personal file in `~/.gemini/` applies across projects. When the model seems to ignore your rules, run `/memory show` to see what was loaded, and `/memory reload` after editing.

What breaks when it is misunderstood: people write long files full of generic advice, which takes space in every conversation, or they edit a file the CLI is not reading because it sits outside the workspace. A file that exists is not a file that was loaded. Check with `/memory show`.

If you also use other agents, you do not have to duplicate content. The docs show that the filename setting accepts a list including AGENTS.md. Compare with [AGENTS.md](/glossary/agents-md) and [CLAUDE.md](/glossary/claude-md), and see the [guide](/learn/agents-md-vs-claude-md). Next step: keep each line specific to your project, as the [agent-instruction-files skill](/skills/skill-almanac/agent-instruction-files) describes.

## Common confusions

- **GEMINI.md versus AGENTS.md.** GEMINI.md is Gemini CLI's default context filename. AGENTS.md is a shared convention that Gemini CLI can read if you add the name in its settings.
- **GEMINI.md versus a system prompt.** A context file adds project background that the CLI sends along with prompts. It does not replace the tool's built-in behaviour.
- **Myth: one file only.** The docs describe a hierarchy of global, workspace and just-in-time files that are combined.

## Worked examples in this catalogue

### [Gemini CLI](https://skillalmanac.com/tools/gemini-cli)

```
/memory show
```

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Gemini CLI displays the combined context the model receives, including the contents of the GEMINI.md files it found.

Why it exercises the concept: It is the direct way to check which instructions the model is actually getting. The command is documented on the Gemini CLI GEMINI.md page.

### [agent-instruction-files](https://skillalmanac.com/skills/skill-almanac/agent-instruction-files)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Instruction files where every line is project-specific, verified against the repo, and worth loading on every session.

Why it exercises the concept: Quality rules for a context file apply to GEMINI.md just as they do to other agents' instruction files.

### [CLAUDE.md vs AGENTS.md: Which Agents Read Which File](https://skillalmanac.com/learn/agents-md-vs-claude-md)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A guide to which coding agents read which instruction file, and how to keep one source of truth.

Why it exercises the concept: GEMINI.md is one more filename in the same landscape. The guide shows how files like it relate to AGENTS.md and CLAUDE.md.

### [Codex AGENTS.md setup: file locations and layering](https://skillalmanac.com/learn/codex-agents-md-setup)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A guide to setting up AGENTS.md for Codex.

Why it exercises the concept: Gemini CLI can be set to read AGENTS.md through its context filename setting, so a shared file is one way to serve several tools.

## Related terms

- [Agent instruction file](https://skillalmanac.com/glossary/agent-instruction-file.md)
- [AGENTS.md](https://skillalmanac.com/glossary/agents-md.md)
- [CLAUDE.md](https://skillalmanac.com/glossary/claude-md.md)
- [System prompt](https://skillalmanac.com/glossary/system-prompt.md)
- [Context engineering](https://skillalmanac.com/glossary/context-engineering.md)
- [Agent memory](https://skillalmanac.com/glossary/agent-memory.md)

## Sources

- [Provide context with GEMINI.md files](https://geminicli.com/docs/cli/gemini-md/), Gemini CLI documentation (accessed 2026-11-24)
- [google-gemini/gemini-cli](https://github.com/google-gemini/gemini-cli), Google (GitHub) (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
