New to Claude Skills? Learn how to install them →

lijigang on GitHub

Q&A Extraction

Free

Transform articles into structured Q&A chains.

by lijigang6.8k stars on lijigang/ljg-skills
1 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Q&A Extraction does

The Q&A Extraction skill is designed to help users distill the core arguments of any written work—be it an article, paper, or book—into a structured series of questions and answers. This skill focuses on extracting incisive questions that probe deeper into the reasoning behind the author's conclusions, rather than simply summarizing the content. By following a specific methodology, it allows readers to engage with the material in a way that mirrors the author's thought process, providing a clear pathway through their logic.

When using this skill, users can input a URL, a PDF, or direct text, and the skill will generate a sequence of questions that highlight the critical aspects of the argument. Each answer is crafted to follow a formal structure, ensuring that it includes a conclusion, a formalization of the idea, the steps leading to that conclusion, and the boundaries of its applicability. This structured approach not only clarifies the content but also reinforces the logical connections between ideas, making it easier for users to grasp complex arguments.

This skill is particularly useful for students, researchers, and professionals who need to analyze and understand dense academic or technical texts. It serves as an intellectual scaffolding tool, enabling users to extract meaningful insights without getting bogged down by irrelevant details. By focusing on the 'why' and 'how' of arguments, the Q&A Extraction skill empowers users to engage more critically with the material they are studying.

However, it is important to note that this skill is not intended for generating FAQs, glossaries, or comprehension quizzes. Its primary function is to facilitate a deeper understanding of the author's reasoning through a methodical question-and-answer format, making it a valuable resource for anyone looking to enhance their analytical skills.

When to use it

Use this skill when you want to analyze an article, paper, or book and need to extract key questions and answers that clarify the author's arguments.

When not to use it

This skill is not suitable for generating FAQs or simple summaries; it focuses on deeper analytical engagement rather than surface-level comprehension.

What you can build with it

Extracting Q&A from an Online Article

Input a URL of an online article to generate a structured Q&A that highlights the main arguments.

Analyzing a Research Paper

Upload a PDF of a research paper to extract critical questions and answers that clarify the author's reasoning.

Direct Text Analysis

Paste a block of text to quickly generate a Q&A format that distills the key points and arguments.

How to install Q&A Extraction

View source

1. Install with the skills CLI

npx skills add lijigang/ljg-skills/ljg-qa --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by lijigang

ljg-qa: 问答提取

读一份东西,把它的思想拆成「为什么—怎么—边界」的问答链。

读者顺着 Q 走过去,每个 A 砸下来一枚钉子。

你不是

  • 不是 FAQ 生成器("什么是 X"——读者一看就跳过)
  • 不是摘要换皮(把段落拆成"问/答"两半还是摘要)
  • 不是知识点列表(孤立的事实碰撞不出洞察)
  • 不是阅读理解题(提问不是为了考读者,是为了切中作者)

你是

把作者的论证骨架翻出来,每根骨头长成一个尖锐的问题。读者沿着 Q 链读,能复现作者的整套思路——而不是被告知结论。

三条铁律

  1. Q 切要害 —— 问的是「为什么这个解法成立」「它跟另一种做法差在哪」「它的代价是什么」「它在哪里失效」,不是「它定义是什么」。一个 Q 必须能让答案承重,不能被一句话敷衍过去。

  2. A 有形式化收口 —— 每个 A 严格四段:结论(一句话)+ 形式化(用文字 + 简单符号把思想压成一行可视关系,如 A = B + C旧: X → 新: Y)+ 论证步(怎么想到的)+ 边界(不成立的条件)。形式化是"思想的几何",让读者一眼看出关系。

  3. Q 链有方向 —— Q 之间不是并列罗列,是「Q1 答完→Q2 自然冒出来」。读者读完整串 Q,相当于走了一遍作者的推理路径。

工作流

Workflows/Extract.md 的步骤执行。

设计参考

Q 怎么提、A 怎么收口的具体模式见 References/QuestionDesign.md

Voice Notification

执行 workflow 时:

curl -s -X POST http://localhost:31337/notify \
  -H "Content-Type: application/json" \
  -d '{"message": "Running Extract in ljg-qa"}' \
  > /dev/null 2>&1 &

输出文本:

Running **Extract** in **ljg-qa**...

输出

  • 格式:org-mode(*bold*,禁 markdown 语法)
  • 路径:~/Documents/notes/
  • denote 文件名:{YYYYMMDDTHHMMSS}--qa-{核心主题 5-10 字}__qa.org

Examples

Example 1: URL

User: /ljg-qa https://example.com/article
→ WebFetch 获取
→ 找观点骨架 → 设计 Q 链 → 写 A 三段
→ org-mode 输出到 ~/Downloads/

Example 2: 论文 PDF

User: /ljg-qa ~/Downloads/paper.pdf
→ Read PDF(注意 pages 参数)
→ Q 抽出方法的「为什么」「代价」「边界」
→ 输出 org-mode

Example 3: 直接文本

User: 把这段抽成 Q-A: [text]
→ 跳过获取,直接抽
→ 输出

Gotchas

  • AI 默认会写「什么是 X」型问题 —— 教科书腔。生成后扫一遍,凡是 Q 能用一句定义打发的,重写
  • AI 默认会让 A 散掉 —— 没有结论句、没有边界、写成一段散文。每个 A 必须严格四段(结论 / 形式化 / 步骤 / 边界)
  • AI 默认会把「形式化」写成数学公式 —— 不是。形式化是用文字 + → = ≠ + × 这类符号压一行可视的关系,比如 通才 = 协调,专才 = 干活。是"思想的几何",不是"数学的形式"
  • AI 默认按章节顺序提问 —— 这是抄目录,不是抽思想。Q 链应该按论证依赖关系排,不按出现顺序
  • AI 默认会把 Q-A 理解成「问答游戏」 —— 不是。这里 Q 是凿子,A 是钉子。装饰性的轻问题禁止
  • AI 默认会在 A 里堆术语保平安 —— 用术语不算回答。把术语翻译成具体动作和具体物件,否则 A 没承重

Frequently asked questions about Q&A Extraction

Similar skills