Skip to content

marktantongco/promptc-os-ai-prompt-wiki / skills/cheat-sheet

cheat-sheet

Verified

将 PDF/Word/Markdown 学习资料转化为精炼的知识浓缩卡文档。支持三种风格(知识点速查卡/思维导图式/Q&A式),输出双栏小字 PDF。当用户说"生成知识浓缩卡"、"生成 Cheatsheet"、"帮我做个速查表"、"把这个资料整理成一页纸"、"做个知识卡片"时触发。**不处理**:基于材料出题(→ quiz-mastery)、长期学习项目(→ study-buddy)。

Cheatsheet 生成器

你做什么

把用户的学习资料(PDF/Word/Markdown/文本)压缩成一份双栏、小字、信息密度高的 Cheatsheet 文档(PDF 格式)。

核心原则:只保留干货,砍掉废话。


⚠️ 铁律:避免重复创建

生成 Cheatsheet 前,先扫描输出目录检查是否已有同主题文件:

  • 已存在 → 问用户"已经有一份 [文件名] 了,覆盖 / 新建一份 / 跳过?" 等用户回复再动手
  • 不存在 → 直接生成
  • 绝不未经询问直接覆盖

工作流程

步骤 1:接收资料

用户提供学习资料文件,支持格式:

  • .pdf — 调 PDF skill 的 process 路线提取文本
  • .docx — 调 PDF skill 的 process 路线提取文本
  • .md / .txt — 直接读取

提取文本命令:

# PDF 提取文本
python3 "$PDF_SCRIPTS/pdf.py" extract.text <file_path>

# Word 转 PDF 后提取(如需要)
python3 "$PDF_SCRIPTS/pdf.py" convert.office <file_path>

其中 $PDF_SCRIPTS 为 PDF skill 的 scripts 目录路径,需从 PDF skill 的 SKILL.md 位置推导。

如果用户没有提供文件而是直接贴了文本内容,跳过提取步骤,直接用文本。


步骤 2:选择风格

必须询问用户想要哪种风格(不要自己替用户选):

向用户展示以下选项:

  1. 📋 知识点速查卡 — 核心概念 + 定义 + 关键公式/要点,一眼扫到,适合考前突击
  2. 🌳 思维导图式 — 按层级结构组织(大标题→子标题→要点),有大纲感,适合梳理体系
  3. ❓ Q&A 式 — 把知识点变成"问题→答案"对,适合自测复习

用户选择后进入步骤 3。


步骤 3:LLM 提炼内容

根据用户选择的风格,构建不同的 prompt 让 LLM 从原文中提炼 cheatsheet 内容。

风格 1:知识点速查卡

提炼规则:

  • 提取所有核心概念、定义、公式、关键数据
  • 每个知识点用 术语:一句话解释 的格式
  • 相关知识点分组,每组有小标题
  • 重要公式/代码片段原样保留
  • 砍掉所有举例、过渡句、背景铺垫

输出结构:

## [分组标题]
- **术语A**:一句话定义
- **术语B**:一句话定义
- 📐 公式:`公式内容`

## [分组标题]
...

风格 2:思维导图式

提炼规则:

  • 提取文档的层级结构(章→节→要点)
  • 每个节点用最简短的语言概括
  • 最多 3 级深度(再深就塞不进一页了)
  • 用缩进和符号表达层级关系

输出结构:

# 主题

## 一级分支
  ├─ 二级要点
  │   ├─ 细节 1
  │   └─ 细节 2
  └─ 二级要点
      └─ 细节

风格 3:Q&A 式

提炼规则:

  • 把每个知识点转化成一个问题
  • 答案控制在 1-3 句话
  • 问题从基础到进阶排列
  • 易混淆的概念出辨析题

输出结构:

## [主题分组]

**Q:什么是 XXX?**
A:一句话回答。

**Q:XXX 和 YYY 的区别?**
A:简短对比。

步骤 4:用户确认与调整

LLM 生成内容后,先以文本形式展示给用户,询问:

"内容整理好了,你看看有没有要调整的?比如:

  • 某些部分要加重点标记?
  • 某些内容要删掉或补充?
  • 排版上有什么偏好?(比如字号再小一点、分区颜色区分等)"

用户确认"可以"后,进入步骤 5。 用户提出修改 → 调整内容 → 再次展示 → 等待确认。


步骤 5:生成 PDF

调用 PDF skill 的 Report 路线(ReportLab) 生成双栏 PDF。

排版规格(默认值):

参数默认值说明
页面大小A4可按用户要求调整
栏数双栏默认双栏,用户可选单栏
正文字号8pt信息密度优先,可按用户要求调整
标题字号10pt(一级)/ 9pt(二级)
行距1.2紧凑但可读
页边距上下左右各 12mm最大化内容区域
字体中文用 UniSong/UniHei,英文用 Helvetica

生成流程:

  1. 将 LLM 提炼的 Markdown 内容转换为 ReportLab 排版指令
  2. 调 PDF skill 的 report 路线生成 PDF
  3. 生成文件路径告知用户

调用 PDF skill 时遵循其 SKILL.md 中的所有规则,包括:

  • CJK 字体检查
  • 表格溢出防护
  • 页面填充率检查
  • 元数据设置

步骤 6:交付

输出给用户:

  • 📄 PDF 文件路径
  • 文件大小、页数
  • 提示用户可以继续调整

注意事项

内容质量

  • 不编造内容:所有知识点必须来自原文,不能自由发挥
  • 不遗漏关键内容:核心概念、公式、定义必须保留
  • 术语保持原文用词:不要擅自替换专业术语

文件操作

  • 生成的 PDF 默认保存到工作区根目录,文件名格式:知识浓缩卡_[主题]_[日期].pdf
  • 查重见上方"⚠️ 铁律:避免重复创建"

与其他 Skill 的关系

Skill关系
PDF skill调用其 process 路线提取文本,调用其 report 路线生成 PDF
study-buddystudy-buddy 可在用户完成学习项目后推荐生成 cheatsheet
quiz-mastery无直接关系,但 cheatsheet 内容可作为出题的知识点来源

文件结构

skills/cheat-sheet/
├── SKILL.md              ← 当前文件

本 skill 是纯流程指引,不包含独立脚本。所有文件操作和 PDF 生成通过调用 PDF skill 完成。

canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall