guardian-agent GEMINI.md

guardian-agent GEMINI.md is an instructions file for Gemini CLI from Threat-Vector-Security/guardian-agent. It costs 2,549 tokens per session, scanned A, a copy of guardian-agent AGENTS.md, Apache-2.0.

A repository guide for guardian-agent, an agent project focused on threat and security checks. It records rules for branching, project layout, building, type checking, and tests.

In plain words
What is it for?
Use it when developing guardian-agent, including editing its TypeScript code, web interface, policies, skills, or native helper.
Why use it?
It gives an agent the project-specific constraints and commands needed to make changes safely and verify them.

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/threat-vector-security/guardian-agent/gemini-md
Clone the repo
git clone --depth 1 https://github.com/Threat-Vector-Security/guardian-agent

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 guardian-agent GEMINI.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/threat-vector-security/guardian-agent/gemini-md.svg)](https://agentmods.dev/instructions/threat-vector-security/guardian-agent/gemini-md)
Your own site
<a href="https://agentmods.dev/instructions/threat-vector-security/guardian-agent/gemini-md"><img src="https://agentmods.dev/badge/instructions/threat-vector-security/guardian-agent/gemini-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,549 This file is loaded in full into every session.
When invoked 2,549 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 86% copy Near-identical to another mod 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.02549 $0.02549
Opus 5 $0.01274 $0.01274
Sonnet 5 $0.00510 $0.00510
Haiku 4.5 $0.00255 $0.00255

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

Security

Grade A, and why

guardian-agent 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 5d 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.

Origin

This is a copy

86% identical to guardian-agent AGENTS.md — 9 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

GEMINI.md · 68 lines

How it starts

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

Repository Guidelines

Branching (CRITICAL)

Do not create or switch to a new branch unless the user explicitly asks for it. Default to staying on the current branch, including main, unless the user directs otherwise.

Project Structure & Module Organization

src/ holds the TypeScript app; src/index.ts bootstraps the runtime. Subsystems live in src/runtime/, src/guardian/, src/tools/, src/channels/, src/llm/, and src/search/. Keep tests beside the code they cover as *.test.ts. The web UI is in web/public/. Use scripts/ for verification harnesses, docs/ for architecture and specs, policies/ for rule files, skills/ for bundled skills, and native/windows-helper/ for the Rust helper.

Build, Test, and Development Commands

  • npm run dev: start the app with tsx src/index.ts.
  • .\scripts\start-dev-windows.ps1 -StartOnly: start the Windows dev server without rebuilding for browser/API regression loops.
  • bash scripts/start-dev-unix.sh --start-only: start the Unix/WSL dev server without rebuilding.
  • npm run build: compile TypeScript to dist/.
  • npm run check: type check with tsc --noEmit.
  • npm test: run the Vitest suite.
  • npm run test:coverage: run Vitest with coverage thresholds.
  • npx vitest run src/path/file.test.ts: run one test file.
  • npm run validate:dependency-contract: validate pinned dependency and lockfile contract after dependency or override changes.
  • npm run validate:windows-package: validate staged Windows package manifests after Windows packaging work.
  • npm run helper:windows: rebuild the Windows native helper when touching native/windows-helper/.
  • Integration Testing (CRITICAL): Review docs/guides/INTEGRATION-TEST-HARNESS.md for full-stack API regression testing, including guidance for cross-platform (Windows/WSL) and Ollama configurations.

Intent Gateway (CRITICAL)

All user intent classification must go through the Intent Gateway (src/runtime/intent-gateway.ts). Never use regex, keyword matching, string includes, or any ad-hoc pattern matching to determine what the user is asking for. The Intent Gateway is an LLM classifier that routes requests via structured tool calls. New routes must be added to IntentGatewayRoute, the tool schema, the system prompt, normalizeRoute, preferredCandidatesForDecision in direct-intent-routing.ts, and the candidate dispatch loop in src/index.ts. Pre-gateway interception is only permitted for slash-command parsing in channel adapters and continuation/approval flow detection.

Read the full file on GitHub · 68 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. 5d ago First seen · 68 lines · 2,549 tokens per session scan A c2f37bb92d5b

Subscribe to this mod's changes

guardian-agent GEMINI.md is an instructions file published in the GitHub repository Threat-Vector-Security/guardian-agent (11 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 2,549 tokens to every session, about $0.0127 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to guardian-agent AGENTS.md, differing in 9 lines, and is treated as a copy.