Agent skill

Company Knowledge Brain

by garrytan in garrytan/gbrain

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.

MITAuto-check passedKnowledge Management

Install Company Knowledge Brain

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

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

GitHub CLI
$ gh skill install garrytan/gbrain gbrain --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/docs/integrations/qm-harness-snippets .claude/skills/gbrain && 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
gbrain
GitHub stars
31k
Token cost
~875 tokens
SKILL.md length
362 words
Files
4
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Looking up why a past decision was made or who made it
  • SKILL.md covers First-run setup (once per…, Reading (do this liberally), Writing (durable knowledge… and When to reach for the brain
  • Runs Shell scripts from its folder; needs GBRAIN_REMOTE_CLIENT_SECRET
  • Saving a durable fact or conclusion so it outlives the current session

What it does

Where a scope's own notebook is fast per-turn memory, gbrain is the deep, indexed, cross-source memory that holds org docs, shared channel knowledge and every agent's durable notes. A one-time setup step initializes the CLI with the organization's issuer and MCP URLs and persists the OAuth client secret to a config file on disk, since a secret passed only through an environment variable disappears once that variable goes out of scope.

Reading is meant to happen liberally: gbrain search runs a hybrid semantic and keyword query, gbrain get reads one page, and gbrain query returns results tuned for an agent to consume. Every read is isolation-enforced on the server, so the client only ever sees sources it is entitled to, such as the shared agent-memory source and read-only org wiki and handbook content.

Writing is fenced to the client's own namespace plus the channels it belongs to, and the convention is one page per entity, decision or topic, updated rather than duplicated, written as Markdown with YAML frontmatter and cross-referenced with gbrain link. gbrain remote doctor needs admin scope the client does not have, so gbrain whoami is the health check to use instead.

When your agent uses it

  • Looking up why a past decision was made or who made it
  • Saving a durable fact or conclusion so it outlives the current session
  • Cross-referencing a new note to related people, projects or decisions

Example prompts

  • “Search the brain for who decided to drop the legacy billing system and why.”
  • “Save a note that the Q3 roadmap review moved to Thursdays going forward.”
  • “Link this incident write-up to the on-call rotation page.”

Requirements

  • The gbrain CLI connected to the organization's brain
  • Scope credentials delivered through the deployment's secret handoff

What it can do on your machine

Read from SKILL.md and the folder at commit 7aa2caa. 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

    Ships script files (Shell), which the agent can run.

    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 these keys or tokens, usually read from environment variables:

    • GBRAIN_REMOTE_CLIENT_SECRET

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

Context cost

Company Knowledge Brain loads about 875 tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 362 words of instructions outside code blocks.

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

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 7aa2caa, republished under its MIT licence (© garrytan). 362 words, ~875 tokens.

Download SKILL.mdSave it as .claude/skills/gbrain/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
gbrain
description
Search and write the company knowledge brain. Use for any question about the org, people, projects, decisions, or history, and to persist durable knowledge beyond this scope's notebook.

gbrain — the company brain

This sandbox has the gbrain CLI connected (thin-client) to the org's central brain. It is the deep, indexed, cross-source memory: org docs, shared channel knowledge, and every agent's durable notes. Your scope's own notebook stays the fast per-turn memory; the brain is where knowledge outlives a scope and becomes searchable by everyone entitled to it.

First-run setup (once per sandbox — skip if gbrain remote doctor passes)

Your scope's brain credentials arrive via the deployment's secret handoff (keychain entry or one-time secret drop named gbrain). Then:

bash
gbrain init --mcp-only \
  --issuer-url "https://brain.<org>.com" \
  --mcp-url "https://brain.<org>.com/mcp" \
  --oauth-client-id "<client id from the handoff>" \
  --oauth-client-secret "<client secret from the handoff>"
gbrain whoami   # must succeed before using any other command

Pass the secret with --oauth-client-secret, not via GBRAIN_REMOTE_CLIENT_SECRET: an env-sourced secret is deliberately NOT written to ~/.gbrain/config.json, so every later command would fail with "No client_secret available" once the variable is out of scope. The flag persists it to the config file on this sandbox's durable disk, which is what the tool's credential capture expects.

Do not run gbrain remote doctor — it needs admin scope, which your client does not have (by design). gbrain whoami is the read-scope health check.

Reading (do this liberally)

bash
gbrain search "who decided X and why"     # hybrid semantic + keyword search
gbrain get <slug>                          # read one page
gbrain query "question" --json             # search tuned for agent consumption

You can read: the shared agent-memory source, org read-only sources (wiki, handbook), and everything under them. Reads are isolation-enforced server-side; you only ever see sources your client is entitled to.

Show full SKILL.md (159 more words)Show less

Writing (durable knowledge only, under YOUR prefixes)

Your client is write-fenced to slug prefixes — your own namespace plus the channels you belong to. Writes outside them are rejected server-side.

bash
# personal durable memory (your namespace):
gbrain put emp-<your-slug>/people/jane-example --content "..."

# shared channel knowledge (channels you are in):
gbrain put chan-eng/decisions/2026-08-database-choice --content "..."

Conventions:

  • Write conclusions and durable facts, not chat transcripts. One page per entity/decision/topic; update the page rather than appending near-duplicates.
  • Markdown with YAML frontmatter; the brain chunks, embeds, and links it.
  • Cross-reference liberally: gbrain link <from> <to> (from must be in your namespace; linking TO any readable page is fine).
  • When you learn something channel-relevant in personal work, mirror the conclusion into the channel prefix with a (said in <where>) provenance note.

When to reach for the brain

  • Any question about the org, a person, a project, a decision, or history → gbrain search FIRST, then answer.
  • You produced knowledge with value beyond this conversation → gbrain put.
  • Something looks wrong (auth errors, empty results you don't expect) → gbrain whoami to confirm which client and scopes you're using, and report its output.

© 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 3 other files in docs/integrations/qm-harness-snippets of garrytan/gbrain.

  • SKILL.md
  • provision-scopes.sh
  • roster.example.tsv
  • tool.json

Open the folder on GitHubat commit 7aa2caa

Compare with similar skills

Company Knowledge Brain 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.

Company Knowledge Brain compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Company Knowledge Brain this skillgarrytan/gbrain31k—~875Automated safety check: PassMIT
Icm ArchitectRinDig/icm-architect1.8k—~3.2kAutomated safety check: PassMIT
Obsidian Wiki Vault SetupAgriciDaniel/claude-obsidian15k—~1.3kAutomated safety check: PassMIT
Save to Obsidian VaultAgriciDaniel/claude-obsidian15k1 repos~1.3kAutomated safety check: PassMIT
NanoClaw LLM Wiki Setupnanocoai/nanoclaw31k1 repos~1.3kAutomated safety check: PassMIT
Obsidian Project Knowledge BaseGalaxy-Dawn/claude-scholar5.7k—~551Automated safety check: PassMIT

Similar skills

  • Icm Architect

    RinDig/icm-architect

    Design any process, idea, problem, or body of knowledge into an ICM (Interpretable Context Methodology) workspace — folder structure as agent architecture — or restructure an existing folder, repo…

    1.8k GitHub stars~3.2k tokensUpdated 1 mo ago
    Knowledge ManagementAuto-check passed
  • Obsidian Wiki Vault Setup

    AgriciDaniel/claude-obsidian

    Sets up or adopts a separate Obsidian knowledge vault through the claude-obsidian core script and routes follow-up work to the right wiki sub-skill.

    15k GitHub stars~1.3k tokensUpdated 28 days ago
    Knowledge ManagementAuto-check passed
  • Save to Obsidian Vault

    AgriciDaniel/claude-obsidian

    Files a specific answer, decision or insight you point to in a conversation as one reviewed note in your Obsidian vault, and only when you ask for it.

    15k GitHub starsUsed in 1 repo~1.3k tokens
    Knowledge ManagementAuto-check passed
  • NanoClaw LLM Wiki Setup

    nanocoai/nanoclaw

    Adds a persistent wiki knowledge base to a NanoClaw group following Karpathy's LLM Wiki pattern, with folders, a tailored container skill and a CLAUDE.md section.

    31k GitHub starsUsed in 1 repo~1.3k tokens
    Knowledge ManagementAuto-check passed
  • Obsidian Project Knowledge Base

    Galaxy-Dawn/claude-scholar

    Maintains a project-scoped Obsidian research knowledge base: bootstrapping its folders, routing notes, updating hub, plan and index notes, and linting.

    5.7k GitHub stars~551 tokensUpdated 15 days ago
    Knowledge ManagementAuto-check passed
  • Second Brain Query

    NicholasSpisak/second-brain

    Answer questions against the knowledge base wiki. An agent skill from NicholasSpisak/second-brain.

    736 GitHub stars~712 tokensUpdated 6 mo ago
    Knowledge ManagementAuto-check: notes

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
  • 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
  • Skillpack Harvest

    garrytan/gbrain

    Lift a proven skill from a host repo (e.g. An agent skill from garrytan/gbrain.

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

Questions about Company Knowledge Brain

What does Company Knowledge Brain do?

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. Where a scope's own notebook is fast per-turn memory, gbrain is the deep, indexed, cross-source memory that holds org docs, shared channel knowledge and every agent's durable notes. A one-time setup step initializes the CLI with the organization's issuer and MCP URLs and persists the OAuth client secret to a config file on disk, since a secret passed only through an environment variable disappears once that variable goes out of scope.

When should I use Company Knowledge Brain?

Company Knowledge Brain fits situations like: looking up why a past decision was made or who made it; saving a durable fact or conclusion so it outlives the current session; cross-referencing a new note to related people, projects or decisions.

How do I install Company Knowledge Brain in Claude Code?

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

How do I install Company Knowledge Brain in Codex?

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

Can I use Company Knowledge Brain 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 gbrain -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gbrain, .gemini/skills/gbrain, .github/skills/gbrain and .opencode/skills/gbrain in your project.

What does Company Knowledge Brain need to run?

Going by SKILL.md and its folder, Company Knowledge Brain needs a shell for the scripts in its folder and credentials named GBRAIN_REMOTE_CLIENT_SECRET. Our summary lists: The gbrain CLI connected to the organization's brain; Scope credentials delivered through the deployment's secret handoff.

Does Company Knowledge Brain 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 Company Knowledge Brain 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 Company Knowledge Brain use?

Company Knowledge Brain 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 Company Knowledge Brain use?

About 875 tokens (SKILL.md is roughly 3.5k 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 Company Knowledge Brain?

Skills that share tags, products or a category with Company Knowledge Brain: Icm Architect (RinDig/icm-architect, 1.8k stars), Obsidian Wiki Vault Setup (AgriciDaniel/claude-obsidian, 15k stars), Save to Obsidian Vault (AgriciDaniel/claude-obsidian, 15k stars) and NanoClaw LLM Wiki Setup (nanocoai/nanoclaw, 31k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Company Knowledge Brain?

garrytan (a GitHub user) maintains it in garrytan/gbrain, which has 30,666 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on October 8, 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.