quiz-to-xlsx

Extract questions from PDF, DOCX, images (OCR), TXT and other files and organize them into a ZIP package ready for bulk import (13-column .xlsx plus question images). By default the knowledge-point field is left blank and the source column uses the "source·question number" format (e.g. "2024 Beijing High School Entrance Exam·Q3"). Intended for converting test papers/question bank materials into importable question-bank packages.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "quiz-to-xlsx" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-bc35b63dda764adc0880097d3caa38d9703a41ce19571a4a4123d4ef0f0d93c3. Verify the upstream source and version against https://skillhub.cn/skills/user_a085c6dd/quiz-to-xlsx before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Extract questions from PDF, DOCX, images (OCR), TXT and other files and organize them into a ZIP package ready for bulk import (13-column .xlsx plus question images). By default the knowledge-point field is left blank and the source column uses the "source·question number" format (e.g. "2024 Beijing High School Entrance Exam·Q3"). Intended for converting test papers/question bank materials into importable question-bank packages.

0 Downloads

Introduction source: third_party · user_a085c6dd · 1.0.2 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: quiz-to-xlsx
description: 从 PDF、DOCX、图片(OCR)、TXT 等文件中提取题目,整理成可直接 ZIP 批量导入系统的包(13 列 .xlsx + 题目图片)。当用户需要把试卷/题库素材转化为可导入错题本/题库系统的 ZIP 包时使用;默认每题知识点留空,来源列采用「出处·题号」格式(如「2024北京中考·第3题」)。
agent_created: true

题目批量导入 XLSX 生成技能

将用户上传的题目素材(PDF、DOCX、图片、Excel、TXT 等任意格式)整理成可直接批量导入系统的 ZIP 包:包内包含一个标准 13 列 .xlsx 题目表 + 题目图片(可选)。所有题面、选项、答案、解析内容使用 Markdown 格式,数学公式使用 KaTeX 语法。

何时使用

  • 用户上传试卷 / 题库文档,要求"把题目转成 XLSX""生成批量导入文件""提取题目生成导入文件"
  • 触发词:转换题目、生成XLSX、批量导入、题目提取、题库导入、convert questions、generate xlsx
  • 不适用:单纯解析题目内容但不导出 XLSX、生成试卷排版等非导入场景

工作流程

  1. 读取文件:使用 Read 工具读取用户上传的文件路径(PDF、DOCX、图片、TXT 等)
  2. 识别与提取:分析内容,逐题判定题型(选择题 / 多选题 / 填空题 / 判断题 / 复合题 / 其他),提取题干、选项、答案、解析;同时记录该题在原文档中的原始题号(如「第3题」「1.(2)」「(3)」)用于回填来源列;知识点列默认留空,除非用户提供知识点映射
  3. 裁剪题目配图:如题目自带插图(几何图 / 函数图 / 坐标系 / 电路图等),只精确裁剪图形本身的区域(不是整页 PDF),按「序号」匹配命名(规则见下),保存到 题目图片/ 文件夹;二维码、logo、水印、页眉页脚等无关图一律跳过。图片命名规则(Q = 表格中的序号,如 5 → 5.png):
    • 题面图:Q.png(多张用 Q_1.png、Q_2.png)
    • 解析图:Q_ans.png
    • 选项图:Q_A.png / Q_B.png / Q_C.png / Q_D.png
    • 多科目同名序号冲突:科目_Q.png、科目_Q_A.png(如 数学_5.png)
    • 复合题小题:Q_s1.png、Q_s1_ans.png、Q_s1_A.png(小题序号从 1 开始)
  4. 检查照片截取准确性:逐张核对 题目图片/ 中已裁剪的图片——确认每图都只含题目自带插图本身、边缘紧贴图形、未误截其他题目 / 整页空白 / 二维码 / logo / 水印等无关内容,且文件名与对应题号一致;发现截取不准(缺边、多截、截错题或图题不对应)的须重新裁剪或剔除,确保图文对应无误后再进入下一步
  5. 格式化内容:将题面、选项、答案、解析转为 Markdown 格式,数学公式转为 KaTeX 语法(行内 $...$、独立 $$...$$);解析必须逐题填写、不得留空(复合题大题行除外),源文档有则提取格式化,无则据答案给出简要解析;含图字段插入图片引用(路径指向 题目图片/ 目录)
  6. 处理复合题:对大题套小题结构按复合题规则拆解为多行(所有小题共享相同序号,第一行写公共材料 / 题干,后续行各写小题)
  7. 生成 XLSX:调用 scripts/generate_quiz_xlsx.py 生成标准 13 列 XLSX 文件,文件名取用户给出的题目文件原名(去掉扩展名)——如源文件为 2024北京中考数学.pdf 则命名为 2024北京中考数学.xlsx;题目图片/ 文件夹与 XLSX 同级
  8. 打包成 ZIP:将上一步生成的 XLSX 与 题目图片/ 文件夹一起压缩为一个 .zip(XLSX 直接在压缩包根目录,图片放在 题目图片/ 子目录),ZIP 文件名同样取用户给出的题目文件原名(去掉扩展名)——如源文件为 2024北京中考数学.pdf 则命名为 2024北京中考数学.zip,保存到当前项目工作目录
  9. 上传到项目资产:打包完成后,立即调用 present_files 工具将该 .zip 直接上传 / 展示到项目资产中,使用户可在项目资产面板直接获取、下载、预览该压缩包(无需手动另行上传)
  10. 给出导入说明:向用户说明在「批量导入题目」页如何上传该 ZIP 并确认(操作要点见 references/zip-import-guide.md)

