# Capture > Guarda cualquier pensamiento o contenido en el brain con un solo comando de CLI, reemplazando la duda entre `put_page`, commit-then-sync o autopilot-wait. Fuente: https://skillsagentes.com/skills/garrytan/gbrain/capture Markdown: https://skillsagentes.com/skills/garrytan/gbrain/capture.md Repositorio: https://github.com/garrytan/gbrain Autor: garrytan Licencia: MIT Actualizado: hace 29 días Coste de contexto: 49 tok instalada, 1.1k tok al activarse, 1.1k tok con todos los archivos del bundle Bundle: 1 archivo, 4 KB Permisos que pide: ninguno declarado ## Instalación Un skill son archivos markdown: los mismos archivos valen para cualquier agente y lo único que cambia es el directorio de destino, es decir la bandera `--agent`. Añade `-g` para instalarlo en todos los proyectos de la máquina. ```bash # Claude Code npx -y skills add garrytan/gbrain --skill capture --agent claude-code # Cursor npx -y skills add garrytan/gbrain --skill capture --agent cursor # Codex npx -y skills add garrytan/gbrain --skill capture --agent codex # Gemini CLI npx -y skills add garrytan/gbrain --skill capture --agent gemini # Windsurf npx -y skills add garrytan/gbrain --skill capture --agent windsurf # Cline npx -y skills add garrytan/gbrain --skill capture --agent cline ``` ## Qué hace - Ejecuta `gbrain capture` para guardar cualquier texto como página en la DB del brain y como archivo markdown en disco a la vez - Genera un slug por defecto `inbox/YYYY-MM-DD-` y agrega frontmatter (type, title, captured_via, captured_at) - Imprime un recibo de 5 líneas o, con `--quiet`/`--json`, salida script-friendly - Deduplica capturas idénticas mediante el hash de contenido del daemon en 24h ## Cuándo usarla - El usuario dice 'captura esto', 'guarda este pensamiento' o 'recuerda esto' - El usuario pega contenido y pide que se guarde - Tras un resumen de reunión, una nota de investigación o cualquier síntesis que deba quedar como página del brain ## Cuándo no - Ingesta masiva de muchos archivos (usar `gbrain sync` o `skills/media-ingest`) - Artículo o link con metadatos de autor y publicación (usar `skills/idea-ingest`) - Transcripciones de reuniones (usar `skills/meeting-ingestion`) ## Qué la activa - "Captura este pensamiento en mi brain" - "Guarda esta nota que acabo de pegar" - "Recuerda esto para después" - "Ingiere este fragmento en mi inbox" ## Antes de instalar - Requiere el CLI `gbrain` instalado y configurado (local o thin-client) con `sync.repo_path` definido. ## Archivos - SKILL.md — 4 KB ## SKILL.md Reproducido tal cual desde garrytan/gbrain bajo MIT. Esta sección es el documento original y está en inglés. # 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 `/.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-` 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-` so captures cluster in a predictable triage location. ## How to use ```bash 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-` (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: `. - **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. ## 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`. 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. ## Dónde encaja - Categoría: [Productividad](https://skillsagentes.com/categorias/productividad.md) — Planificación, toma de notas y automatización de flujos personales. - Creador: [garrytan](https://skillsagentes.com/creators/garrytan.md) — 134 skills en el directorio - [Todas las skills](https://skillsagentes.com/skills.md) - [Ranking de instalaciones](https://skillsagentes.com/ranking.md) ## Otras skills del mismo repositorio - [Setup](https://skillsagentes.com/skills/garrytan/gbrain/setup.md): Configura GBrain con auto-aprovisionamiento de Supabase o PGLite, inyección en AGENTS.md y primera importación. - [Maintain](https://skillsagentes.com/skills/garrytan/gbrain/maintain.md): Chequeos de salud del brain: aplicación de back-links, auditoría de citas, validación de filing, detección de info obsoleta, páginas huérfanas y benchmarks. - [Schema Unify](https://skillsagentes.com/skills/garrytan/gbrain/schema-unify.md): Migra un brain de gbrain-base a la taxonomía de 14 tipos canónicos de gbrain-base-v2 usando gbrain onboard --check y el handler Minion unify-types. - [Retrieval Reflex](https://skillsagentes.com/skills/garrytan/gbrain/retrieval-reflex.md): Cuándo y qué recuperar: abre la página del brain de una entidad relevante antes de responder desde memoria. - [Minion Orchestrator](https://skillsagentes.com/skills/garrytan/gbrain/minion-orchestrator.md): Skill unificado de Minions para jobs deterministas de shell y orquestación de subagentes LLM: cola durable, observable y controlable, más la doctrina de ejecución durable para operaciones largas. --- Skills Agentes · [Índice de páginas en markdown](https://skillsagentes.com/sitemap.md) · [Inicio](https://skillsagentes.com/index.md)