capture

capture is a skill for Claude Code, Codex from garrytan/gbrain. It costs 44 tokens per session (1,174 once invoked), scanned A, original, MIT.

A single command for saving thoughts, pasted text, article excerpts, transcripts, and other content into a personal knowledge store. It creates both a searchable brain page and a Markdown file, then prints a receipt.

In plain words
What is it for?
Use it after meetings, research, or conversations when information should become searchable later. Content can be supplied directly, from a file, or through standard input.
Why use it?
It removes the need to choose between several different save and synchronisation commands. Repeatedly saving identical content is handled through duplicate detection.

Skill for Claude CodeCodex

Part of the gbrain plugin — 19 skills, 2 plugins shipped together

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 skills/garrytan/gbrain/capture
Any agent
npx skills add garrytan/gbrain --skill capture
Clone the repo
git clone --depth 1 https://github.com/garrytan/gbrain

Made for: Claude Code, Codex.

Or install gbrain, the plugin that ships this one along with the rest of its 19 skills, 2 plugins.

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 capture

README.md
[![agentmods](https://agentmods.dev/badge/skills/garrytan/gbrain/capture.svg)](https://agentmods.dev/skills/garrytan/gbrain/capture)
Your own site
<a href="https://agentmods.dev/skills/garrytan/gbrain/capture"><img src="https://agentmods.dev/badge/skills/garrytan/gbrain/capture.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,174 The whole file, excluding the scripts and references it only reads on demand.
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.00044 $0.01174
Opus 5 $0.00022 $0.00587
Sonnet 5 $0.00009 $0.00235
Haiku 4.5 $0.00004 $0.00117

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

Security

Grade A, and why

capture 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • capture — 100% identical, 0 lines differ
plugin/skills/capture/SKILL.md · 106 lines

How it starts

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

capture — the single ingestion entrypoint

When the user wants to save a thought, an article snippet, a transcript fragment, or any text into their brain, run gbrain capture. Don't reach for gbrain put or commit-then-sync — capture is the front door and it handles both local and thin-client installs the same way.

Contract

  • Input: the content to save (inline arg, --file PATH, or --stdin).
  • Output: a page in the brain DB AND a markdown file on disk under <sync.repo_path>/<slug>.md. Receipt printed to stdout.
  • Side effect: the page becomes immediately queryable via gbrain query, gbrain search, or any MCP-bound agent.
  • Idempotency: same content → same inbox/YYYY-MM-DD-<hash8> slug. The daemon's 24h content-hash dedup catches re-captures.
  • Trust: all captures via this skill are local-CLI trust (remote: false). Untrusted webhook ingestion goes through POST /ingest, not this verb.

When to invoke

  • "Capture this thought" / "save this" / "drop this into my brain" / "remember this"
  • The user pastes content and asks to keep it
  • After a meeting summary, a research note, or any synthesis that should land as a brain page

What it does

gbrain capture resolves to a put_page call (local) or a remote MCP call (thin-client). Either way the page lands in the DB AND on disk in one move via the v0.38 write-through plumbing. The default slug is inbox/YYYY-MM-DD-<hash8> so captures cluster in a predictable triage location.

How to use

gbrain capture "the thought I want to remember"
gbrain capture --file ./notes/today.md
echo "from a pipe" | gbrain capture --stdin
gbrain capture "..." --slug daily/2026-05-21
gbrain capture "..." --type idea --source voice-whisper
gbrain capture "..." --quiet          # script-friendly: prints just the slug
gbrain capture "..." --json           # structured output for agents

Defaults

  • Slug: inbox/YYYY-MM-DD-<hash8> (stable for same content; the daemon's 24h dedup catches re-captures).
  • Type: note (override with --type idea etc.).
  • Frontmatter stamps: captured_via: capture-cli, captured_at: <ISO>.
  • Title: first non-empty line of the body, capped at 80 chars (truncation appends ).

Read the full file on GitHub · 106 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 · 106 lines · 44 tokens per session scan A 98568ac96331

Subscribe to this mod's changes

capture is a skill published in the GitHub repository garrytan/gbrain (29,440 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 1,174 once invoked, about $0.0002 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.