Agent skill

Brain Ingest Gate

by garrytan in garrytan/gbrain

Pre-write quality gate for content entering the brain. An agent skill from garrytan/gbrain.

MITAuto-check passedTesting & QA

Install Brain Ingest Gate

skills CLI
$ npx skills add garrytan/gbrain --skill brain-ingest-gate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install garrytan/gbrain brain-ingest-gate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/garrytan/gbrain.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/brain-ingest-gate .claude/skills/brain-ingest-gate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
brain-ingest-gate
GitHub stars
31k
Token cost
~3.9k tokens
SKILL.md length
1,757 words
Files
2
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

Pre-write quality gate for content entering the brain. An agent skill from garrytan/gbrain.

  • Works in 2 steps: Named-Entity Resolution Gate — is this… → Dedup Gate — does the brain already…
  • Tasks that involve Quality gates
  • SKILL.md covers The Rule, Why gbrain needs this gate, When This Gate Fires and What This Gate Owns vs Delegates, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Brain Ingest Gate is an agent skill from garrytan/gbrain. Pre-write quality gate for content entering the brain. No raw copies: a bare cp/mv into the brain repo is a bug. Before any new page lands, resolve named entities registry-first (a vector score is a floor for prose, never a gate for named things), then run the read-the-top-hit dedup decision tree (clear-dup / plausible-dup / clear). Owns dedup; delegates enrichment to the shipped ingestion skills. Routing convention, not an operation-boundary enforcement.

Its SKILL.md is about 3.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It sits in Testing & QA, covering Quality gates. The repository describes itself as: Garry's Opinionated OpenClaw/Hermes Agent Brain. The licence is MIT.

When your agent uses it

  • Tasks that involve Quality gates

Example prompts

  • “/brain-ingest-gate”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

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

What it can do on your machine

Read from SKILL.md and the folder at commit f250a51. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Brain Ingest Gate loads about 3.9k tokens when it runs. Until then it costs about 119 tokens; SKILL.md has 1,757 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~119
When it runs · the whole SKILL.md, loaded when a task matches
~3.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from garrytan/gbrain at commit f250a51, republished under its MIT licence (© garrytan). 1,757 words, ~3,851 tokens.

Download SKILL.mdSave it as .claude/skills/brain-ingest-gate/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
brain-ingest-gate
description
Pre-write quality gate for content entering the brain. No raw copies: a bare cp/mv into the brain repo is a bug. Before any new page lands, resolve named entities registry-first (a vector score is a floor for prose, never a gate for named things), then run the read-the-top-hit dedup decision tree (clear-dup / plausible-dup / clear). Owns dedup; delegates enrichment to the shipped ingestion skills. Routing convention, not an operation-boundary enforcement.
version
1.0.0
triggers
move this to brain, migrate to brain, copy these files into the brain, is this already in the brain, check for duplicates before writing, dedup before saving…
mutating
true
writes_pages
true
writes_to
people/, companies/, concepts/, projects/
upstream
brain-ingest-gate@fc834ee
brain_first
true

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

Convention: see conventions/brain-first.md — the lookup chain (gbrain entity → search → query → get) 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.

Semantic dedup and named-entity resolution are this skill's job, in full.

When This Gate Fires

  1. File migration — moving files already in the workspace into the brain repo ("move this to brain").
  2. Bulk imports — batch moves of any kind into brain directories, BEFORE gbrain sync or gbrain import indexes them. For batches, also read conventions/test-before-bulk.md: gate 3-5 items and inspect the decisions before running the rest.
  3. Manual writes — gbrain put or gbrain capture of rich content, or direct file writes into the brain repo.
  4. Subagent output — background agents writing notes or pages into the brain.

What This Gate Owns vs Delegates

This skill is a gate, not a pipeline. It owns the pre-write checks below. Everything downstream of a "write" verdict is delegated to shipped skills — do not restate their steps here or inline:

ConcernDelegate to
Routing new external content (meetings, articles, media)ingest
Entity detection + notability on inbound contentsignal-detector
Creating/updating person + company pages, tiered effort, backlinksenrich
Concept pages, tiering, cluster synthesisconcept-synthesis
Back-link enforcement (Iron Law)conventions/quality.md
Which directory the page lands in_brain-filing-rules.md

Named-Entity Resolution Gate (runs FIRST)

Fires whenever the content is about a NAMED project, place, company, person, or anything someone "wants to build / found / make."

Vector similarity alone cannot be trusted to catch named-entity dupes: a page stored under its chosen NAME will not embed close to the generic English phrase someone happens to describe it with. The classic failure: a search for a descriptive phrase scores the canonical named page below the prose floor, so a duplicate stub gets written on top of a years-old page. Stored by named meaning; retrieval attempted by literal generic phrase.

