knowledge-quiz-game
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 "knowledge-quiz-game" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-75e16d8330076abdaf029890f6aec0eae048f5e20d057f419319ccf5ba7738d6. Verify the upstream source and version against https://skillhub.cn/skills/user_8af78a14/yl-01 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
Knowledge quiz game generator (single-file HTML): produces a zero-dependency single-file HTML quiz game with seven modes—question bank browsing, timed quiz, challenge stages, learning mode, mistake book, favorites, and history ranking; parses question-bank text (single-choice / multiple-choice / true-false), includes adaptive difficulty and combo scoring, and uses localStorage for data persistence.
Introduction source: third_party · user_8af78a14 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: knowledge-quiz-game
description: |
生成多功能知识问答游戏 HTML(单文件,零依赖)。支持 7 大模式:题库浏览、限时答题、闯关挑战赛、学习模式、错题本、收藏夹、历史排名。自动解析题库文本(单选/多选/判断),内置自适应难度、连击积分、localStorage 持久化。
触发场景:用户要求制作知识问答游戏、答题闯关 HTML、题库测试网页、竞答小程序时使用。
关键词:知识问答、答题游戏、闯关、题库、quiz、trivia、竞答、答题 HTML。知识问答游戏生成器
生成单文件、零依赖的多功能知识问答 HTML 游戏。
核心能力
- 单选 / 多选 / 判断 三种题型自动识别
- 7 大功能模式(题库浏览、限时答题、闯关挑战、学习模式、错题本、收藏、排名)
- 自适应难度(错题 3 倍权重出现)
- 连击积分系统(3 连 1.5x / 5 连 2x / 7 连 3x)
- localStorage 持久化(成绩、错题、收藏、做题记录)
- 响应式设计(手机/桌面自适应)
- 纯 vanilla JS,无任何外部依赖
工作流程
1. 收集题库
向用户索要题库内容,或根据用户指定的主题自动生成题目。题库使用纯文本格式:
1. 题目文本?
A、选项A内容
B、选项B内容
C、选项C内容
D、选项D内容
正确答案:D
解析:解析说明文本
2. 判断题:地球是太阳系中最大的行星吗?
对
错
正确答案:错
解析:木星才是太阳系中最大的行星。
格式规则详见 references/question-format.md。
2. 编码题库
将题库文本编码为 Base64,嵌入 HTML 模板。使用脚本自动完成:
python scripts/encode_questions.py input.txt
输出 Base64 字符串,填入模板的 RAW_B64 变量。
3. 生成 HTML
基于 assets/quiz-template.html 模板生成最终文件:
- 复制模板到目标路径
- 替换
RAW_B64为编码后的题库 - 自定义以下内容:
<title>标签:游戏标题.nav-title文本:导航栏标题.home-header h1文本:首页大标题.subtitle文本:副标题- 底部版权文本
- CSS 变量/渐变色:调整主题配色(可选)
4. 自定义主题配色
模板使用 CSS 渐变色定义主题。修改以下 CSS 值即可换肤:
/* 背景渐变 */
body { background: linear-gradient(135deg, #0a0a2e 0%, #1a1a4e 50%, #0d0d35 100%); }
/* 主色调(金橙渐变) */
background: linear-gradient(135deg, #ffd700, #ff8c00);
/* 强调色 */
color: #ffd700; /* 金色文字 */
常见配色方案:
- 太空蓝金(默认):
#0a0a2e+#ffd700/#ff8c00 - 森林绿:
#0a2e1a+#00ff88/#00c853 - 深海蓝:
#001a33+#00bfff/#1e90ff - 暗夜紫:
#1a0a2e+#bb86fc/#7c3aed - 暖橘红:
#2e1a0a+#ff6b6b/#ff8c00
题库文本格式速查
| 题型 | 格式示例 | 答案行 |
|---|---|---|
| 单选 | A、xxx B、xxx C、xxx D、xxx |
正确答案:D |
| 多选 | A、xxx B、xxx C、xxx D、xxx |
正确答案:ABD 或 正确答案:A、B、D |
| 判断 | 对 / 错(或 正确/错误、√/×) |
正确答案:对 或 正确答案:√ |
每题必须包含:题号 + 题干 + 选项 + 答案行。解析行可选。题与题之间空行分隔。
详见 references/question-format.md。
文件结构
knowledge-quiz-game/
├── SKILL.md # 本文件
├── assets/
│ └── quiz-template.html # 完整 HTML 模板(7 大模式全功能)
├── references/
│ └── question-format.md # 题库文本格式详细文档
└── scripts/
└── encode_questions.py # 题库编码工具
使用示例
用户说:"帮我做一个古诗词知识问答游戏"
- 生成 20-50 道古诗词题目(单选为主,穿插判断和多选)
- 按题库文本格式编写
- 运行
encode_questions.py编码 - 复制模板,填入编码后的题库
- 修改标题为"古诗词知识问答",调整配色为森林绿
- 输出最终 HTML 文件
注意事项
- 单文件输出,所有 CSS/JS 内联,无需服务器即可运行
- localStorage 按 origin 隔离,不同文件路径数据独立
- 题库 Base64 编码仅用于压缩嵌入,非加密
- 模板已内置 XSS 防护(
escHtml函数转义所有用户内容) - 移动端适配已内置(600px 断点)
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 支持 7 大功能模式(题库浏览、限时答题、闯关挑战、学习模式、错题本、收藏、排名)
- 内置自适应难度与连击积分系统,提升用户参与度
- 单文件零依赖设计,无需服务器即可运行,部署简单
Highlights
- 触发词覆盖全面(知识问答、答题游戏、闯关、题库、quiz、trivia、竞答、答题 HTML)
- 边界清晰,无明显歧义或重叠风险
Areas to improve
-
缺少 When to Use 章节 Reported severity: Minor
文档未明确设置 When to Use 章节,影响用户快速理解适用场景
Recommendation: 在 frontmatter 后添加 When to Use 章节,简要说明典型使用场景
-
文档过长 Reported severity: Minor
SKILL.md 内容约 600 行,超出建议长度
Recommendation: 考虑将部分详细说明(如配色方案、格式速查)移至 references 目录下的独立文档
Highlights
- Phase/步骤划分清晰(收集题库→编码题库→生成 HTML→自定义主题)
- 包含端到端使用示例,便于用户理解执行流程
Highlights
- 工具来源明确(encode_questions.py、quiz-template.html),参数正确
- 内置 XSS 防护(escHtml 函数转义用户内容)
- 响应式设计已覆盖移动端适配(600px 断点)
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.
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.
User discussion
No verified reviews yet.