Literature Structuring Expert
Automatically decompose long documents (papers, reports, books) into a structured, AI-friendly knowledge base. Splits by chapter, generates machine-readable summaries, and builds a navigable index to overcome context limits.
When to Use This Skill
Use this skill when the user:
- - Has a document that is too long for the AI's context window.
- Needs to perform cross-chapter analysis or get a high-level overview of a long text.
- Wants to build a reusable, queryable knowledge base from a PDF, Markdown, or text file.
- Asks: "How can I get my AI to read this whole book/paper?"
Quick Reference
| Situation | Action |
|---|
| User provides a long document | 1. Analyze and split it into chapters.<br>2. Generate a JSON summary for each chapter.<br>3. Create a master index file. |
| User asks a high-level, cross-chapter question |
Provide the content of the
MASTER_INDEX.md file to the AI. |
| User asks a detailed, chapter-specific question | Provide the corresponding single file from the
./chapters/ directory to the AI. |
| Task completed | Present the generated file tree and
MASTER_INDEX.md preview to the user. |
Core Workflow
Phase 1: Intelligent Splitting
- 1. Analyze Input: Receive the long document text or file path.
- Identify Structure: Automatically analyze the document to identify heading hierarchies (e.g.,
#, ##, 1., 1.1) to determine chapter boundaries. Prioritize user-specified splitting preferences. - Execute Split: Split the document into independent plain-text files by chapter.
*
Naming Convention:
{sequence_number}_{chapter_title}.md (e.g.,
01_Introduction.md).
*
Storage Location: All chapter files are saved in the
./chapters/ directory.
Phase 2: Summary Generation & Structuring
- 1. Generate Summary per Chapter: For each file in
./chapters/, generate a corresponding JSON summary file.
*
Structured Fields (JSON format):
{
"chapter_id": "Unique identifier matching the filename, e.g., 02_1",
"chapter_title": "Chapter Title",
"abstract": "Core summary of the chapter, 200-300 words.",
"keywords": ["Keyword1", "Keyword2", "Keyword3"],
"key_points": ["Key point one", "Key point two"],
"related_sections": ["IDs of other chapters strongly related to this one"]
}
*
Storage Location: JSON summary files are saved in the
./summaries/ directory (e.g.,
01_Introduction.summary.json).
Phase 3: Create Global Index
- 1. Aggregate Information: Collect data from all JSON files in
./summaries/. - Generate Index: Create a global index file,
MASTER_INDEX.md.
*
Content: Lists all chapters' IDs, titles, a short abstract preview, and keywords in a Markdown list or table.
*
Purpose: Provides a "bird's-eye view" for quick navigation and high-level Q&A.
Final Deliverables & File Structure
Upon completion, the following file tree is generated:
CODEBLOCK1
Usage Instructions for the User
For Global, Cross-Chapter Queries (e.g., “What is the paper's main thesis?”):
- * Provide the content of the
MASTER_INDEX.md file to the AI. This is token-efficient.
For Specific, In-Depth Queries Within a Chapter (e.g., “What were the parameters in the 'Methods' section?”):
- * Provide the corresponding single chapter file from the
chapters/ directory to the AI for full context.
文献结构化专家
自动将长文档(论文、报告、书籍)分解为结构化的、AI友好的知识库。按章节拆分,生成机器可读的摘要,并构建可导航的索引以突破上下文限制。
何时使用此技能
当用户出现以下情况时使用此技能:
- - 文档过长,超出AI的上下文窗口限制。
- 需要进行跨章节分析或获取长文本的全局概览。
- 希望从PDF、Markdown或文本文件构建可重复使用、可查询的知识库。
- 提出疑问:如何让我的AI阅读整本书/论文?
快速参考
| 场景 | 操作 |
|---|
| 用户提供长文档 | 1. 分析并拆分为章节。<br>2. 为每个章节生成JSON摘要。<br>3. 创建主索引文件。 |
| 用户提出全局性、跨章节的问题 |
向AI提供MASTER_INDEX.md文件的内容。 |
| 用户提出具体的、针对特定章节的问题 | 向AI提供./chapters/目录中对应的单个文件。 |
| 任务完成 | 向用户展示生成的文件树和MASTER_INDEX.md预览。 |
核心工作流程
阶段一:智能拆分
- 1. 分析输入:接收长文档文本或文件路径。
- 识别结构:自动分析文档,识别标题层级(如#、##、1.、1.1)以确定章节边界。优先考虑用户指定的拆分偏好。
- 执行拆分:按章节将文档拆分为独立的纯文本文件。
*
命名规范:{序号}
{章节标题}.md(例如01Introduction.md)。
*
存储位置:所有章节文件保存在./chapters/目录中。
阶段二:摘要生成与结构化
- 1. 逐章生成摘要:为./chapters/中的每个文件生成对应的JSON摘要文件。
*
结构化字段(JSON格式):
json
{
chapter
id: 与文件名对应的唯一标识符,例如021,
chapter_title: 章节标题,
abstract: 章节核心摘要,200-300字。,
keywords: [关键词1, 关键词2, 关键词3],
key_points: [关键点一, 关键点二],
related_sections: [与此章节强相关的其他章节ID]
}
* 存储位置:JSON摘要文件保存在./summaries/目录中(例如01_Introduction.summary.json)。
阶段三:创建全局索引
- 1. 汇总信息:收集./summaries/中所有JSON文件的数据。
- 生成索引:创建全局索引文件MASTER_INDEX.md。
*
内容:以Markdown列表或表格形式列出所有章节的ID、标题、简短摘要预览和关键词。
*
目的:提供鸟瞰视图,便于快速导航和全局问答。
最终交付物与文件结构
完成后,生成以下文件树:
Project_Root/
├── chapters/ # 【源文件库】包含所有拆分后的章节文本(.md文件)
│ ├── 01_Introduction.md
│ ├── 021Experimental_Methods.md
│ └── ...
├── summaries/ # 【摘要库】包含所有结构化的JSON摘要
│ ├── 01_Introduction.summary.json
│ ├── 021Experimental_Methods.summary.json
│ └── ...
└── MASTER_INDEX.md # 【全局导航】核心文档摘要索引
用户使用说明
对于全局性、跨章节查询(例如:论文的主要论点是什么?):
- * 向AI提供MASTER_INDEX.md文件的内容。这种方式节省Token。
对于特定章节内的深入查询(例如:方法部分的参数是什么?):
- * 向AI提供chapters/目录中对应的单个章节文件,以获取完整上下文。