零门槛快速生成评分测验
简介
RooQuiz 官方技能,无需账户/API 密钥即可创建带评分功能的在线测验预览链接,适合快速测试、分享和验证测验设计。
原始描述
Create a shareable RooQuiz preview quiz — a right/wrong assessment where correct answers earn points and the taker gets a score — and get a link to open in the browser. No account, login, or API key required. Use this when someone wants to build, try out, or share a graded quiz, test, trivia, or exa
通过你的 Agent 添加
安装目录:preview-quiz/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
preview-quiz 是一个用于快速创建**评分测验(Quiz)**的 Agent Skill,通过向 RooQuiz 的公共预览端点发送 HTTP POST 请求,即可在秒级获得一个可浏览器打开、有效期约 1 小时的临时预览链接。整个流程无需注册账户、登录系统或配置 API 密钥,极大地降低了测验创建的门槛。
该技能专属于"quiz"场景——即有对错答案的评分测验,每道题目设置正确答案和对应分值,系统自动累加得分并按预设等级(levels)展示最终结果。与之配套的还有 preview-scorecard(无对错、累加得分的问卷)和 preview-outcome(无分数、按类型匹配的人格测试)两个技能,用户需根据实际场景选择对应技能。
创建流程简洁明确:首先按规范构建包含题目、选项、正确答案、分值配置及结果等级映射的 JSON 结构;然后向 https://preview.rooquiz.com/api/preview-forms 发送 POST 请求;最后从返回数据中提取 publicToken 组装成预览链接 https://quizster.app/b/{token} 交付用户。支持通过环境变量覆盖默认端点以适配私有化部署。
显著优点
- 零门槛接入:完全匿名,无账户、无密钥、无登录,任何能发起 HTTP 请求的环境均可使用,特别适合快速原型验证和临时分享场景。
- 专业评分体系:内置完整的计分逻辑,支持单选、多选、填空、判断等多种题型,可配置精确匹配得分或部分得分,并能自定义结果等级(如 Beginner/Intermediate/Expert)和视觉主题。
- 丰富的视觉主题:提供 14 种精心设计的主题(如 corporate、synthwave、valentine、halloween 等),涵盖商务、科技、浪漫、节日等多种氛围,支持随机选择以增强趣味性。
- 即时预览反馈:创建后立即获得可分享的浏览器链接,便于团队协作、用户测试和设计迭代,1 小时的临时有效期在保障安全的同时满足短期使用需求。
潜在缺点与局限性
- 临时性限制:预览链接仅存活约 1 小时,无法永久保存;如需长期使用,必须重新创建或在 RooQuiz 平台正式发布,不适合需要持久化存档的场景。
- 匿名速率限制:单个 IP 每小时仅能创建约 10 个预览,高频批量生成会触发限制,大规模应用需考虑正式发布方案。
- 严格的格式校验:JSON 结构有多处硬性约束——字段命名(
choices 非 options)、code 格式(合法标识符、禁用保留字如 e/pi)、levels 边界规则等,初次使用容易因细节失误导致 400 错误。
- 无后端存储:作为纯预览功能,所有计算在浏览器端完成,无法收集和分析用户答题数据,也不支持历史记录查询。
适合的目标群体
- 教育工作者与培训师:快速制作课堂测验、知识考核,即时分享给学生验证教学效果。
- 产品经理与运营人员:设计用户调研、趣味测试,通过预览快速迭代题目和 UI 呈现。
- 内容创作者与营销团队:创建社交媒体互动测验、节日主题活动,利用丰富主题打造品牌调性。
- 开发者与测试工程师:在集成 RooQuiz 正式 API 前,用于验证测验 JSON 结构和评分逻辑的正确性。
使用风险与注意事项
- 依赖外部服务可用性:完全依赖 RooQuiz 云服务的
preview.rooquiz.com 和 quizster.app 域名,若服务端故障或网络不通,功能将不可用;私有化部署可降低此风险但增加运维成本。
- 数据安全与隐私:虽无需认证,但测验内容(含正确答案)以明文形式存在于生成的链接中,敏感考核内容不建议使用预览模式;未设置
secret 的链接可被任意访问,设置后虽增强安全性但增加分享复杂度。
- 版本兼容性:技能文档基于特定版本的 RooQuiz API 结构,未来服务端若更新字段校验规则(如新增必填项、调整主题列表),可能导致现有 JSON 失效,需关注官方更新。
- 性能考量:复杂测验(大量图片、多页题目)在浏览器端渲染时可能出现加载延迟,建议控制题目数量和媒体资源大小。
- 临时性限制:预览链接仅存活约 1 小时,无法永久保存;如需长期使用,必须重新创建或在 RooQuiz 平台正式发布,不适合需要持久化存档的场景。
- 匿名速率限制:单个 IP 每小时仅能创建约 10 个预览,高频批量生成会触发限制,大规模应用需考虑正式发布方案。
- 严格的格式校验:JSON 结构有多处硬性约束——字段命名(
choices非options)、code 格式(合法标识符、禁用保留字如e/pi)、levels 边界规则等,初次使用容易因细节失误导致 400 错误。 - 无后端存储:作为纯预览功能,所有计算在浏览器端完成,无法收集和分析用户答题数据,也不支持历史记录查询。
适合的目标群体
- 教育工作者与培训师:快速制作课堂测验、知识考核,即时分享给学生验证教学效果。
- 产品经理与运营人员:设计用户调研、趣味测试,通过预览快速迭代题目和 UI 呈现。
- 内容创作者与营销团队:创建社交媒体互动测验、节日主题活动,利用丰富主题打造品牌调性。
- 开发者与测试工程师:在集成 RooQuiz 正式 API 前,用于验证测验 JSON 结构和评分逻辑的正确性。
使用风险与注意事项
- 依赖外部服务可用性:完全依赖 RooQuiz 云服务的
preview.rooquiz.com 和 quizster.app 域名,若服务端故障或网络不通,功能将不可用;私有化部署可降低此风险但增加运维成本。
- 数据安全与隐私:虽无需认证,但测验内容(含正确答案)以明文形式存在于生成的链接中,敏感考核内容不建议使用预览模式;未设置
secret 的链接可被任意访问,设置后虽增强安全性但增加分享复杂度。
- 版本兼容性:技能文档基于特定版本的 RooQuiz API 结构,未来服务端若更新字段校验规则(如新增必填项、调整主题列表),可能导致现有 JSON 失效,需关注官方更新。
- 性能考量:复杂测验(大量图片、多页题目)在浏览器端渲染时可能出现加载延迟,建议控制题目数量和媒体资源大小。
- 依赖外部服务可用性:完全依赖 RooQuiz 云服务的
preview.rooquiz.com和quizster.app域名,若服务端故障或网络不通,功能将不可用;私有化部署可降低此风险但增加运维成本。 - 数据安全与隐私:虽无需认证,但测验内容(含正确答案)以明文形式存在于生成的链接中,敏感考核内容不建议使用预览模式;未设置
secret的链接可被任意访问,设置后虽增强安全性但增加分享复杂度。 - 版本兼容性:技能文档基于特定版本的 RooQuiz API 结构,未来服务端若更新字段校验规则(如新增必填项、调整主题列表),可能导致现有 JSON 失效,需关注官方更新。
- 性能考量:复杂测验(大量图片、多页题目)在浏览器端渲染时可能出现加载延迟,建议控制题目数量和媒体资源大小。
技能正文
name: preview-quiz
description: Create a shareable RooQuiz preview quiz — a right/wrong assessment where correct answers earn points and the taker gets a score — and get a link to open in the browser. No account, login, or API key required. Use this when someone wants to build, try out, or share a graded quiz, test, trivia, or exam with correct answers and a final score. For a scored questionnaire where every option adds points, use the preview-scorecard skill; for a personality/type test with no right answers, use the preview-outcome skill.
Create a RooQuiz Preview Quiz
POST a quiz as JSON to RooQuiz's open preview endpoint and instantly get a short-lived (~1 hour), browser-openable preview link. The creation endpoint is public (access.create => true), so this needs no account, login, API key, or credentials — anything that can make an HTTP request can use it.
A quiz (scene: "quiz") is a right/wrong assessment: each scored question carries a correct answer and earns points; the total is the sum of earned points, then bucketed into levels on the results page. It produces a temporary preview, not a permanently published form — the link expires automatically (recreate the quiz in RooQuiz if you need to keep it).
Two sibling skills cover the other assessment types — pick the one that matches:
- preview-scorecard — a scored questionnaire where each option adds points toward a total + level (no "correct" answer).
- preview-outcome — a personality / type test where options vote for result types and the most-voted type wins (no right answers).
Three steps
- Build the quiz JSON (structure below).
- Create it:
POST {PREVIEW_BASE}/api/preview-forms with the JSON as the body and header Content-Type: application/json. Returns { doc: { publicToken, expiresAt }, message }.
- Hand back the link:
{QUIZ_BASE}/b/{publicToken} (append ?secret={secret} only if you set a secret when creating).
Endpoints
POST {PREVIEW_BASE}/api/preview-forms with the JSON as the body and header Content-Type: application/json. Returns { doc: { publicToken, expiresAt }, message }.{QUIZ_BASE}/b/{publicToken} (append ?secret={secret} only if you set a secret when creating).| Default (RooQuiz cloud) | Override env var | |
|---|---|---|
PREVIEW_BASE (create) |
https://preview.rooquiz.com |
ROOQUIZ_PREVIEW_BASE |
QUIZ_BASE (open preview) |
https://quizster.app |
ROOQUIZ_QUIZ_BASE |
Override the env vars only when targeting a self-hosted RooQuiz deployment; otherwise the defaults work as-is.
Create it
Send one HTTP request. There is no auth — Content-Type: application/json is the only required header. Use whatever HTTP client your environment has (an agent's built-in fetch/HTTP tool, curl, requests, fetch, Postman, …):
POST https://preview.rooquiz.com/api/preview-forms
Content-Type: application/json
<the quiz JSON as the raw request body>
For example, with curl (write the JSON to a file first, or inline it with --data):
curl -sS -X POST https://preview.rooquiz.com/api/preview-forms \
-H 'Content-Type: application/json' \
--data-binary @/tmp/preview-form.json
The response is JSON shaped like:
{ "doc": { "publicToken": "7k3m9q2p", "expiresAt": "2026-06-16T09:12:00.000Z" }, "message": "..." }
Read doc.publicToken and build the preview link to hand the user:
https://quizster.app/b/<publicToken>
If you set a secret in the JSON, append ?secret=<secret> to that link. For a self-hosted RooQuiz, swap the two hosts for your deployment's preview-API and quiz hosts (see the endpoints table above).
Quiz JSON — top level
{
"scene": "quiz", // required & fixed for this skill. Sets allowed question types and scoring. Cannot change after creation.
"title": "My Quiz", // required
"description": "Optional intro",
"language": "en_US", // form language; default zh_CN. See "language values" in Notes.
"personalized": { // appearance; omit to use defaults (light theme)
"key": "default",
"theme": { "name": "light" }
},
"indexDisplayMode": "number", // question numbering: none (default) | number | uppercase | roman
"fields": [ /* questions — see "Question types" and "Scoring" */ ],
"report": { /* results page — see "Report configuration" */ },
"secret": "optional; if set, the preview link must include ?secret="
}
{
"scene": "quiz", // required & fixed for this skill. Sets allowed question types and scoring. Cannot change after creation.
"title": "My Quiz", // required
"description": "Optional intro",
"language": "en_US", // form language; default zh_CN. See "language values" in Notes.
"personalized": { // appearance; omit to use defaults (light theme)
"key": "default",
"theme": { "name": "light" }
},
"indexDisplayMode": "number", // question numbering: none (default) | number | uppercase | roman
"fields": [ /* questions — see "Question types" and "Scoring" */ ],
"report": { /* results page — see "Report configuration" */ },
"secret": "optional; if set, the preview link must include ?secret="
}
Key points:
- Every question needs a unique
code(string); optioncodes must be unique within their question. Acodemust be a valid identifier — start with a letter or_, then only letters/digits/_(no-, spaces, or leading digit), max 64 chars, and not a reserved math word (e,E,pi,PI,tau,phi,i,Infinity,NaN,true,false,null,undefined). The server rejects violations with HTTP 400. nameis the question text;descriptionis optional helper text.- Unknown top-level fields are silently ignored by the server (no error).
secret: omit it for a clean link that works with just the token (tokens are random 8-char and expire in ~1 hour — fine for previews). Set it to make the token unguessable, at the cost of requiring?secret=on the link. Default: omit.
Themes
personalized.theme.name sets the visual theme. Omit theme to default to light. Set it as "personalized": { "key": "default", "theme": { "name": "synthwave" } }. There is no personalized.layout — card is the only answering layout. (The per-field layout (list/grid) is a different thing and still valid.)
Pick a theme that fits the quiz's topic/mood. To use a random theme — when the user asks for one, wants variety, or has no preference — just choose a random name from this list when building the JSON (there's no server-side "random" option). Recommended quiz palette:
| name | vibe / good for |
|---|---|
light |
clean neutral bright; default, formal/general quizzes |
corporate |
professional blue+gray; B2B, career, business |
dark |
modern sleek dark; tech, night, cool personality quizzes |
cupcake |
soft pink, cute, rounded; fun, food, kids, lighthearted |
pastel |
gentle pastel artsy; lifestyle, aesthetics, soft mood |
valentine |
pink romantic hearts; love, relationships, holidays |
synthwave |
neon purple/pink retro; gaming, trends, bold personality |
luxury |
dark + gold premium; finance, luxury, high-end |
forest |
deep green nature; environment, health, outdoors |
coffee |
warm brown cozy; food & drink, cafe, lifestyle |
autumn |
warm orange/brown seasonal; autumn, cozy, harvest |
halloween |
purple + orange spooky; Halloween, horror, festive |
night |
deep calm blue; astronomy, mindfulness, calm tech |
cyberpunk |
high-contrast neon yellow; tech, esports, gaming |
The full daisyUI theme set also renders (e.g. emerald, dracula, retro, nord, sunset, winter, lofi, garden, aqua, business, lemonade, dim, bumblebee, acid, fantasy, wireframe, black, cmyk) — the table above is just the recommended quiz palette. The server doesn't validate the name, so a typo silently falls back to default styling rather than erroring.
Question types
Each field is { type, code, name, ... }. In a quiz you can use:
- Choice (carry
choices: [{ code, value }], wherevalueis the option label):SingleCheck(single),MultiCheck(multiple; optionalmin/max),DropDown,Cascade,Ordering,TrueFalse(no choices) - Input:
FillBlank(optionalmultiline),NumberField,DateField(needsprecision),TimeField - Display only (never scored):
Statement(content),Breaker(page break / divider),Swiper(image carousel,items)
Rate is not allowed in a quiz (it's a scorecard type). Optional shared props on any field: required, description, explain, hidden, activeColor (primary/secondary/accent/neutral), layout (list/grid).
Scoring
Add correctAnswer + exactScoring to each scored question:
"correctAnswer": "b",
"exactScoring": { "mode": "exactMatch", "score": 10 }
correctAnswer value depends on the question type: single choice = the correct option's code (string); multiple/ordering = array of codes; fill-in = string; true/false = boolean.
Optional partial credit: exactScoring.accuracy + extraLevels, or partialScoring on choice questions (using partialScoring requires exactScoring too). Display-only fields (Statement/Breaker/Swiper) are never scored — leave scoring off them.
Report configuration
report.overallAnalysis is required. A quiz auto-sums earned points, so omit formula — just map the total to levels.
"report": {
"overallAnalysis": {
"title": "Your Score",
"summaryTemplate": "<p><art-field data-type=\"fieldVariable\" data-cid=\"score\"></art-field> pts · <art-field data-type=\"fieldVariable\" data-cid=\"level\"></art-field></p>",
"levels": [ // map total score → level (see strict rules below)
{ "minScore": null, "maxScore": 10, "label": "Beginner" },
{ "minScore": 10, "maxScore": 20, "label": "Intermediate" },
{ "minScore": 20, "maxScore": null, "label": "Expert", "description": "Top tier!" }
]
}
}
Strict levels rules (violations return HTTP 400): the first level's minScore must be null (−∞); the last level's maxScore must be null (+∞); middle levels have finite numbers on both ends; for adjacent levels current.minScore === previous.maxScore; maxScore strictly increases down the array. A single level has null on both ends.
Levels may carry a cta (results-page button): { enabled, type: "link", text, url, newWindow }. When enabled, text and url are required, and url must be an http/https link. summaryTemplate defaults to a built-in template if omitted.
Common mistakes
These wrong patterns get reached for out of habit; the server rejects them with HTTP 400. The formats above are correct — match them exactly.
- Option lists are
choices, neveroptions. Every choice question uses"choices": [{ "code": "a", "value": "Label" }]. There is nooptionskey. - Codes must be valid identifiers, not arbitrary text — no hyphens (
type-a), spaces, or leading digits (1q), and not reserved math words. Watch out for 5+ options codeda,b,c,d,e:e(Euler's number) is reserved and rejected — useo1, o2, …or another non-reserved identifier. - Scoring is field-level, not nested inside each choice.
correctAnswerandexactScoringsit next tochoiceson the field, not on an individual option. - Don't set a
formulafor a quiz — quizzes auto-sum earned points.formulais a scorecard thing; including it here is unnecessary (use the preview-scorecard skill if you actually want a custom total). report.overallAnalysisis required — give it at least atitleand a validlevelsarray.
Complete example
The personalized.theme.name is matched to the topic (see Themes above) — swap in any other name, or pick one at random.
{
"scene": "quiz",
"title": "World Capitals Quiz",
"language": "en_US",
"personalized": { "key": "default", "theme": { "name": "corporate" } },
"indexDisplayMode": "number",
"fields": [
{
"type": "SingleCheck", "code": "q1", "name": "Capital of France?", "required": true,
"choices": [
{ "code": "a", "value": "Berlin" },
{ "code": "b", "value": "Paris" },
{ "code": "c", "value": "Rome" }
],
"correctAnswer": "b",
"exactScoring": { "mode": "exactMatch", "score": 10 }
},
{
"type": "MultiCheck", "code": "q2", "name": "Which are in Asia?", "required": true,
"choices": [
{ "code": "a", "value": "Japan" },
{ "code": "b", "value": "Brazil" },
{ "code": "c", "value": "Thailand" }
],
"correctAnswer": ["a", "c"],
"exactScoring": { "mode": "exactMatch", "score": 10 }
}
],
"report": {
"overallAnalysis": {
"title": "Your Score",
"summaryTemplate": "<p><art-field data-type=\"fieldVariable\" data-cid=\"score\"></art-field> pts · <art-field data-type=\"fieldVariable\" data-cid=\"level\"></art-field></p>",
"levels": [
{ "minScore": null, "maxScore": 10, "label": "Novice" },
{ "minScore": 10, "maxScore": 20, "label": "Good" },
{ "minScore": 20, "maxScore": null, "label": "Perfect" }
]
}
}
}
Notes & limits
- Expiry: previews self-destruct after about 1 hour (
expiresAt); the link 404s afterward. Recreate the quiz in RooQuiz to keep it permanently.
- Rate limit: anonymous creation is capped at about 10 previews per hour per IP.
- Validation errors: a 400 response includes
errors[].path and message — fix the JSON and retry. Most common: a question type or scoring style that doesn't match scene: "quiz", or non-contiguous levels.
- Results page looks empty? This is a preview (no submission backend); results are computed in the browser from the returned questions +
report. Make sure report.overallAnalysis exists and scored questions carry correctAnswer + exactScoring.
language values: en_US de_DE es pt_BR fr zh_CN (default) zh_TW ja_JP ko_KR.
expiresAt); the link 404s afterward. Recreate the quiz in RooQuiz to keep it permanently.errors[].path and message — fix the JSON and retry. Most common: a question type or scoring style that doesn't match scene: "quiz", or non-contiguous levels.report. Make sure report.overallAnalysis exists and scored questions carry correctAnswer + exactScoring.language values: en_US de_DE es pt_BR fr zh_CN (default) zh_TW ja_JP ko_KR.正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。