41 public Gemini rules in the HyperPrompt directory
Gemini CLI loads instructional context from GEMINI.md files: a global ~/.gemini/GEMINI.md, files in your workspace directories and their parents, and files discovered in subfolders as the agent works. The file name is configurable, so a project can tell Gemini CLI to read AGENTS.md instead of, or alongside, GEMINI.md. The rules in this directory are written as plain system instructions, so the same text can also be used as a system instruction in Gemini API or Google AI Studio requests.
Setup details below were checked against the official Gemini CLI documentation on 2026-11-05. Vendor tools change often; confirm with the linked sources if something behaves differently in your version.
| File or location | Scope | Status |
|---|---|---|
GEMINI.md (project root and subdirectories) | Project and folder-level context loaded by Gemini CLI. | current |
~/.gemini/GEMINI.md | Global instructions for every project. | optional |
settings.json → context.fileName | Changes which file names are loaded, e.g. ["AGENTS.md", "GEMINI.md"]. | optional |
.gemini/system.md (GEMINI_SYSTEM_MD) | Advanced: replaces the built-in system prompt entirely instead of adding context.A full replacement, not a merge. Most projects should use GEMINI.md. | optional |
GEMINI.mdIllustrative example. GEMINI.md is plain Markdown; there is no required frontmatter.
# Project context - Python 3.12 service using FastAPI and SQLAlchemy 2. - Run "pytest -q" before proposing a change and show the result. - Prefer small, reviewable diffs; never edit files under migrations/ by hand. @./docs/agent/api-conventions.md
Gemini CLI does not need a separate AGENTS.md mechanism: its context file name is configurable through context.fileName in settings.json (the docs show ["AGENTS.md", "CONTEXT.md", "GEMINI.md"]). Without that setting it looks for GEMINI.md.
Earlier versions of this page referred to a system-instruction.md file. Gemini CLI does not document that name. Use GEMINI.md for context, or GEMINI_SYSTEM_MD only if you intend to replace the whole system prompt.
Collections with at least one matching public rule.
Project context for Gemini Code Assist agent mode and Gemini CLI: how to respond, what finished code includes, and how to verify changes before proposing them.
System instructions for Gemini on React 19 + TypeScript: typed function components, accessible markup with useId, error boundaries, measured performance and review checklists.
Generate configuration handling code
System instructions for Gemini on Next.js 16 App Router: Server Components by default, async params, secure Server Functions, Cache Components caching and metadata.
Generate secure Python code
Generate web scraping code safely
Configure Gemini as a Python expert for data and backend work: supported Python versions, modern typing, SQLAlchemy 2 async patterns, FastAPI/Django conventions and vectorized pandas.
Instructions for generating scikit-learn pipelines without data leakage: Pipeline and ColumnTransformer, split-before-fit, cross-validation, task-appropriate metrics, safe persistence and documentation.
Generate Streamlit data apps
Generate NLP code with transformers
Configure Gemini as a TypeScript type-safety expert: strict configuration, discriminated unions, sound type guards, branded types, utility types and review priorities.
Generate type-safe API clients
Configure Gemini for Tailwind CSS v4 styling: automatic class sorting, mobile-first responsive classes, class-based dark mode, CSS-first theme tokens and cva variants.
Generate robust FastAPI applications
Generate PyTorch model and training code
Generate dbt transformation models
System instructions for Gemini on Node.js + Express 5 + TypeScript backends: layered structure, async error handling, Zod 4 validation and safe error responses.
Generate LangChain agent code
Generate well-structured notebooks
System instructions for Gemini on idiomatic Go backends: wrapped errors, Go 1.22+ ServeMux routing, context propagation, consumer-side interfaces and safe concurrency.
GEMINI.md, loaded globally from ~/.gemini/GEMINI.md and from your workspace directories, their parents and subfolders. The name can be changed with context.fileName in settings.json.
Yes, by adding AGENTS.md to context.fileName in settings.json. By default it looks for GEMINI.md.
Run /memory show inside Gemini CLI. Use /memory reload after editing a context file.
Generate a Cursor project rule or a cross-tool AGENTS.md from your stack, then adapt it with the file locations above.