The rules
  1. Resolve registry-first, not by the generic phrase. gbrain's native registry is the entity surface:

    bash
    gbrain entity "<name>"        # zero-LLM card: page, aka list, near-miss suggestions

    A card hit means the page exists — STOP, link, don't clone. On a miss (or for concept-shaped nouns), fall through to gbrain query "<name>" --limit 3. If the brain also keeps an explicit index of named initiatives (e.g. a page under concepts/), read it before concluding anything is new.

  2. Expand through aliases before searching. Named pages should carry an aliases: frontmatter list (generic label + chosen name + any nickname + signature phrase). Search EACH alias and the generic label, not just the phrase the user happened to say.

  3. A vector score is a floor for prose, NEVER a gate for named things. If there is ANY plausible named match, open and read the candidate page (gbrain get <slug>) before concluding it doesn't exist. A named page can be the right answer at a score that would be a clear miss for prose.

  4. When a NEW named thing appears, bake its aliases in the same write. Create the page with the full aliases: list so every future synonym resolves through gbrain entity. One frontmatter list covers all future phrasings — O(1), not a per-instance reminder.

Why a gate and not a memory note

A memory reminder ("query the real name, not the generic phrase") is a per-instance sticky note: it only works if it happens to be in hot context that turn, doesn't generalize to the next named entity, and rots. This skill loads when an ingest-shaped task routes here. Process rules belong in the triggered gate, not in hot memory.

Dedup Gate (runs SECOND)

Before writing ANY new page (for named things, the resolution gate above runs first and takes precedence):

  1. Extract the core claim — 1-2 sentences capturing what's novel about the new content.

  2. Search for it:

    bash
    gbrain search "<core claim>" --limit 5
  3. OPEN AND READ the top hit (gbrain get <slug>). Never band on the score alone. Donor systems publish cosine cutoffs for this step — do NOT port them: gbrain search returns fused hybrid rank scores, not cosine similarity, and no numeric threshold maps across. The band comes from reading, not from the number.

  4. Assign a band:

    BandMeaningAction
    clear-dupThe top hit already states the same insight about the same subjectSTOP. Link to the existing page (gbrain link / gbrain timeline-add) instead of writing.
    plausible-dupSame territory; possibly a new angleRead both fully. Same insight → link, don't write. Genuinely new angle → write WITH a cross-link to the existing page.
    clearNothing in the top results covers the claimWrite normally through the delegated enrichment skills.
Decision tree
New content to write
  ├─ Named thing? → Named-Entity Resolution Gate first
  │    (entity card → alias-expanded search → READ the candidate)
  ├─ Extract core claim (1-2 sentences)
  ├─ gbrain search "<core claim>" --limit 5
  └─ OPEN AND READ the top hit (gbrain get <slug>)
      ├─ clear-dup     → STOP. Link to existing. Report "duplicate".
      ├─ plausible-dup → Read both. Same insight?
      │    ├─ yes → STOP. Link to existing. Report "duplicate".
      │    └─ no  → Write with cross-link. Report "new angle".
      └─ clear         → Write via enrichment skills. Report "unique".
When to skip dedup
  • Operational/state files — time-series records, not knowledge.
  • Meeting transcripts — each meeting is unique by definition (entities INSIDE it still go through the named-entity gate via the delegated skills).
  • Timeline entries on existing pages — back-links are additive, not duplicative.
  • Media files — dedup by filename/hash, not semantic similarity.
Show full SKILL.md (710 more words)Show less

Verification

After the batch, verify the gate's output holds:

bash
gbrain check-backlinks check            # mentioned entities link back (fix with: check-backlinks fix)
gbrain backlinks <new-slug>             # each new page has inbound links
gbrain search "<core claim>" --limit 3  # the insight has exactly ONE home

If check-backlinks check reports gaps on pages the gate just admitted, the enrichment delegation was skipped — route back through enrich before declaring the ingest done.

Contract

This skill guarantees:

  • No new page enters the brain through this skill's flows without the named-entity resolution check and the dedup check running first.
  • Every "duplicate" verdict names the matched slug and produces a link or timeline entry instead of a clone.
  • New named-entity pages carry an aliases: frontmatter list in the same write that creates them.
  • Dedup bands are assigned by READING the top hit, never by score alone; no numeric similarity thresholds are used against gbrain's fused scores.
  • Enrichment is delegated to shipped skills (ingest, enrich, signal-detector, concept-synthesis) — never restated or reimplemented inline.
  • Batches end with a gbrain check-backlinks check verification pass.
  • Routing matches the canonical triggers in the frontmatter.
  • Output written under the directories listed in writes_to:.
  • Privacy contract preserved: no real names, no fork-specific filesystem path literals, no upstream-fork references.

