원클릭으로
gemini-ai
Gemini API integration for generating pedagogically-grounded game questions from lesson content
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Gemini API integration for generating pedagogically-grounded game questions from lesson content
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
File upload, parsing (PDF, PPTX, DOCX, ODT, HTML, MD), and Convex storage for lesson materials
Convex database schema, queries, mutations, actions, and real-time subscriptions for LessonPlay
Game state machine, lobby system, question flow, scoring, and real-time game coordination
shadcn/ui patterns, game UI components, responsive layouts for classroom use
| name | gemini-ai |
| description | Gemini API integration for generating pedagogically-grounded game questions from lesson content |
Handles the two-step AI generation pipeline — the core differentiator of LessonPlay. Gemini processes lesson content + learning objectives to produce (1) structured questions and (2) a self-contained HTML game that runs in a sandboxed iframe.
@google/genai npm package (GoogleGenAI class)import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({ apiKey });
const response = await ai.models.generateContent({ model, contents, config });
const text = response.text; // property, NOT a method
Use config.responseMimeType: "application/json" and config.responseSchema to enforce JSON structure. The SDK handles schema validation — no need to manually parse or hope for correct formatting.
| Objective Type | Preferred Question Types |
|---|---|
| Understand | Multiple choice (concept questions) |
| Explain | Multiple choice (why/how questions) |
| Apply | Multiple choice (scenario-based) |
| Distinguish | Categorization (sort into groups) |
| Perform | Ordering (sequence steps) |
| Analyze | Multiple choice + categorization |
Gemini calls MUST happen in a Convex action (not query or mutation). Use ctx.runMutation(internal.xxx.yyy, args) to store results in the database.
The generated HTML must:
<!DOCTYPE html> document with inline <style> and <script><meta name="viewport" content="width=device-width, initial-scale=1.0">Before storing, validate:
postMessage or port.postMessage codesrc= or href= pointing to other domainsconvex/generate.ts — Gemini API action (two-step: questions + HTML game)docs/PRD.md — Architecture and AI generation sections