brain-ingest-gate

brain-ingest-gate is a skill for Claude Code, Codex from garrytan/gbrain. It costs 106 tokens per session (3,601 once invoked), scanned A, original, MIT.

A quality checkpoint for adding content to GBrain, a searchable knowledge store. It checks whether named subjects are already known and whether the same insight already exists.

In plain words
What is it for?
Reviewing imported files, manual entries, and agent-generated content before deciding whether to write it, link to existing content, or skip it.
Why use it?
It prevents copied, misplaced, or duplicate information from filling the knowledge store and makes each insight easier to find.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for gbrain. Also seen: mentions subagents; built for gbrain.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Convention:** see [conventions/brain-first.md](../conventions/brain-first.md) —.

Part of the gbrain-coding plugin — 20 skills shipped together

Good fit Reviewing imported files, manual entries, and agent-generated content before deciding whether to write it, link to existing content, or skip it.

Compare 6 skills from other repositories ↓
About the project

GBrain is a memory and retrieval layer for AI agents that searches, connects, and synthesizes information from stored sources. It is used to give coding agents and autonomous agents access to knowledge beyond their current code, including shared company information with access controls. The catalogue add-ons help agents operate GBrain and connect it to agent workflows.

garrytan/gbrain · 29,702 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/garrytan/gbrain
agentmods
npx agentmods add skills/garrytan/gbrain/brain-ingest-gate

Made for: Claude Code, Codex.

Or install gbrain-coding, the plugin that ships this one along with the rest of its 20 skills.

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-ingest-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/garrytan/gbrain/brain-ingest-gate.svg)](https://agentmods.dev/skills/garrytan/gbrain/brain-ingest-gate)
Your own site
<a href="https://agentmods.dev/skills/garrytan/gbrain/brain-ingest-gate"><img src="https://agentmods.dev/badge/skills/garrytan/gbrain/brain-ingest-gate.svg" alt="Measured on agentmods" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,601 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 312
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • low Excessive Agency · line 293
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
How audits are shown
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.00106 $0.03601
Opus 5 $0.00053 $0.01801
Sonnet 5 $0.00021 $0.00720
Haiku 4.5 $0.00011 $0.00360

Measured 8d ago against content hash 61a47001723d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

brain-ingest-gate 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 8d 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.

plugin-variants/gbrain-coding/skills/brain-ingest-gate/SKILL.md · 314 lines

How it starts

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

Brain Ingest Gate — Resolve and Dedup Before Anything Enters the Brain

Convention: see conventions/brain-first.md — the lookup chain (gbrain entitysearchqueryget) is the same chain this gate runs before every write.

Convention: see _brain-filing-rules.md — when the gate's verdict is "write", the primary subject picks the directory.

Convention: skills/conventions/quality.md owns the cross-cutting page rules (citations, Iron Law back-linking, notability) — every page the gate lets through follows them. Gate-specific delta: the gate only decides write/link/skip; the admitting skill applies the quality rules on write.

The Rule

No content enters the brain without passing this gate. A raw cp or mv into the brain repo is a bug.

One insight, one place. If it already exists, link to it — don't clone it. Before any new page is written (file migration, bulk import, manual gbrain put, subagent output), two checks run in order:

  1. Named-Entity Resolution Gate — is this about a named thing that already has a page under its chosen name?
  2. Dedup Gate — does the brain already state this insight somewhere?

Scope honesty: this gate is a routing convention — the harness resolves it into context when an ingest-shaped intent matches, and a well-behaved agent follows it. Nothing in the gbrain runtime mechanically blocks an unenriched or duplicate write if the skill never loads.

Why gbrain needs this gate

The native pipeline does NOT do semantic dedup for you:

  • gbrain import / gbrain sync skip only matching frontmatter IDs. Identical content under a different slug or ID indexes twice — every duplicate becomes a second search hit competing with the canonical page.
  • gbrain capture's dedup is a 24-hour exact content-hash — it catches re-captures of identical bytes, not the same insight reworded.
  • The remember verb dedupes facts, not pages.

Read the full file on GitHub · 314 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 314 lines · 106 tokens per session scan A 61a47001723d

Subscribe to this mod's changes

brain-ingest-gate is a skill published in the GitHub repository garrytan/gbrain (29,702 stars, last pushed today), licensed MIT. It adds 106 tokens to every session and 3,601 once invoked, about $0.0005 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 skills, from other repositories

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens

embedding-strategies

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

foryourhealth111-pixel/Vibe-Skills · 37 tokens