Your first GEMINI.md
Read the field note below to see how we apply this pattern in real Gemini CLI projects.
Your first GEMINI.md
Every session without a GEMINI.md starts from zero. You re-explain your stack. You re-explain your conventions. You catch mistakes that your context would have prevented. A well-written GEMINI.md makes those problems disappear.
What we tried
We started with a long, detailed GEMINI.md that tried to document everything about the project. It was four hundred words. Gemini CLI read it, but the early parts of each session felt sluggish. As if it was spending tokens reconciling too much context before it could move.
We cut it to the essentials. Session quality improved.
What happened
The right length for a project GEMINI.md is the minimum that prevents the most common mistakes and re-explanations. For most projects, that's under 150 words. If you're writing more than that, ask whether it belongs in a comment in the code instead.
What we learned
Where it lives:
your-project/
└── GEMINI.md ← project-level, checked into git
~/.gemini/GEMINI.md ← user-level, applies to all projects
Gemini CLI loads both. The project-level file takes precedence on conflicts. Put project conventions in the project file; put personal preferences (response style, verbosity) in the user-level file.
What to put in it:
# Project context
Next.js 15 App Router + TypeScript (strict). Path alias: @/* → src/*.
Tailwind CSS v4. No test framework configured.
# Conventions
- Use `cn()` from src/lib/utils.ts for conditional class names
- Components go in src/components/, never in src/app/
- No comments unless the WHY is non-obvious
- Commit messages: imperative, under 72 chars, no bullet lists
# Do not
- Suggest class components (we use hooks only)
- Add `console.log` debug statements without removing them
- Create new files when editing an existing one solves the problem
Key sections that pay off:
- Stack summary. One line: language, framework, major libraries. Prevents wrong API suggestions.
- Conventions. The three to five rules that, if violated, create rework. Not everything; just the expensive ones.
- Do not. Explicit prohibitions work better than implicit conventions for common AI anti-patterns.
What to leave out:
- Architecture overview (Gemini CLI reads the files; it will figure it out)
- Complete dependency list (it reads
package.json) - Instructions it would follow anyway (e.g., "use TypeScript" in a
.tsproject)
Tool permissions:
Gemini CLI asks permission before running shell commands by default. If you trust your project environment and want faster sessions, add to ~/.gemini/settings.json:
{
"coreTools": {
"shell": { "autoApprove": true }
}
}
Do this per-project, not globally, until you understand what commands it tends to run.
Next
- Next cable. Team GEMINI.md: shared conventions for multi-developer projects.
Quick answers
What do I get from this cable?
You get a dated field note that explains how we handle this configuration workflow in real Gemini CLI projects.
How much time should I budget?
Typical effort is 15 min. The cable is marked beginner.
How do I install the artifact?
This cable is guidance-only and does not ship an installable artifact.
How fresh is the guidance?
The cable is explicitly last verified on 2026-04-17, and includes source links for traceability.
Work with FRE|Nxt
We build the production AI systems we write about.
Cables are the field notes. The playbooks come from client engagements — multi-agent systems, RAG pipelines, and LLM cost cuts that ship and hold up in production. If something here maps to a problem on your roadmap, two ways in:
Audit capacity: 5 slots/month · No pitch deck · NDA on request
Set up Cursor Rules for your project
Cursor without rules is a capable assistant that doesn't know your project. Cursor with well-written rules is an assistant that already knows your stack, con…
Team Cursor Rules: shared conventions for multi-developer projects
The problem with AI-assisted teams is not that the tools are inconsistent. It's that each developer's tool has a different idea of what "correct" looks like.…
Install Gemini CLI and run your first prompt
The first time we ran Gemini CLI we expected it to behave like a browser-based chat. It doesn't. It's a terminal agent that reads your project, runs commands…