The full behavior contract is documented in the body sections above; this section exists for the conformance test.

Output Format

One decision line per item checked, then the verification result:

Ingest gate — 3 item(s) checked

| item | entity resolution | band | action |
|---|---|---|---|
| notes-on-widget-co.md | resolved: companies/widget-co | clear-dup | linked (timeline entry on companies/widget-co) |
| pricing-thesis.md | n/a (prose) | plausible-dup | new angle — written to concepts/ with cross-link to concepts/pricing-power |
| charlie-example-intro.md | miss (near-miss: people/charlie-example) | — | read near-miss; same person → linked, no new page |

Verification: check-backlinks check → 0 gaps on admitted pages

Every "linked" or "duplicate" row MUST name the matched slug. If any row says "written", the enrichment delegation (which skill handled it) should be recoverable from the conversation.

When it fails

Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:

  • The "is this already in the brain?" search is empty with a degraded notice: an empty keyword-only result is not proof the content is missing. Check by slug, URL or exact title before importing.
  • gbrain capture / put returns write_pending (exit 10): the content is accepted. Poll gbrain write-request <request_id>; do not capture it again.
  • source_binding_required or insufficient_scope on an MCP write: this connection cannot write that source. Tell the user which source and scope are missing; the brain host's operator grants them.

Anti-Patterns

  • ❌ cp file.md <brain-repo>/concepts/ — raw copy, no gate, no enrichment.
  • ❌ Bulk mv of a folder into the brain repo, then gbrain sync — sync happily indexes every duplicate; matching-ID skip will not save you.
  • ❌ Trusting a low vector score as proof a named thing has no page — named pages don't embed near generic descriptions of them.
  • ❌ Banding on the search score without opening the top hit.
  • ❌ Porting numeric dedup thresholds from other systems onto gbrain's fused scores.
  • ❌ Writing a new named page without its aliases: list — the next synonym creates the next duplicate.
  • ❌ Reimplementing entity detection, backlinking, or concept linking inline instead of delegating to the shipped skills.
  • ❌ Skipping the gate because the write is "just one page" via gbrain put — single manual writes are where duplicate stubs come from.

Dedup (sharp boundaries)

  • capture — the quick-save front door; its dedup is a 24h exact content-hash on identical bytes. This gate is the SEMANTIC + named-entity layer for content entering the brain as real pages (migrations, bulk imports, inbox graduation). "capture this thought" → capture; "migrate these files into the brain" → this gate.
  • ingest — the router for NEW external content (meetings, articles, media) and its enrichment pipeline. ingest decides what to DO with content; this gate decides whether a page should EXIST at all. The gate fires before the write; ingest and its specialized skills handle everything after a "write" verdict.
  • enrich — page creation/update mechanics (tiers, citations, timelines, backlinks) AFTER this gate says "write" or "link".
  • concept-synthesis — retroactive, at-scale dedup of concept stubs that already slipped in. This gate is prevention at write time; concept-synthesis is the cleanup pass. "dedupe my existing concepts" → concept-synthesis.
  • frontmatter-guard (host-side) — the same standalone-gate pattern on an orthogonal axis: structural validity of what's written vs (here) semantic novelty of whether to write.
  • bulk-ingestion — the bulk sibling. Its pipeline dedup key (source + source_id) only makes RE-RUNS idempotent; it does not catch cross-source duplicates or resolve named entities. This gate is the semantic + named-entity layer bulk-ingestion runs on its Phase 3 trial items and bakes into the codified pipeline (its Phase 1d/6). "Build a large-corpus pipeline" → bulk-ingestion; "does this page already exist before I write it" → this gate.
  • data-loss-gate — the inverse gate: it stops data LEAVING the brain without confirmation; this gate stops data ENTERING without resolution + dedup.

© garrytan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/brain-ingest-gate of garrytan/gbrain.

  • SKILL.md
  • routing-eval.jsonl

Open the folder on GitHubat commit f250a51

Compare with similar skills

Brain Ingest Gate next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Brain Ingest Gate compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Brain Ingest Gate this skillgarrytan/gbrain31k—~3.9kAutomated safety check: PassMIT
Feature Plannerserendipity1004/cc-feature-implementer176—~2.4kAutomated safety check: PassNone
Ccg Workflowfengshao1227/ccg-workflow5.9k—~2.3kAutomated safety check: PassMIT
Conducty Checkpointrobertbarclayy/conducty176—~1.5kAutomated safety check: PassMIT
Mission Plannerjdforsythe/forge151—~3.5kAutomated safety check: PassMIT
Quality Gate0xNyk/lacp305—~382Automated safety check: PassMIT

