Skill Forge 试卷生成工具。支持 AI 生成和 JSON 导入。
此 Skill 提供为 Skill Forge 系统 生成试卷内容 的工具。它直接写入共享数据库,但不管理运行环境。
从 JSON 文件导入试卷:
# 标准导入
node scripts/import_quiz.js <JSON文件路径>
# 示例
node scripts/import_quiz.js ./quiz_template.json
参考项目中的 quiz_template.json 文件:
{
"topic": "主题名称",
"topic_detail": "详细描述(可选)",
"difficulty": "beginner|intermediate|advanced",
"questions": [
{
"content": "题目内容",
"type": "choice|essay|code",
"options": ["A. 选项1", "B. 选项2"],
"correct_answer": "正确答案",
"explanation": "解析",
"knowledge_points": ["知识点1"],
"score": 10
}
]
}
当用户请求"生成试卷"或"创建测验"时,Agent 必须遵循以下流程:
参数确认:主动询问并确认以下 4 个关键参数:
beginner (初级), intermediate (中级), 或 advanced (高级)。ai_generated) 完全由模型根据知识库生成。manual) 基于用户提供的文档或文本。search_web 工具搜索相关资料,可细分为:official_doc): 技术官网、规范文档。community): StackOverflow, GitHub, 技术博客。interview): LeetCode, 牛客网, 面经网站。exam): 认证考试、学术试题。exam): 认证考试、学术试题。source_type 字段。choice: 单项选择题multiple_choice: 多项选择题essay: 问答/简答题code: 编程题(支持代码高亮)内容生成:
quiz_template.json 格式的 JSON 数据。questions 数组中,应为每个问题设置 source_type(如 ai_generated 或 official_doc)。写入与导入:
temp_quiz_<timestamp>.json)。node scripts/import_quiz.js <temp_file> 导入数据库。反馈:
http://localhost:3457)以便用户开始测验。当用户提供现成的 JSON 文件进行导入时:
quiz_template.json 的结构(必须包含 topic 和 questions 数组)。node scripts/import_quiz.js <filepath>。node scripts/import_quiz.js <path_to_json>node scripts/import_quiz.js --help~/.skill-forge/skill-forge.db 已由 skill-forge-base 初始化。