question-bank-formatter
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "question-bank-formatter":https://skillpi.com/zh/skills/deepskill-7d6f161bed82c62857f136aac62b0973511767361dca9f3eeb5cb6a0aa5f545f。安装前核对上游来源和版本:https://skillhub.cn/skills/user_97acf6d1/question-bank-formatter。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
试题库格式化工具。将原始题目文本转换为结构化 JSON 题库格式,支持单选、多选、判断和填空题,并自动映射章节与难度评级,输出与任意测验系统、学习管理系统或抽认卡应用兼容的格式。
介绍来源: third_party · user_97acf6d1 · 1.1.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- User provides question text and asks to "转换成题库" or "生成题库" User says "题库格式转换" or references the specific JSON output format User attaches a document with exam questions to be structured
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: question-bank-formatter
slug: question-bank-formatter
displayName: "题库格式化:原始题目 → 结构化 JSON(支持单选/多选/判断/填空)"
description: "Convert raw question text into structured JSON question bank format. Handles single-choice, multi-choice, true/false, and fill-in-the-blank questions with auto chapter mapping and difficulty rating. Framework-agnostic — output works with any quiz system, LMS, or flashcard app."
version: 1.0.0
author: Hermes Agent
license: MIT
platforms: [windows]
metadata:
hermes:
tags: [question-bank, json, exam, format-conversion, quiz]
related_skills: [textbook-learning, lab-assignment-implementation]Question Bank Formatter (题库格式化)
Convert raw question text (from textbooks, PDFs, or pasted content) into a strict JSON question bank format.
When to Use
- User provides question text and asks to "转换成题库" or "生成题库"
- User says "题库格式转换" or references the specific JSON output format
- User attaches a document with exam questions to be structured
Output JSON Format
{
"questions": [
{
"id": "subject.ch1.001",
"content": "题目内容(去掉末尾的括号或空格)",
"options": ["选项A文本", "选项B文本", "选项C文本", "选项D文本"],
"answer": "正确答案字母(单选如A,多选如BCD)",
"explanation": "解析(可为空字符串)",
"type": "single_choice",
"difficulty": 3,
"source": "来源书名或课程名",
"nodes": ["subject.ch1"],
"formulas": [],
"siblings": []
}
]
}
Type Rules
| JSON type field | CryptoForge DB type |
options | answer | Notes |
|---|---|---|---|---|
single_choice → |
choice |
各选项文本数组 | 单个字母如 "A" | 单选 |
multi_choice → |
choice |
各选项文本数组 | 字母组合如 "BCD" | 多选,字母必须按顺序排列 |
true_false → |
choice |
固定为 ["对", "错"] | "对" 或 "错" | 判断题 |
fill → |
fill |
单项数组如 ["响应"] | 填空答案文本 | 填空题 |
CRITICAL for CryptoForge import: The type field stored in the DB must be choice or fill, NOT single_choice/multi_choice/true_false. The import script handles this remapping automatically.
ID Format Rules
Pattern: subject.chapter.number
- Subject: lowercase abbreviation must match CryptoForge
nameMap(see Integration section). Verify before creating new subjects. - Chapter:
ch0(绪论),ch1-ch8+, or type suffix (tf,sc,mc,fill) for generic question banks - Number: three-digit zero-padded (
001,015,123)
Examples: marxism.ch1.001, cisa.ch3.015, computer_org.ch1.003, computer_org.ch9.fill.001
Chapter Mapping
Infer the chapter from question content:
- 绪论/导论 →
ch0 - 第一章 →
ch1 - 第二章 →
ch2 - 第三章 →
ch3 - 第四章 →
ch4 - 第五章 →
ch5 - 判断题无法判断 →
tf
If the source material uses domain-based structure (like CISA), map domains to chapters:
- Domain 1 → ch1
- Domain 2 → ch2
- etc.
Difficulty Rules
| Level | Value | Criteria |
|---|---|---|
| 简单 | 2 | Basic definition recall, straightforward fact questions |
| 中等 | 3 | Understanding and application, requires some reasoning |
| 较难 | 4 | Comprehensive analysis, multi-step reasoning, scenario-based |
Cleaning Rules
- Strip option prefixes: Remove leading letter labels like "A. ", "B、", "A)", "B."
- Trim whitespace: Remove leading/trailing spaces from options and content
- Sort multi-choice answers: "BD" not "DB", "ACD" not "CDA"
- Split true/false inline: If question text contains "对/错" at the end, separate it
- Remove trailing markers: Strip trailing parentheses, brackets, or spaces from content
- Skip invalid questions: If content or answer is missing, skip the question
Workflow
Step 1: Parse Source
- If from PDF/EPUB: use
pdf-deep-readingor EPUB extraction first - If pasted text: parse directly
Step 2: Identify Question Type
Look for:
A. ... B. ... C. ... D. ...with one correct →single_choiceA. ... B. ... C. ... D. ...with multiple correct →multi_choice- Statements ending with
对/错or√/×→true_false
Step 3: Determine Subject and Chapter
- Infer subject from the source (e.g., Marxism →
marxism, CISA →cisa) - Map question content to chapter using the chapter mapping rules
Step 4: Clean and Format
Apply all cleaning rules. Ensure:
- JSON is valid (no trailing commas, proper escaping)
- All required fields present: id, content, options, answer, explanation, type, difficulty, source, nodes, formulas, siblings
Step 5: Output
- Output raw JSON, NOT wrapped in markdown code blocks (```json)
- Save to file if user requests:
C:\Users\13657\Desktop\{name}_题库.json
Integration
| User Intent | Skill Chain |
|---|---|
| Feed book → generate questions | textbook-learning → question-bank-formatter |
| Pasted exam questions → format | question-bank-formatter directly |
| PDF of exam → format questions | pdf-deep-reading → question-bank-formatter |
| Translate English bank → Chinese | question-bank-formatter + model translation |
| Import into CryptoForge DB | question-bank-formatter → direct SQLite script (see below) |
CryptoForge DB Direct Import
For "导入到X科目" requests, use the direct SQLite import script not the HTTP API (which requires a file upload + confirm two-step). Full operational guide: references/cryptoforge-import.md. Template script: scripts/import_questions.js.
Mandatory rules:
- Subject prefix MUST match
nameMapinserver/index.js(e.g.,computer_orgnotcomp_org) — verify the map first - DB
typefield: usechoiceorfill(NOTsingle_choice/multi_choice/true_false) - sql.js is in-memory — direct
.dbfile writes are invisible to running server. You MUST restart the server after every import - After restart, verify with API:
curl http://localhost:8967/api/questions?subject=XXX&chapter=N - Before starting, check existing chapter count:
curl http://localhost:8967/api/questions?subject=XXX&limit=200to avoid duplicates
Server restart procedure:
# 1. Find PID
netstat -ano | grep 8967 | grep LISTENING
# 2. Kill
taskkill //F //PID <PID>
# 3. Start (use foreground timeout trick — background=true causes "stdin is not a tty")
cd C:/Users/13657/Desktop/cryptoforge && node start_server.js
# 4. Wait, then verify
sleep 3 && curl http://localhost:8967/api/health
Fill-in-the-blank (填空题) format for CryptoForge:
type:filloptions: single-element array with the answer, e.g.,["响应"]or multi-blank array["WCR", "MAR", "DAR", "0"]answer: comma-joined answer text, e.g.,"响应"or"WCR,MAR,DAR,0"- Short answer (简答题) also uses
type: fill
HTTP API fallback (only if import script unavailable): POST /api/import/upload (multipart file) → POST /api/import/confirm with {filePath, subject, chapter, overwrite}
Pitfalls
- Don't wrap in markdown code blocks — output raw JSON unless saving to file
- Multi-choice answer sorting — "BD" not "DB", use alphabetical order
- True/false must use Chinese — options are ["对", "错"], answer is "对" or "错"
- Don't change the chapter mapping mid-batch — use the same subject.chapter scheme throughout
- When book has domain structure (like CISA) — map Domain 1→ch1, Domain 2→ch2, etc., and note the mapping
- Don't lose the explanation — even if from the source material, carry it through
- Difficulty should be consistent within a batch — basic recall=2, applied=3, scenario/analysis=4
- EPUB HTML class variants — McGraw-Hill practice exam books use BOTH
class="ques"ANDclass="ques1"for question blocks in the answer section. Always search for both:<p class="ques[^"]*". Similarly, answer sections may usetick(correct) +check(incorrect explanation) instead of explicit answer letter markers. Seereferences/mcgraw-hill-epub-patterns.mdfor the full HTML structure. - Parse answers from the ANSWER section, not the Q section — for practice exam books, the answer section contains the most reliable correct-answer data (via
tickmarkers). The question section alone lacks answer data. - CTF/domain-heavy books can be imported as layered knowledge — map broad book parts to coarse chapter nodes first, then add finer subnodes from section headings so the database stays navigable without exploding node count.
- Keep source names user-facing — if the book title is long or noisy, use the concise display title in
source, but keep the full title in the generated file name when saving the bank. - For large EPUBs, extract a concise knowledge index first — chapter titles + key subtopics are often enough to drive question generation and node mapping without fully mirroring every paragraph.
- When importing into CryptoForge, preserve importable fields exactly —
optionsshould stay JSON-encoded text,nodes/formulas/siblingsarrays should be present, and novel node ids are created automatically fromnodesduring import. - Subject prefix must match existing nameMap — check
server/index.jsnameMapbefore inventing a new subject ID. Wrong prefix = questions land under an invisible subject (e.g.,comp_orgvscomputer_org). - Server restart is mandatory after direct DB writes — sql.js loads the
.dbfile into memory at startup. Writing the file from an external script while the server runs has zero effect until restart. Usenetstat -ano | grep 8967 | grep LISTENINGto find PID, thentaskkill //F //PID <PID>, thennode start_server.js. - Background mode fails for server startup — Hermes TUI
terminal(background=true)causes "stdin is not a tty" error with the CryptoForge Node.js server. Instead, use the foreground timeout trick: runnode start_server.jsas a foreground command with a short timeout. The server continues running in the background after the terminal call times out. - Deduplicate before import — Check existing questions via API (
curl http://localhost:8967/api/questions?subject=XXX&chapter=N&limit=200) before bulk-inserting. If the same chapter already has questions from a prior batch (e.g., old ID formatch9.q01vs newch9.sc.001), delete the old batch first to avoid duplicates showing up in the UI. - Fill-in-the-blank (填空题) import format — For CryptoForge:
typemust befill(notfill_blank),optionsshould be a single-element array or multi-blank array with the answer text,answeris the answer text (comma-joined for multi-blank). Short answer / 简答题 also usestype: fill. The import script does NOT shuffle fill question options (only shuffleschoicetype).
当前收录版本
1.1.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 解决教育、考试、学习场景中的核心需求,将原始题目文本转换为结构化JSON格式
- 支持单选、多选、判断、填空等多种题型,具有广泛的实用价值
- 框架无关设计,输出兼容任何测验系统、LMS或闪卡应用
亮点
- 触发词覆盖全面,包括'转换成题库'、'生成题库'、'题库格式转换'等多种表达
- 边界清晰,能够准确识别用户需要进行题库格式转换的场景
亮点
- 工作流程清晰划分为5个步骤,每个步骤都有详细说明
- 包含完整的JSON输出格式示例和类型规则说明
- frontmatter完整,版本、作者、许可证等信息齐全
待提升项
-
缺少输入验证说明 原报告严重程度:轻微
未详细说明对输入文本格式的验证机制和错误处理策略
改进建议:建议增加输入验证规则和异常处理机制,提高执行可靠性
亮点
- 提供了详细的清理规则和ID格式规范
- 包含CryptoForge数据库直接导入的完整操作指南
- 列出了18个常见陷阱和注意事项,提高执行成功率
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- localhost
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。