GEMINI.md Template

A context file for Gemini CLI and Gemini Code Assist: project facts, commands, conventions, and explicit limits on what the agent may do.

# [PROJECT NAME]

[One sentence: what this is, who uses it, and what it must never get wrong.]

## Stack and versions
- [LANGUAGE + VERSION]
- [FRAMEWORK + VERSION]
- [DATABASE, QUEUE, KEY SERVICES]

Check the manifest ([package.json / pyproject.toml / go.mod]) before assuming a library is available. Your memory of a library's API is a hypothesis; the version pinned here is the fact.

## Commands
```
[INSTALL COMMAND]
[DEV COMMAND]
[TYPECHECK COMMAND]
[TEST COMMAND]
[LINT COMMAND]
```
Run the typecheck and the relevant tests before reporting a change as complete. Report the actual result, including failures.

## Project structure
- `[DIR]/`: [what lives here]
- `[DIR]/`: [what lives here]
- Generated, never edit by hand: [PATTERNS]

## Conventions
- [ARCHITECTURE RULE, e.g. "All external calls go through clients/; no fetch in feature code."]
- [ERROR HANDLING RULE]
- [TESTING RULE, e.g. "Every bug fix starts with a failing test that reproduces it."]
- [STYLE RULE THE LINTER DOES NOT COVER]
- Domain terms: [TERM] means [DEFINITION].

## Working agreement
- Read before writing. Explore the relevant files and say what you found before proposing a change.
- For anything beyond a small edit, propose a short plan and wait for approval.
- Change only what the task requires. List anything else you noticed instead of fixing it.
- If a task is ambiguous in a way that changes the approach, ask one specific question.

## Boundaries
- Do not add or upgrade dependencies without asking.
- Do not run destructive commands (deletes, resets, force pushes, migrations against a real database).
- Do not modify CI config, secrets, or infrastructure files.
- Do not commit or push unless I ask.

## Context
- [NON-OBVIOUS FACTS: deploy quirks, flaky tests, auth setup, why an odd thing is the way it is.]

How to use

Save as GEMINI.md in your repo root; Gemini CLI loads it as hierarchical context, so a nested GEMINI.md in a subdirectory can add package-specific rules without repeating this one. The line telling the agent to check the manifest rather than trust its memory of an API prevents the single most common failure in agentic coding: confidently calling a method from a different major version. Keep the file short and delete sections that do not apply.

Originated fromStan SedberryUpdated
Configbeginner

More agent prompts

You are a software engineering agent working in the [PRODUCT/TEAM] codebase ([LANGUAGE/STACK]). Your objective is to take an assigned task from description to verified, working code. You may read and modify anything in the repository; you do not push, merge, deploy, or alter CI configuration unless the task explicitly says to.

# Operatin

Coding Agent System Prompt

Autonomous coding agent that matches repo conventions, proves work with passing tests before claiming done, and reports failures truthfully.

Agentintermediate
You are a debugging agent for the [PRODUCT] codebase. Your objective is to find the root cause of a reported bug, fix it with the smallest possible change, and prove the fix. You are not here to refactor, harden, or improve unrelated code: a debugging session that ends in a 40-file diff has failed even if the bug is gone.

# Reproduce Bef

Debugging Agent System Prompt

Root-cause-first debugging agent: no fix until the bug is reproduced, minimal diffs only, and done means the repro dies while the test suite stays green.

Agentintermediate
You are a code migration agent. Your objective is to move the [PRODUCT] codebase from [SOURCE VERSION/FRAMEWORK] to [TARGET VERSION/FRAMEWORK] while preserving behavior exactly. You are a mechanical translator with judgment, not a redesigner: the product must work the same after every step you take.

# The Prime Rule: Migration Changes On

Code Migration Agent System Prompt

Framework-upgrade agent that migrates in build-green slices, verifies every codemod, follows official guides over memory, and never mixes in behavior changes.

Agentadvanced

Search prompts

Find a prompt by title, description, tag, or category.