An agent-native workflow for turning books, YouTube videos, web articles, local documents, movies, and TV series into clear, source-grounded Markdown reading versions adapted to the material and the reader's goal.
This project was forked and substantially reworked from limboy/pruner. The upstream project established the core idea of turning books, YouTube videos, web articles, and local Markdown files into dense, pruned reading versions through outline generation and section-by-section reconstruction.
This fork preserves that goal while replacing the original Node.js/API-wrapper architecture with an agent-native AGENTS.md and reusable Codex skill. It is independently maintained and is not an official release of the upstream project.
Unlike a conventional API wrapper, this repository contains project guidance and a reusable Codex skill. The active agent reads the source, plans the structure, produces section-level reconstructions, checks source integrity, and writes the finished document. No API key, model SDK, Node.js runtime, or package installation is required for normal use.
Normal summarization does not require a Python environment. YouTube inputs use the bundled transcript script by default, so create a local virtual environment and install its single dependency before processing videos:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txtThe virtual environment is ignored by Git. Reactivate it in a new shell with
source .venv/bin/activate.
-
Clone or open this repository in Codex.
-
Give Codex a source and ask for a summary. For example:
精简这个网页:https://example.com/article把 ./notes.md 做成一份高密度中文精简版总结 Chernobyl 第一季,按集和叙事章节组织 -
Find generated files in
outputs/, unless you requested another path.
The workflow defaults to Chinese, keeps concrete facts and reasoning, and only emits direct quotations when they can be checked against acquired source text. Interviews and exploratory conversations default to story-driven guided readings. Nonfiction books are reconstructed as self-contained long-form articles organized by ideas rather than chapters. Explicit high-density or reference requests use a denser structured format. Deep Q&A is included only when it adds understanding rather than repeating the summary.
When the input is only a book title, Codex summarizes it directly from model knowledge. It must not browse for book metadata, search for previews, or download a remote PDF/EPUB unless you explicitly ask it to research or verify the book. These outputs are labeled as model-knowledge-based and omit unverified quotations, page numbers, and edition-specific claims.
If you provide a local or attached copy of the book, Codex may instead produce a source-grounded summary from that supplied file.
For every YouTube URL, Codex runs the bundled transcript script first. It should not open YouTube in a browser or try the transcript panel before this command. With the recommended virtual environment:
.venv/bin/python .agents/skills/summary/scripts/fetch_youtube_transcript.py \
"https://www.youtube.com/watch?v=VIDEO_ID" \
-o .summary-cache/video/transcript.mdIf .venv is not being used but yt-dlp is already available, run the same command with python3. If the first attempt fails because the video requires authentication, retry the script with --cookies-from-browser chrome. Browser-based transcript retrieval is only a fallback after the script has actually failed.
Local documents, article bodies, transcripts, subtitles, and supplied book text can support source-grounded summaries and verified excerpts. A result based only on model knowledge must say so explicitly and must not present unverified quotations as original text.
.
├── AGENTS.md
├── README.md
├── requirements.txt
├── .gitignore
└── .agents/skills/summary/
├── SKILL.md
├── agents/openai.yaml
├── references/output-formats.md
└── scripts/fetch_youtube_transcript.py