brain: Instructions file for Gemini CLI

GEMINI.md

brain GEMINI.md is an instructions file for Gemini CLI from aliafshar/brain. It costs 1,188 tokens per session, scanned A, original, Apache-2.0.

A project instruction file for Brain, a framework that divides a goal into work items handled by multiple agents. It explains how runs store their progress, conversations, and output files.

In plain words
What is it for?
Use it when working on Brain goals, assigning or tracking work items, creating run directories, and understanding agent roles and generated files.
Why use it?
It gives agents a shared workflow and consistent places to record analysis, results, and other project artifacts.

Instructions file for Gemini CLI

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

This is aliafshar/brain's own configuration. It tells Gemini CLI how to work on brain 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 brain configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aliafshar/brain. 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/aliafshar/brain/main/GEMINI.md
Clone the repo
git clone --depth 1 https://github.com/aliafshar/brain

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 brain GEMINI.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/aliafshar/brain/gemini-md/github.svg)](https://agentmods.dev/instructions/aliafshar/brain/gemini-md)
Your own site
<a href="https://agentmods.dev/instructions/aliafshar/brain/gemini-md"><img src="https://agentmods.dev/badge/instructions/aliafshar/brain/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 brain GEMINI.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/aliafshar/brain/gemini-md"><img src="https://agentmods.dev/badge/instructions/aliafshar/brain/gemini-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,188 This file is loaded in full into every session.
When invoked 1,188 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.01188 $0.01188
Opus 5.5 $0.00475 $0.00475
Sonnet 5.5 $0.00238 $0.00238
Haiku 4.5 $0.00119 $0.00119

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

Security

Grade A, and why

brain 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 2mo 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 · 70 lines

How it starts

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

Multi-Agent Framework

The basic concept will be a "Goal" that will be analyzed and reported on in a "run". Each "run" will have its own working directory in runs subdirectory.

Core Concepts

  • Goal: A statement or question that will need to be analyzed and reported on.
  • WorkItem: A task to be completed by an agent. It has a description and a result.
  • Run: Manages the state for a given Goal. It tracks all WorkItems and other necessary state.
  • Agent Persona: A definition of an agent's capabilities, expertise, and personality, stored as a heading in the agents.md file.

Run Directory & Artifacts

Each run will have a unique directory inside the runs directory. The directory name will be prefixed with a timestamp in the format YYYYMMDD_hhmmss_<short_goal>, where <short_goal> is a brief, 10-20 character version of the goal that best describes it.

Within this directory, the following files will be generated:

  • transcript.md: A detailed log of all agent interactions. This includes not just the results of each WorkItem, but also the detailed internal monologue, discussions, and step-by-step reasoning of the agents as they perform their tasks.
  • report.md: The final, user-facing report. This is a comprehensive, boardroom-quality document that leads with a strong executive summary and includes detailed sections on methodology, macroeconomic analysis, sector deep dives, company profiles, risk analysis, and the final strategic recommendation.

Staged Workflow

  1. Initiation:

    • The user provides a GOAL: prompt.
    • All Agent Personas from agents.md are loaded.
    • A Run is initiated, and its unique directory is created.
  2. Pre-Read Materials (Optional):

    • Process: The framework checks for files in the top-level /info/ directory.
    • If files exist, the framework lists them and asks the user to select which ones the agents should review for the current run.
    • The content of the user-selected files is ingested and becomes the first entry in the transcript.md, providing a foundational context available to all agents throughout the run.
    • Output: A "Pre-Read Materials" section at the top of the transcript.md.

Read the full file on GitHub · 70 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. 2mo ago First seen · 70 lines · 1,188 tokens per session scan A 4a56714e74cc

Subscribe to this mod's changes

brain GEMINI.md is an instructions file published in the GitHub repository aliafshar/brain (44 stars, last pushed 1y ago), licensed Apache-2.0. It adds 1,188 tokens to every session, about $0.0048 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.

Related

brain GEMINI.md compared with instructions from other repositories

brain GEMINI.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
brain GEMINI.mdaliafshar/brainInstructions file441y agoApache-2.0A1,188Gemini CLI
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode