Book Summarizer
Use this skill for requests like:
- - "Summarize this book at a 20% compression ratio"
- "Generate a substantial summary and verify the ratio"
- "Produce the summary in batches and validate the final total"
Rules
- - Default target ratio: INLINECODE0
- Default tolerance: INLINECODE1
- Accept only summaries between
18% and 22% of the original word count - Output must be in user's language of choice (e.g., pt-BR)
- If the ratio is outside the allowed range, do not import the summary
- In chat-only mode, if the source is very large, generate the summary in multiple batches and merge them before validation
- All packaged helper scripts live in
scripts/ inside this skill folder
Workflow
- 1. Start from a local plain-text book file or a downloaded Project Gutenberg text.
- Count the source words with
python scripts/book_tools.py count <original_file>. - Compute the target summary length with
python scripts/book_tools.py target <original_file> --ratio 0.20. - If the source is too large for one reply, split it with
python scripts/split_book.py <original_file> 3000. - Draft summary batches in order, preserving chronology and section fidelity.
- Merge the batches with
python scripts/book_tools.py aggregate <summary_file> <batch_files...>. - Validate the final ratio with
python scripts/verify_summary_ratio.py <original_file> <summary_file>.
Key Files
- - INLINECODE10
- INLINECODE11
- INLINECODE12
- INLINECODE13
Notes
- - The packaged scripts use only the Python standard library.
- Run the commands from the skill folder, or use explicit paths if you call them from elsewhere.
- For very large books, prefer the automated pipeline over single-turn chat drafting.
- In chat-only mode, books above roughly 80k words should be summarized over multiple turns; do not pretend a single short draft satisfies the 20% rule.
书籍摘要生成器
使用此技能处理以下请求:
- - 以20%压缩率总结这本书
- 生成一份实质性摘要并验证比例
- 分批生成摘要并验证最终总数
规则
- - 默认目标比例:0.20
- 默认容差:0.02
- 仅接受原文词数18%至22%之间的摘要
- 输出必须使用用户选择的语言(例如pt-BR)
- 如果比例超出允许范围,则不导入摘要
- 在纯聊天模式下,如果源文本非常大,则分多批生成摘要,并在验证前合并
- 所有打包的辅助脚本均位于此技能文件夹内的scripts/目录中
工作流程
- 1. 从本地纯文本书籍文件或下载的Project Gutenberg文本开始。
- 使用python scripts/booktools.py count <原始文件>统计源文本词数。
- 使用python scripts/booktools.py target <原始文件> --ratio 0.20计算目标摘要长度。
- 如果源文本过大无法在一次回复中完成,使用python scripts/splitbook.py <原始文件> 3000进行拆分。
- 按顺序起草摘要批次,保持时间顺序和章节完整性。
- 使用python scripts/booktools.py aggregate <摘要文件> <批次文件...>合并批次。
- 使用python scripts/verifysummaryratio.py <原始文件> <摘要文件>验证最终比例。
关键文件
- - scripts/booktools.py
- scripts/splitbook.py
- scripts/verifysummaryratio.py
- SKILL.md
注意事项
- - 打包脚本仅使用Python标准库。
- 从技能文件夹运行命令,如果从其他位置调用,请使用显式路径。
- 对于非常大的书籍,优先使用自动化流程而非单轮聊天起草。
- 在纯聊天模式下,大约8万词以上的书籍应分多轮进行摘要;不要假装单次简短草稿就能满足20%规则。