
capture
Save any thought or content into the brain via one CLI command. The single human-facing entrypoint that replaces "putpage vs commit-then-sync vs autopilot-wait" with one command that just works.
- Installs
- 166
- Last 24h
- +9
- Trending rank
- #9056
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/garrytan/gbrain --skill capture- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads capture automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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 throughPOST /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 ideaetc.). - Frontmatter stamps:
captured_via: capture-cli,captured_at: <ISO>. - Title: first non-empty line of the body, capped at 80 chars (truncation appends
…).
Output Format
Default prints a 5-line receipt:
captured:
slug: inbox/2026-05-21-abcdef12
status: created_or_updated
content_hash: f3a7b9c0d1e2f3a4…
file: /Users/you/brain/inbox/2026-05-21-abcdef12.md
captured_at: 2026-05-21T04:15:00.000Z
--quiet prints only the slug (use for SLUG=$(gbrain capture "..." --quiet)).
--json prints structured output for downstream tools.
When it fails
Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:
- Exit 10 (
write_pending): the thought was accepted and may still commit. Tell the user it is saved and pending, and pollgbrain write-request <request_id>; never capture it a second time. - A secret-scan or slug-fence refusal: nothing was saved. Tell the user what was refused; do not edit the content to sneak past the scanner.
source_binding_requiredorinsufficient_scopeover MCP: this connection cannot write the target source; tell the user which source needs a grant from the brain host's operator.
Anti-Patterns
- Don't reach for
gbrain put. That's the old per-page primitive that doesn't know about default slug generation, content-type heuristics, or the receipt block.captureis the human-facing wrapper. - Don't try to bulk-import dozens of files by looping over
gbrain capture. That's whatgbrain sync(orgbrain import) is for. Capture is for single thoughts, single notes, single transcripts. - Don't pre-format the content yourself with frontmatter if you don't need to.
Capture wraps plain prose in sensible frontmatter (type + title +
captured_via + captured_at). The body becomes
# Title\n\n<your prose>. Pass--file PATHif you already have a fully-formatted markdown file. - Don't pass secrets as inline content. Inline args land in shell
history. Use
--fileor--stdininstead.
When NOT to use this skill
- Bulk ingestion of many files →
skills/media-ingest/SKILL.mdorgbrain syncinstead - Article/link with author + publication metadata →
skills/idea-ingest/SKILL.md(it knows to build the people page) - Meeting transcripts →
skills/meeting-ingestion/SKILL.md(attendee enrichment)
This skill is for the simple "I have a thought, save it" case. Specialized ingestion paths handle their own slugging + cross-referencing.
FAQ
What does the capture skill do?
Save any thought or content into the brain via one CLI command. The single human-facing entrypoint that replaces "putpage vs commit-then-sync vs autopilot-wait" with one command that just works.
How do I install capture?
Run npx skills add https://github.com/garrytan/gbrain --skill capture in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/capture/ (personal) or .claude/skills/capture/ (project).
Which AI agents can use capture?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is capture safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains capture?
It is published by garrytan in garrytan/gbrain. It has 166 recorded installs.
More from garrytan/gbrain
brain-ops
garrytan/gbrain
Brain knowledge base operations. The core read/write cycle: brain-first lookup, read-enrich-write loop, source attribution, ambient enrichment, back-linking. Read this before any brain interaction.
query
garrytan/gbrain
Answer questions using the brain's knowledge with 3-layer search, synthesis, and citation propagation. Use when the user asks a question, wants a lookup, or needs information from the brain.
maintain
garrytan/gbrain
Brain health checks: back-link enforcement, citation audit, filing validation, stale info detection, orphan pages, and benchmarks. Use when asked to check brain health, run maintenance, or audit quality.
idea-ingest
garrytan/gbrain
Ingest links, articles, tweets, and ideas into the brain. Fetch content, save to brain with analysis, credit the author (people page only when they pass the notability gate), and cross-link. Use when the user shares a link or says "read this", "save this", "think about this".
enrich
garrytan/gbrain
Enrich brain pages with tiered enrichment protocol. Creates and updates person/company pages with compiled truth, timeline, and cross-links. Use when a new entity is mentioned or an existing page needs updating.
meeting-ingestion
garrytan/gbrain
Ingest meeting transcripts from ANY meeting recorder into brain pages with attendee enrichment, entity propagation, and timeline merge. One unified pipeline: normalize the source into a standard transcript record, split multi-meeting recordings, resolve speakers by evidence, create the page, pass every surprising claim through the consistency check (transcript + brain + plausibility), enrich every entity, then run the verification checklist — substance AND sequence. A meeting is NOT fully ingested until the enrich skill has processed every entity AND the verification checklist passes, including the sequence verify (PASS or explicit user waive).
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.