VERBATIM SOURCE
SKILL.md
skill://flora-skills/root/.codex/skills/oai/answers-learning/SKILL.md
---
name: answers-learning
description: "Use when the user explicitly requests flashcards, an objective multiple-choice knowledge quiz, or pronunciation help and an interactive learning widget would improve the answer."
---
# Learning widgets
## `learning_flashcards`
Create a new interactive front/back flashcard deck when the user explicitly requests flashcards. Do not create a deck for requests to "quiz me" or "test me" unless the user asks to use flashcards. Provide a localized title and 1–100 new cards. Generate 10 cards unless the user explicitly specifies a card count, such as "one card" or "5 cards." Treat "a flashcard" as an unspecified count and generate 10 cards. Honor the requested source, topic, difficulty, and language. Aim for 100 characters per question and answer; never exceed 120 characters or five lines. For new decks, provide the title and card content, and set locale_override when the response language differs from the user's default locale. Do not provide card or Library IDs; the system assigns them. Use open_learning_flashcards for an existing deck and update_learning_flashcards to add, edit, delete, or merge saved decks.
Invocation:
// Insert directly:
genui{"learning_flashcards": {"title": {...}, "cards": {...}}}
// This widget is not eligible for UUID Mode.
Example:
genui{"learning_flashcards":{"title":"Photosynthesis flashcards","cards":[{"front":"What process lets plants produce food using sunlight?","back":"Photosynthesis."},{"front":"Which pigment absorbs light for photosynthesis?","back":"Chlorophyll."}]}}
Args schema:
```text
// LearningFlashcardsWidgetData
{
// Title
title: string, // minLength: 1, maxLength: 120
// Cards
//
// One to one hundred newly generated flashcards for a new deck, each with a concise question and answer; aim for 100 characters, with at most 120 characters and five lines.
// minItems: 1, maxItems: 100
cards: Array<
// NewFlashcard
{
// Front
//
// Concise question, term, or prompt shown on the front of the flashcard; aim for 100 characters; maximum 120 characters and five lines.
front: string, // minLength: 1, maxLength: 120
// Back
//
// Concise, accurate answer or explanation shown on the back of the flashcard; aim for 100 characters; maximum 120 characters and five lines.
back: string, // minLength: 1, maxLength: 120
}
>,
// Sets a locale overriding the locale from the user's default locale: $USER_LOCALE. You MUST set this if the language in which you will respond to the user's query doesn't match $USER_LOCALE.
locale_override?: string,
}
```
## `open_learning_flashcards`
Open an existing owner-authorized interactive flashcard deck without changing it. Use the real library_file_id from hidden flashcard deck identity, an attached deck, or Files search metadata. Provide card_ids to choose candidate cards in their supplied order, or omit them to consider the full deck. Use review_mode ordered (default) to preserve that order, smart only when the user requests spaced-repetition prioritization, or shuffle only when the user requests random cards. Apply limit after ordering, ranking, or shuffling; omit it to show every selected candidate. Never pass a deck title or filename as an ID or reconstruct cards from conversation memory.
Invocation:
// Insert directly:
genui{"open_learning_flashcards": {"library_file_id": {...}}}
// This widget is not eligible for UUID Mode.
Example:
genui{"open_learning_flashcards":{"library_file_id":"libfile_biology"}}
Args schema:
```text
// _OpenLearningFlashcardsParameters
{
// Library File Id
//
// Real owner-authorized Library ID from a previous flashcard tool's hidden deck identity, an attached deck, or Files search metadata. Never guess an ID, pass a deck title or filename, or reconstruct saved cards from conversation memory.
library_file_id: string, // minLength: 1, pattern: /^(?:file-inline-)?libfile[_-].+$/
// Card Ids
//
// Optional unique, existing stable card IDs identifying candidate cards in the supplied order. Omit to consider the full deck; review_mode orders those candidates before limit.
// default: null
card_ids?:
// minItems: 1, maxItems: 100
| Array<
string // minLength: 1, maxLength: 128
>
| null
,
// Limit
//
// Optional maximum number of candidate cards to show after applying review_mode. Omit to show every selected candidate.
// default: null
limit?:
| integer // minimum: 1, maximum: 100
| null
,
// Review Mode
//
// Use ordered to preserve deck or supplied card order; smart to prioritize selected candidates using saved spaced-repetition review history; shuffle to randomize selected candidates. Apply limit after ordering, ranking, or shuffling.
review_mode?: "ordered" | "smart" | "shuffle", // default: "ordered"
// Sets a locale overriding the locale from the user's default locale: $USER_LOCALE. You MUST set this if the language in which you will respond to the user's query doesn't match $USER_LOCALE.
locale_override?: string,
}
```
## `update_learning_flashcards`
Update an existing owner-authorized interactive flashcard deck in place. Supply its real library_file_id from prior hidden flashcard deck identity, an attached deck, or Files search metadata, plus ordered add, edit, delete, or merge changes. Add generates new cards; edit or delete reuses an existing card_id; merge copies cards from another owned deck without modifying the source. Only delete cards with the user's explicit permission. Aim for 100 characters per new or edited question and answer; never exceed 120 characters or five lines. Preserve target identity and review progress; maximum 100 cards. Always display the complete updated deck in your response. Never reconstruct saved cards from conversation memory.
Invocation:
// Insert directly:
genui{"update_learning_flashcards": {"library_file_id": {...}, "changes": {...}}}
// This widget is not eligible for UUID Mode.
Example:
genui{"update_learning_flashcards":{"library_file_id":"libfile_biology","changes":[{"type":"add","cards":[{"front":"What carries genetic instructions?","back":"DNA."}]}]}}
Args schema:
```text
// _UpdateLearningFlashcardsParameters
{
// Library File Id
//
// Real owner-authorized Library ID from a previous flashcard tool's hidden deck identity, an attached deck, or Files search metadata. Never guess an ID, pass a deck title or filename, or reconstruct saved cards from conversation memory.
library_file_id: string, // minLength: 1, pattern: /^(?:file-inline-)?libfile[_-].+$/
// Changes
// minItems: 1, maxItems: 100
changes: Array<
// AddCards
| {
// Type
type: "add",
// Cards
//
// New flashcards with concise questions and answers; aim for 100 characters, with at most 120 characters and five lines.
// minItems: 1, maxItems: 100
cards: Array<
// NewFlashcard
{
// Front
//
// Concise question, term, or prompt shown on the front of the flashcard; aim for 100 characters; maximum 120 characters and five lines.
front: string, // minLength: 1, maxLength: 120
// Back
//
// Concise, accurate answer or explanation shown on the back of the flashcard; aim for 100 characters; maximum 120 characters and five lines.
back: string, // minLength: 1, maxLength: 120
}
>,
}
// EditCard
| {
// Type
type: "edit",
// Card Id
card_id: string, // minLength: 1, maxLength: 128
// Front
//
// Replacement question or prompt; aim for 100 characters; maximum 120 characters and five lines.
// default: null
front?:
| string // minLength: 1, maxLength: 120
| null
,
// Back
//
// Replacement answer or explanation; aim for 100 characters; maximum 120 characters and five lines.
// default: null
back?:
| string // minLength: 1, maxLength: 120
| null
,
}
// DeleteCard
| {
// Type
type: "delete",
// Card Id
//
// Existing card ID the user explicitly authorized deleting.
card_id: string, // minLength: 1, maxLength: 128
}
// MergeDeck
| {
// Type
type: "merge",
// Source Library File Id
source_library_file_id: string, // minLength: 1, pattern: /^(?:file-inline-)?libfile[_-].+$/
}
>,
// Sets a locale overriding the locale from the user's default locale: $USER_LOCALE. You MUST set this if the language in which you will respond to the user's query doesn't match $USER_LOCALE.
locale_override?: string,
}
```
## `learning_quiz`
Render an interactive quiz only when the user explicitly requests an
objective, single-answer multiple-choice knowledge quiz. Do not use this for
flashcards, personality or career assessments, subjective preferences,
multi-select or true/false questions, or unavailable source materials.
Honor the requested topic, language, available source, difficulty, and
question count, up to 20 questions. Each question needs exactly four options
ordered A, B, C, and D; exactly one defensible correctValues entry; a useful
nonspoiling hint; and accurate feedback for every option. Set nextQuizQuery
to a concrete follow-up preserving the requested subject and difficulty.
Invocation:
// Insert directly:
genui{"learning_quiz": {"title": {...}, "nextQuizQuery": {...}, "questions": {...}}}
// This widget is not eligible for UUID Mode.
Example:
genui{"learning_quiz":{"title":"European capitals","nextQuizQuery":"Give me another quiz about European capitals.","questions":[{"id":"q1","question":"What is the capital of France?","type":"single_select","correctValues":["B"],"hint":"Think of France's largest city and political center.","options":[{"value":"A","label":"Lyon","feedback":"Lyon is a major French city, not its capital."},{"value":"B","label":"Paris","feedback":"Paris is the capital of France."},{"value":"C","label":"Marseille","feedback":"Marseille is a French port city, not its capital."},{"value":"D","label":"Nice","feedback":"Nice is a French coastal city, not its capital."}]}]}}
Args schema:
```text
// LearningQuizWidgetData
{
// Title
//
// Short plain-text title in the user's language; no emoji.
title: string, // minLength: 1
// Nextquizquery
//
// Fresh unseen quiz in user's language preserving subject, difficulty, and style; carry forward explicitly requested hint preferences. Repeat the exact requested named subject, entities, scope, and restrictions; never replace them with adjacent topics. If count exceeded 20, request remainder capped at 20; afterward request 5.
nextQuizQuery: string, // minLength: 1
// Questions
//
// Math items: (1) derive the complete exact or explicitly approximate result; for linear systems, pick a solution; derive constants. (2) Solve the final problem independently; its result overrides intent. (3) Test each finite candidate in every original condition; compute both sides. (4) Emit only if exactly one option is the full result, others fail/incomplete, correctValues selects it, and feedback agrees; else rebuild; repeat 2–4. Verify no/multiple/infinite solutions. Use the user's language; avoid repeated problems and cross-item answer leaks. Markdown only in prompts/labels; hints/feedback plain text/Unicode, no links/code spans. Math Unicode, not LaTeX. Base follow-ups on explicit performance. Unless concepts/definitions are requested, use calculation/symbolic reasoning and mistake-based distractors.
// minItems: 1, maxItems: 20
questions: Array<
// LearningQuizV1Question
{
// Id
//
// Unique id, such as q1.
id: string, // minLength: 1, maxLength: 64
// Question
//
// Self-contained, accurate, unambiguous question with exactly one defensible answer; test reasoning, not wording tricks. Numeric answers must be exact unless the prompt states rounding or precision.
question: string, // minLength: 1
// Type
//
// Single-answer multiple-choice question.
type: "single_select",
// Options
//
// Four options ordered A, B, C, D. For math, independently solve the literal displayed problem first. Include that complete result exactly once; rebuild if absent or duplicated.
// minItems: 4, maxItems: 4
options: Array<
// LearningQuizOption
{
// Value
//
// Short option id, usually A–D.
value: string, // minLength: 1, maxLength: 8
// Label
//
// Answer without the option id. Use four distinct, plausible same-domain alternatives parallel in grammar, specificity, and visible length. Keep natural answer lengths comparable; never pad or cue correctness. Never pad, invent facts, or reveal correctness. No links/autolinked URLs or email; format URL/email answers as inline code.
label: string, // minLength: 1
// Feedback
//
// Plain text only; never use Markdown code spans, backticks, or links, including around HTML tags, CSS properties, and code identifiers. Every option must include non-empty feedback that begins directly with the explanation, never with a verdict such as 'Correct.' or 'Incorrect.' Do not include discarded attempts, doubt, or self-correction. Give one verified reason. For a correct equation or system candidate, compute both sides of every original equation; for a wrong one, show a failed equation or condition. If incomplete, name the omitted result. Exact answers require equality; approximations require the prompt's stated precision or tolerance, residual, and pass or fail. Explicitly establish or refute solution-count claims. Show only final consistent arithmetic; no unsupported equality.
feedback: string, // minLength: 1
}
>,
// Correctvalues
//
// Value of the one correct option; set only after solving and validating the item.
correctValues: string[], // minItems: 1, maxItems: 1
// Hint
//
// Required and hidden until opened. Provide a concrete, question-specific clue that adds information beyond the question without revealing the answer.
hint: string, // minLength: 1
}
>,
// Sets a locale overriding the locale from the user's default locale: $USER_LOCALE. You MUST set this if the language in which you will respond to the user's query doesn't match $USER_LOCALE.
locale_override?: string,
}
```
## `pronunciation_block_widget_v4_audio_fix_v2`
Render an interactive pronunciation widget when the user explicitly asks how
a word or short phrase is pronounced. Do not replace a translation-only
request with a pronunciation widget or invent a requested recording.
Set content to the requested word or phrase and pronunciation_hint to a
clear, accurate phonetic hint. Include pronunciation_language as a BCP 47
language code and pronunciation_audio_text as the text that should be spoken
aloud when available.
Invocation:
// Insert directly:
genui{"pronunciation_block_widget_v4_audio_fix_v2": {"content": {...}, "pronunciation_hint": {...}, "pronunciation_audio_text": {...}, "pronunciation_language": {...}}}
// This widget is not eligible for UUID Mode.
Example:
genui{"pronunciation_block_widget_v4_audio_fix_v2":{"content":"gif","pronunciation_hint":"jif","pronunciation_audio_text":"jiff","pronunciation_language":"en"}}
Args schema:
```text
// PronunciationBlockWidgetParametersAudioFix
{
// Content
//
// Exact word or short phrase the user wants pronounced. Do not include surrounding instructions or explanation.
content: string,
// Pronunciation Hint
//
// Optional short human-readable sound-out cue shown in the inline badge and useful for playback, for example `jiff`, `giff`, `sequel`, `ess cue ell`, `red`, or `bohn-ZHOOR`. Make it TTS-pronounceable on its own: prefer natural respellings or letter-name phrases that sound correct if spoken aloud. For ambiguous words, acronyms, or symbols, do not copy the ambiguous surface text as the hint; choose an unambiguous respelling for the intended reading. Prefer a single respelling or cue phrase, not a sentence. If `pronunciation_language` is set, match that language or locale and avoid Englishized spellings, translations, or letter-name readings. Use answer text, not the badge hint, for variants, caveats, formulas, or articulation details. Do not wrap the hint in parentheses or add nested parenthetical asides.
pronunciation_hint?: string | null, // default: null
// Pronunciation Language
//
// Locale code expected for the pronunciation text, such as `en`, `fr`, or `fr-CA`. Set this when the language is clear, including `en` for English pronunciation requests.
pronunciation_language?: string | null, // default: null
// Source
//
// Internal render source token. Leave unset unless explicitly instructed.
source?: string | null, // default: null
// Pronunciation Audio Text
//
// Optional hidden text for playback only. Set this when a short direct TTS input would make audio more reliable than reading `content` with `pronunciation_hint`, while leaving `pronunciation_hint` optimized for the UI badge. The value must be ordinary TTS-readable text in `pronunciation_language`, such as words, letter-name phrases, or language-local orthography; do not use IPA, phonetic symbols, romanization, tone numbers, pronunciation diacritics, explanations, parenthetical cues, stress caps, or hyphenated badge cues. For English, prefer lowercase ASCII text such as `jiff`, `giff`, `reed`, or `base`, and do not use IPA-like characters such as `æ`, `ɪ`, `ə`, or `ʃ`. For Chinese, do not use pinyin as audio text. For phrases, keep the phrase shape and only respell the unreliable part. For soft-G GIF, use `jiff`; for hard-G GIF, use `giff`.
pronunciation_audio_text?: string | null, // default: null
}
```