memorix GEMINI.md

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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/avids2/memorix/gemini-md
Clone the repo
git clone --depth 1 https://github.com/AVIDS2/memorix

Made for: Gemini CLI.

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. Scan, not verified.
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 $0.00846 $0.00846
Opus 5 $0.00423 $0.00423
Sonnet 5 $0.00169 $0.00169
Haiku 4.5 $0.00085 $0.00085

Measured 3d ago against content hash 6ba00c3f9cec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 (705 stars, last pushed 3d ago), licensed Apache-2.0. It adds 846 tokens to every session, about $0.0042 per session on Opus 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.

Related

Other instructions, from other repositories

mcp-server-azure-devops copilot-instructions.md

Instructions for Tiberriver256/mcp-server-azure-devops, covering azure devops mcp server - development instructions, prerequisites, building and running, 1. install dependencies and 2. build the server.

Tiberriver256/mcp-server-azure-devops · 2,384 tokens

mcp-server-azure-devops AGENTS.md

Instructions for Tiberriver256/mcp-server-azure-devops: /home/tiberriver256/repos/mcp-server-azure-devops/docs/important-knowledge/azure-devops-rest-api-research.md Researching Azure DevOps REST APIs, selecting api-version, or handling Azure DevOps Server (on-prem) endpoints.

Tiberriver256/mcp-server-azure-devops · 178 tokens

rosetta AGENTS.md

Instructions for griddynamics/rosetta: Main goal: cover E2E AI PDLC engineering workflows at foundation level for AI-First SDLC in enterprise. Top-level or orchestrator agents MUST READ docs/ARCHITECTURE.md contains technical details and guidance, and docs/CONTEXT.md - business context. Subagents - when needed.…

griddynamics/rosetta · 270 tokens

Ctxo CLAUDE.md

Instructions for alperhankendi/Ctxo, covering claude.md — ctxo, project overview, quick reference, dev (pnpm workspace) and usage (consumer).

alperhankendi/Ctxo · 5,885 tokens

draft CLAUDE.md

Instructions for drafthq/draft, covering claude.md, repository overview, build & test commands, run a single test and etc. — any test in tests/ is independently executable.

drafthq/draft · 3,260 tokens

specops CLAUDE.md

Instructions for sanmak/specops, covering claude.md, what is specops, build & validate commands, run all tests (single command) and generate for a single platform.

sanmak/specops · 1,576 tokens