关键规则

  • 知识点列默认留空:每道题的「知识点」列默认不填,方便用户后续自行批注;仅当用户明确提供知识点映射(如"第1-3题:函数")时,才按映射填入对应题
  • 来源列标明题号:采用「出处·题号」格式,如「2024北京中考·第3题」——前半部分写题目出处说明,后半部分写该题在原文档中的原始题号(如「第3题」「1.(2)」「(3)」),便于溯源到原卷位置
  • 解析列必须填写:每道题的『解析』都需填写(复合题大题行除外),采用 Markdown + KaTeX 格式;源文档有解析则提取并格式化,无则据答案给出简要解析,切勿留空
  • 题面不可为空:空的题面行在导入时会被跳过;科目字段也不可为空(无法判断时向用户确认)
  • 题型限定 6 种:选择题、多选题、填空题、判断题、复合题、其他
  • 复合题自动合并:相同「科目」的连续行若使用同一「序号」(如两行都是 1),则自动合并为一道复合题——首行(大题行)题型写「复合题」且只放公共材料/题干,后续行各写小题并在各自「题面」填完整小题题目
  • 填空题支持一题多空:多个空的答案用分号(;)分隔写入『答案』列,空数须等于答案按分号拆分段数且等于题面填空标记数,三者一致;汇总答案即各空答案拼接,下游系统据此逐空展示、逐空判分
  • 配图只裁剪题目自带插图:紧贴图形边界,不带整页 / 大段空白 / 其他题目内容;二维码、logo、校徽、水印、装饰图等无关图不截;图片按「序号」命名(Q.png 题面、Q_ans.png 解析、Q_A~D.png 选项、冲突加「科目_」前缀、复合小题用 Q_sN),并在对应字段用图片语法引用(路径指向 题目图片/ 目录)
  • 所有文本字段 Markdown + KaTeX:不要使用纯文本或其他 LaTeX 变体;KaTeX 不支持 \begin{align},用 \begin{aligned} 替代

资源

  • references/xlsx-format-spec.md:完整 13 列格式规范、复合题规则、题目图片命名规则、配图裁剪与归档规范、KaTeX 语法示例(执行复杂导入前加载参考)
  • references/zip-import-guide.md:「批量导入题目」页上传 ZIP 的操作说明
  • scripts/generate_quiz_xlsx.py:生成 XLSX 的 Python 脚本(基于 openpyxl,知识点默认留空、来源采用「出处·题号」)

Current listing version

1.0.2

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决用户将试卷/题库素材转化为可导入错题本/题库系统的 ZIP 包的明确需求
  • 功能闭环完整,支持多格式输入(PDF、DOCX、图片、TXT)
  • 适用于教育、学习辅助等高频刚需场景
Trigger Precision90/100

Highlights

  • 触发词覆盖合理(转换题目、生成XLSX、批量导入等)
  • 边界清晰,description 内容完整且位置正确
Structure and Standards95/100

Highlights

  • Phase/步骤清晰(10步流程),有出口条件
  • 含端到端示例,frontmatter 完整
  • 单文件未超500行
Execution Reliability88/100

Highlights

  • 工具来源明确(Read、present_files),参数正确
  • 覆盖主要异常(图片裁剪准确性检查、复合题处理)
  • 不可逆操作有确认机制(上传前核对)
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.