跳到正文
cccskills
免费在 GitHub 公开

capture

Save a thought, note, or text excerpt to GBrain’s database and a Markdown file with one command. Automatic naming, titles, and metadata make individual captures immediately searchable, with a receipt confirming the save.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Save any thought or content into the brain via one CLI command. The single human-facing entrypoint that replaces "put_page vs commit-then-sync vs autopilot-wait" with one command that just works.

查看安装方法

适用场景

  • Save a thought before forgetting it
  • Keep a short excerpt for later search
  • Capture an existing note file
  • Save text received through a command pipeline

包含的文件(1)

  • SKILL.md5.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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 …).

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 poll gbrain 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_required or insufficient_scope over 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. capture is the human-facing wrapper.
  • Don't try to bulk-import dozens of files by looping over gbrain capture. That's what gbrain sync (or gbrain 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 PATH if you already have a fully-formatted markdown file.
  • Don't pass secrets as inline content. Inline args land in shell history. Use --file or --stdin instead.

When NOT to use this skill

  • Bulk ingestion of many files → skills/media-ingest/SKILL.md or gbrain sync instead
  • 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.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Check research claims cited in books, articles, or conversations by tracing the original paper, methods, underlying data, and independent replication. Save a sourced assessment explaining whether the claim holds up and what remains uncertain.

中文简介正在准备中。当前显示英语简介。

  • Check a study cited in a book
  • Trace a numerical claim in an article to its source data
  • Verify research evidence before using it in writing
garrytan/gbrain3.1万2026年10月19日 更新

Explore old files and email archives to rediscover personal writing, ideas, and meaningful conversations. Review selected items one at a time, save worthwhile material as organized notes, and track progress within explicitly permitted folders.

中文简介正在准备中。当前显示英语简介。

  • Rediscover old journals and creative writing
  • Find meaningful letters and email conversations
  • Recover past product and business ideas
garrytan/gbrain3.1万2026年10月19日 更新

Restructure raw article text stored in gbrain into summaries, exact quotes, key insights, and links to related pages. Preserve the original text and connect the article's significance to projects and interests already recorded in gbrain.

中文简介正在准备中。当前显示英语简介。

  • Organizing saved articles into readable notes
  • Collecting exact quotes for essays
  • Connecting articles to current projects
garrytan/gbrain3.1万2026年10月19日 更新

ask-user

免费

Present clear choices when a task needs a human decision, then pause execution until the user replies. This reusable interaction pattern supports filing decisions, priority selection, and confirmation before destructive actions, with an option to decline.

中文简介正在准备中。当前显示英语简介。

  • Clarifying requests with several possible meanings
  • Confirming before bulk deletion or overwriting
  • Choosing where to file meeting notes
garrytan/gbrain3.1万2026年10月19日 更新

Collect public posts across a blog, newsletter, or feed archive and save clean Markdown pages for each article. The workflow avoids duplicates, supports resumed runs, repairs empty results, and hands articles to a separate enrichment skill.

中文简介正在准备中。当前显示英语简介。

  • Importing a blog's public article archive
  • Organizing public newsletter posts as knowledge pages
  • Rerunning a feed import without duplicates
garrytan/gbrain3.1万2026年10月19日 更新

Create a detailed chapter-by-chapter reading companion from an EPUB or PDF, connecting the book’s ideas to experiences and words saved in your personal knowledge store. The result highlights parallels without prescribing actions.

中文简介正在准备中。当前显示英语简介。

  • Connect a book’s ideas to personal experiences
  • Review detailed chapter summaries alongside personal reflections
  • Create a parent’s guide for reading a children’s book aloud
garrytan/gbrain3.1万2026年10月19日 更新

查看 garrytan 的全部技能

报告此技能的问题