# Media Ingest > Ingiere video, audio, PDF, libros, capturas y repos de GitHub en el brain, con extracción de entidades y propagación de back-links. Fuente: https://skillsagentes.com/skills/garrytan/gbrain/media-ingest Markdown: https://skillsagentes.com/skills/garrytan/gbrain/media-ingest.md Repositorio: https://github.com/garrytan/gbrain Autor: garrytan Licencia: MIT Actualizado: hace 9 días Coste de contexto: 54 tok instalada, 1.4k tok al activarse, 1.4k tok con todos los archivos del bundle Bundle: 1 archivo, 6 KB Permisos que pide: search, query, get_page, put_page, add_link, add_timeline_entry, file_upload ## 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 media-ingest --agent claude-code # Cursor npx -y skills add garrytan/gbrain --skill media-ingest --agent cursor # Codex npx -y skills add garrytan/gbrain --skill media-ingest --agent codex # Gemini CLI npx -y skills add garrytan/gbrain --skill media-ingest --agent gemini # Windsurf npx -y skills add garrytan/gbrain --skill media-ingest --agent windsurf # Cline npx -y skills add garrytan/gbrain --skill media-ingest --agent cline ``` ## Qué hace - Crea una página en el brain con resumen y análisis para cada video, audio, PDF, libro, captura o repo ingerido - Extrae personas y empresas mencionadas y crea back-links y entradas de timeline en sus páginas - Sube el archivo original con gbrain files upload-raw para preservar la fuente - Transcribe video/audio y guarda transcripciones en formato crudo y legible - Ejecuta gbrain sync al final para actualizar el índice ## Cuándo usarla - Para procesar un video, YouTube, podcast, PDF, libro, captura de pantalla o repo de GitHub y guardarlo en el brain - Cuando se pide 'ingest this PDF' o 'process this book' - Cuando se quiere ingest a partir de un link o archivo subido ## Qué la activa - "Mira este video y guárdalo en mi brain" - "Ingiere este PDF del libro" - "Procesa este enlace de YouTube" - "Revisa esta captura de pantalla y dime qué dice" - "Echa un vistazo a este repo" ## Antes de instalar - Requiere servicios de transcripción/STT o captions para video/audio, y un modelo de visión para OCR de capturas. ## Archivos - SKILL.md — 6 KB ## SKILL.md Reproducido tal cual desde garrytan/gbrain bajo MIT. Esta sección es el documento original y está en inglés. # Media Ingest Skill Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. > **Filing rule:** Read `skills/_brain-filing-rules.md` before creating any new page. ## Input | Parameter | Required | Description | |-----------|----------|-------------| | source | yes | URL, file path, or uploaded file reference | | title | no | Override title (auto-detected if omitted) | | target_slug | no | Override page slug (auto-generated if omitted) | ## Contract This skill guarantees: - Every ingested media item has a brain page with analysis (not just a transcript dump) - Transcripts (video/audio) saved in raw and human-readable formats - Entity extraction: every person and company mentioned gets back-linked - Raw source files preserved via `gbrain files upload-raw` - Filing by primary subject, not by media format > **Convention:** See `skills/conventions/quality.md` for Iron Law back-linking. Every mention of a person or company with a brain page MUST create a back-link. ## Phases ### Phase 1: Identify format and fetch | Format | Action | |--------|--------| | YouTube/video URL | Fetch transcript (Whisper, transcription service, or captions) | | Audio file | Transcribe with available STT service | | PDF | Extract text (OCR if needed) | | Book PDF | Extract text, identify chapters/sections | | Screenshot/image | OCR via vision model, extract text and entities | | GitHub repo | Clone, read README + key files, summarize architecture | ### Phase 2: Upload raw source Save the original file for provenance: `gbrain files upload-raw --page ` ### Phase 3: Create brain page File by primary subject (not format). Use this template: ```markdown # {Title} **Source:** {URL or file path} **Format:** {video/audio/PDF/book/screenshot/repo} **Created:** {date} ## Summary {Key points, not a transcript dump} ## Key Segments / Highlights {For video/audio: timestamped highlights. For books: chapter summaries.} ## People Mentioned {List with links to brain pages} ## Companies Mentioned {List with links to brain pages} ``` ### Phase 4: Entity extraction and propagation For every person and company mentioned: 1. Check brain for existing page 2. Create/enrich if needed (delegate to enrich skill) 3. Add back-link from entity page to this media page 4. Add timeline entry on entity page A media item is NOT fully ingested until entity propagation is complete. ### Phase 5: Sync `gbrain sync` to update the index. ## Output Format Brain page created with summary, highlights, and entity cross-links. Report to user: "Ingested {title}: {N} entities detected, {N} pages updated." ## Error Handling - **Transcription failure:** If STT or captions are unavailable, note `[transcript unavailable]` in the page and proceed with whatever metadata is available. Do NOT fabricate content. - **Duplicate detection:** Before creating a page, search the brain for the source URL or file hash. If found, ask the user whether to update the existing page or skip. - **Partial OCR / audio:** Mark unclear segments with `[inaudible]` or `[illegible]`. Never guess at proper nouns. - **Large content (books > 500 pages):** Summarize by chapter; do not attempt to inline the full text. Link to the raw upload. - **Retry policy:** On transient API failures (network, timeout), retry once. On auth failures, abort immediately. ## Known Pitfalls 1. **YouTube auto-captions misidentify proper nouns.** Always cross-reference entity names against existing brain pages before creating new ones. A caption that garbles a name (e.g. "Alise" when the speakers are discussing alice-example) should match the existing `alice-example` page, not create a new one. 2. **Re-running ingest on same source creates duplicates.** Always check brain for existing source URL match before Phase 3. 3. **Book OCR quality varies wildly.** Scanned PDFs often have garbled text. If OCR quality is <80% readable, flag to user rather than ingesting garbage. 4. **Video transcript without speaker diarization is low-value.** If multiple speakers are present but no diarization is available, note this limitation prominently rather than attributing all speech to one person. 5. **Large audio files (>2hr) can timeout transcription services.** Split into chunks before transcription if needed. ## Anti-Patterns - Dumping raw transcripts without analysis - Skipping entity extraction ("I'll do that separately") - Filing **raw ingest** by format (all videos in `media/videos/`) instead of by subject. Note: format-prefixed paths under `media//` ARE sanctioned for **synthesized one-of-one output** like book-mirror's `media/books/-personalized.md`. The anti-pattern is for raw ingest, not for sui generis synthesis. See `skills/_brain-filing-rules.md` "Sanctioned exception: synthesis output is sui generis." - Not preserving raw source files - Creating stub pages without meaningful content ## 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)