memorix: Instructions file for Gemini CLI

GEMINI.md

memorix GEMINI.md is an instructions file for Gemini CLI from AVIDS2/memorix. It costs 846 tokens per session, scanned A, original, Apache-2.0.

Instructions for Gemini CLI agents to use Memorix, a shared memory system for coding agents. They cover starting a project session, loading relevant context, and saving important knowledge.

In plain words
What is it for?
Use it to bind an agent to a project, search prior context, record decisions and bug fixes, and share engineering knowledge across agent sessions.
Why use it?
It helps agents recover project decisions, architecture details, and previous fixes instead of starting each session without that context.

Instructions file for Gemini CLI

Written for Gemini CLI: the file is GEMINI.md.

This is AVIDS2/memorix's own configuration. It tells Gemini CLI how to work on memorix itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything memorix configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AVIDS2/memorix. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AVIDS2/memorix/main/GEMINI.md
Clone the repo
git clone --depth 1 https://github.com/AVIDS2/memorix

Made for: Gemini CLI.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memorix GEMINI.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/avids2/memorix/gemini-md/github.svg)](https://agentmods.dev/instructions/avids2/memorix/gemini-md)
Your own site
<a href="https://agentmods.dev/instructions/avids2/memorix/gemini-md"><img src="https://agentmods.dev/badge/instructions/avids2/memorix/gemini-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memorix GEMINI.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/avids2/memorix/gemini-md"><img src="https://agentmods.dev/badge/instructions/avids2/memorix/gemini-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 846 This file is loaded in full into every session.
When invoked 846 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00846 $0.00846
Opus 5.5 $0.00338 $0.00338
Sonnet 5.5 $0.00169 $0.00169
Haiku 4.5 $0.00085 $0.00085

Measured 1mo ago against content hash 6ba00c3f9cec, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memorix GEMINI.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

GEMINI.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memorix - Cross-Agent Memory Rules

Memorix is an open-source cross-agent memory layer for coding agents via MCP. These rules help Gemini-family agents share project-aware memory with the rest of the Memorix ecosystem.

You have access to Memorix memory tools. Follow these rules to maintain persistent, project-aware context across sessions.

Session Start - Bind Project, Then Load Context

At the beginning of every conversation, before responding to the user:

  1. Call memorix_session_start.
  2. If you are connected to the HTTP control-plane mode (normally started with memorix background start; memorix serve-http is the foreground variant) and you know the current workspace path, pass:
    • agent
    • projectRoot = the absolute path of the current workspace or repo root
  3. If you are using stdio / Quick Mode and Memorix is already project-bound, calling memorix_session_start without projectRoot is acceptable.
  4. If session start reports that the project could not be resolved, retry with the correct absolute workspace path before using project-scoped memory tools.
  5. Then call memorix_search with a query related to the user's first message or the current project.
  6. If results matter, use memorix_detail to fetch the most relevant memories.
  7. Reference relevant memories naturally so the user feels continuity.

Important:

  • projectRoot is a detection anchor only; Git remains the source of truth for project identity.
  • In HTTP control-plane mode, explicit projectRoot binding is the safest way to avoid cross-project drift.

During Session - Capture Important Context

Proactively call memorix_store whenever any of the following happen:

Architecture & Decisions

  • Technology choice, framework selection, or design pattern adopted
  • Trade-off discussion with a clear conclusion
  • API design, database schema, or project structure decisions

Bug Fixes & Problem Solving

  • A bug is identified and resolved - store root cause + fix
  • Workaround applied for a known issue
  • Performance issue diagnosed and optimized

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 86 lines · 846 tokens per session scan A 6ba00c3f9cec

Subscribe to this mod's changes

memorix GEMINI.md is an instructions file published in the GitHub repository AVIDS2/memorix (873 stars, last pushed 2d ago), licensed Apache-2.0. It adds 846 tokens to every session, about $0.0034 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.