media-ingest
它能做什么
这项技能把视频、音频文件、PDF、书籍、截图和代码仓库等媒体添加到你的知识库。它会创建一个分析页面,而不只是原始转录稿,并链接其中提到的人和公司。
适用场景
- ✓当你分享一段视频、播客或音频文件,并希望保存到知识库的时候。
- ✓当你有一份 PDF 或书籍,希望进行分析并归档时。
- ✓当你希望把 GitHub 仓库或截图转换为可搜索的页面时。
技能链接
https://github.com/garrytan/gbrain/blob/master/plugin-variants/gbrain-daily/skills/media-ingest/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这个 YouTube 视频和这份 PDF 保存到我的知识库,附上摘要,并链接其中提到的人。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会识别格式并获取文本,视需要使用转录稿、文本提取或图像识别。它会撰写分析页面,保留原始文件,并链接每个提到的人或公司。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Media Ingest Skill
Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain.
Filing rule: Read
skills/_brain-filing-rules.mdbefore 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.mdfor 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 |
| 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 <file> --page <slug>
Phase 3: Create brain page
File by primary subject (not format). Use this template:
# {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:
- Check brain for existing page
- Create/enrich if needed (delegate to enrich skill)
- Add back-link from entity page to this media page
- 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
- 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-examplepage, not create a new one. - Re-running ingest on same source creates duplicates. Always check brain for existing source URL match before Phase 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.
- 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.
- Large audio files (>2hr) can timeout transcription services. Split into chunks before transcription if needed.
When it fails
Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to t
常见问题
它会保留原始文件吗?
会。原始素材会被保存,使页面可以追溯到它们。
页面只是转录稿吗?
不是。技能会撰写分析页面,同时也会以可读的形式保留转录稿。
它能读取截图中的文字吗?
能。它会识别图像中的文字,并把它添加到页面中。
详情
作者的原始描述
Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.
repo: garrytan/gbrain
热度
- GitHub 星标
- 31k
- 排名
- #9277
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …