ClawAI GEMINI.md

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

Repository instructions for ClawAI's Gemini router, covering its architecture, rule priority, required first command, validation, and prohibited shortcuts.

In plain words
What is it for?
Use them before changing ClawAI code, especially when selecting context, checking affected folders, validating changes, or preparing releases.
Why use it?
They direct agents to the authoritative project context and required checks, reducing errors caused by outdated or incomplete instructions.

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/ihabkhaled/clawai/gemini-md
Clone the repo
git clone --depth 1 https://github.com/ihabkhaled/ClawAI

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ihabkhaled/clawai/gemini-md.svg)](https://agentmods.dev/instructions/ihabkhaled/clawai/gemini-md)
Your own site
<a href="https://agentmods.dev/instructions/ihabkhaled/clawai/gemini-md"><img src="https://agentmods.dev/badge/instructions/ihabkhaled/clawai/gemini-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,379 This file is loaded in full into every session.
When invoked 1,379 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.01379 $0.01379
Opus 5 $0.00690 $0.00690
Sonnet 5 $0.00276 $0.00276
Haiku 4.5 $0.00138 $0.00138

Measured 4d ago against content hash c42fa0de8e3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ClawAI 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 4d 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 · 112 lines

How it starts

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

ClawAI — Gemini router

Compact router for Gemini. This file does not duplicate policy — it routes you to canonical sources. Canonical wins on conflict (see below).

Identity

ClawAI: 18 NestJS services + Next.js 16 frontend + 6 shared packages (npm workspaces). RabbitMQ claw.events; nginx proxies /api/v1/*.

Canonical authority (higher wins)

  1. CLAUDE.md 2. rules/00-non-negotiable-rules.md 3. context/architecture-map.md
  2. context/stack-and-toolchain.md 5. numbered rules/*skills/*context/* + memory/*
  3. generated .ai/manifests/* 7. compact routers (this file)

First command (always)

npm run knowledge:context -- --task="<your task>"

Then read .ai/local/current-context.md. Compact bootstrap: .ai/BOOTSTRAP.md.

Validation (touched folders only)

npm run affected:list
cd <workspace> && npm run typecheck && npm run lint && npm test && npm run build

Release: npm run release:preflight.

Absolute prohibitions

  • NEVER bypass git hooks (--no-verify). NEVER suppress lint/types (eslint-disable, @ts-ignore, any, as unknown as).
  • NEVER cross a service DB boundary (use HTTP/RabbitMQ); no logic in controllers; no DB calls outside repositories; no process.env outside AppConfig; no console.log.
  • NEVER log/expose secrets. NEVER add text without i18n (13 locales). NEVER add code without a test.
  • Do NOT invent repository facts — derive them from .ai/manifests/ and real code.
  • NEVER ship a change with no knowledge delta — docs/skills/rules/context ship in the SAME commit (rules/33).
  • NEVER gate per-commit or all-workspace; gate once at the end, scoped. Never re-prove an unchanged tree (rules/34).

Gemini emphasis

  • Preserve canonical authority and repository-grounded facts. When you state a port/event/route, cite the manifest it came from (.ai/manifests/*). Do not paraphrase policy from memory — link the canonical rule.

See AGENTS.md for the full router. Detail lives in the canonical sources.

Read the full file on GitHub · 112 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. 4d ago First seen · 112 lines · 1,379 tokens per session scan A c42fa0de8e3e

Subscribe to this mod's changes

ClawAI GEMINI.md is an instructions file published in the GitHub repository ihabkhaled/ClawAI (22 stars, last pushed 2d ago), licensed Apache-2.0. It adds 1,379 tokens to every session, about $0.0069 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