Similar skills

  • Feature Planner

    serendipity1004/cc-feature-implementer

    Creates phase-based feature plans with quality gates and incremental delivery structure.

    176 GitHub stars~2.4k tokensUpdated 9 mo ago
    Testing & QAAuto-check passed
  • Ccg Workflow

    fengshao1227/ccg-workflow

    How to run a non-trivial change end to end with the CCG role tools (ccganalyze / ccgdesign / ccgbuild / ccgdebug / ccgoptimize / ccgreview / ccgtest) and the verify- quality gates.

    5.9k GitHub stars~2.3k tokensUpdated 24 days ago
    Testing & QAAuto-check passed
  • Conducty Checkpoint

    robertbarclayy/conducty

    Quality gate between parallelization groups. An agent skill from robertbarclayy/conducty.

    176 GitHub stars~1.5k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Mission Planner

    jdforsythe/forge

    Decomposes goals into team blueprints using evidence-based scaling laws, topology selection, and role design.

    151 GitHub stars~3.5k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Quality Gate

    0xNyk/lacp

    Production quality gate for agent sessions. An agent skill from 0xNyk/lacp.

    305 GitHub stars~382 tokensUpdated 18 days ago
    Testing & QAAuto-check passed
  • Deploy Workflow

    nwiizo/ccswarm

    Release deployment process for ccswarm. An agent skill from nwiizo/ccswarm.

    153 GitHub stars~582 tokensUpdated today
    Testing & QAAuto-check passed

More from garrytan/gbrain

All 47 skills in this repo
  • Traces a factual error the user points out back to its source (a brain page, a memory file, SOUL.md or USER.md, or a hallucination) and fixes that source instead of just noting the correction.

    31k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Searches and writes a company-wide knowledge brain through the gbrain CLI, so durable decisions and facts about people, projects and history stay findable beyond one session.

    31k GitHub stars~875 tokensUpdated today
    Auto-check passed
  • Idea Ingest

    garrytan/gbrain

    Ingest links, articles, tweets, and ideas into the brain. An agent skill from garrytan/gbrain.

    31k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Sends what your notes already know about a topic to Perplexity, so the cited web search reports only what is new, such as entity updates or deal changes.

    31k GitHub stars~2k tokensUpdated today
    Auto-check: notes
  • Schema Unify

    garrytan/gbrain

    Migrate a brain from gbrain-base (or any pack) to gbrain-base-v2's 14-canonical-type taxonomy via gbrain onboard --check + the unify-types Minion handler.

    31k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Skillpack Check

    garrytan/gbrain

    Run gbrain skillpack-check to produce an agent-readable JSON health report for the gbrain install.

    31k GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Categories

Questions about Brain Ingest Gate

What does Brain Ingest Gate do?

Pre-write quality gate for content entering the brain. An agent skill from garrytan/gbrain. Brain Ingest Gate is an agent skill from garrytan/gbrain. Pre-write quality gate for content entering the brain.

When should I use Brain Ingest Gate?

Brain Ingest Gate fits situations like: tasks that involve Quality gates.

How do I install Brain Ingest Gate in Claude Code?

Run `npx skills add garrytan/gbrain --skill brain-ingest-gate -a claude-code`. Or copy the skill folder (skills/brain-ingest-gate in garrytan/gbrain) into .claude/skills/brain-ingest-gate in your project. Claude Code loads it when a task matches its description.

How do I install Brain Ingest Gate in Codex?

Run `npx skills add garrytan/gbrain --skill brain-ingest-gate -a codex`. Or copy the skill folder (skills/brain-ingest-gate in garrytan/gbrain) into .agents/skills/brain-ingest-gate in your project. Codex loads it when a task matches its description.

Can I use Brain Ingest Gate in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add garrytan/gbrain --skill brain-ingest-gate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/brain-ingest-gate, .gemini/skills/brain-ingest-gate, .github/skills/brain-ingest-gate and .opencode/skills/brain-ingest-gate in your project.

What does Brain Ingest Gate need to run?

SKILL.md names no scripts, command-line tools or credentials: Brain Ingest Gate is instructions for the agent only.

Does Brain Ingest Gate access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Brain Ingest Gate safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Brain Ingest Gate use?

Brain Ingest Gate is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Brain Ingest Gate use?

About 3.9k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Brain Ingest Gate?

Skills that share tags, products or a category with Brain Ingest Gate: Feature Planner (serendipity1004/cc-feature-implementer, 176 stars), Ccg Workflow (fengshao1227/ccg-workflow, 5.9k stars), Conducty Checkpoint (robertbarclayy/conducty, 176 stars) and Mission Planner (jdforsythe/forge, 151 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Brain Ingest Gate?

garrytan (a GitHub user) maintains it in garrytan/gbrain, which has 30,736 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on October 10, 2026.

Source: garrytan/gbrain on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.