Validate JLPT grammar question JSON files produced by jlpt-n5-grammer-essential-grammer-question-creator. Use this skill when the user asks to test, validate, check, or verify JLPT grammar questions in JSON format. Checks three things: (1) schema/format correctness of all fields, (2) correctAnswer is a valid 0-based index within options, (3) question level is n5. Trigger on requests like soruları test et, validate questions, JSON dogrula, check grammar questions, or after generating questions with the creator skill.
Validate JLPT N5 grammar question JSON using scripts/validate.py.
# From a file
python3 <skill_dir>/scripts/validate.py <path/to/questions.json>
# From stdin (JSON in context)
python3 <skill_dir>/scripts/validate.py --stdin <<'EOF'
{ ...json... }
EOF
options[correctAnswer] into the blank ( ).furigana field has correct readings for all kanji.| Check | Rule |
|---|---|
id format | Must match n5_essential_grammar_XXX (zero-padded sequential number) |
level | Must be "n5" |
type | Must be "sentenceCompletion" |
sentence | Must contain blank marker ( ) |
furigana | Must contain at least one <ruby>…<rt>…</rt></ruby> tag |
blankPosition | Must be a positive integer (≥ 1) |
options | Must be an array of exactly 4 non-empty strings |
correctAnswer | Must be an integer 0–3 |
The script prints a report with ✅ PASS or ❌ FAIL per question and a summary line.
Exit code 0 = all passed, 1 = one or more failed.
After running, if the script passes proceed to linguistic review. If it fails, summarize failures so the user knows what to fix.