When to use
Use this skill when:
- The user asks to create a lesson, course, syllabus, or curriculum
- The user asks to generate activities, exams, flashcards, or other course pages
- The user says "build lesson", "create course", "generate syllabus", etc.
Step 0: Check Backend Availability (ALWAYS RUN FIRST)
On every invocation, before asking any questions, run the shared backend-availability script and display its output to the user:
python scripts/backend_probes.py
This probes every backend the skill supports (node, tavily, notebooklm, flux, heygen, remotion, capcut, webm) and prints a status line per backend plus an "N/M backends available" summary. The script is the single source of truth for auth and availability checks — do not duplicate its logic in prose.
Downstream behavior based on the report:
- Research: if tavily+notebooklm both
OK→ Tavily→NotebookLM bridge; if only notebooklmOK→ plain NotebookLMsource add-research; if only tavilyOK→ Tavily standalone; if neither → Web Search fallback. - Images: if flux
SKIP→images.backendfalls back tooffregardless of config. - Video: each chosen
video.backendmust reportOK; otherwise warn and fall back tooff(the availability-check contract is in §Interactive Mode below).
If any backend reports SKIP and the user wants to enable it, see:
- NotebookLM auth troubleshooting → templates/notebooklm/query_patterns.md
- Tavily login / install → run
tvly login --api-key ...orcurl -fsSL https://cli.tavily.com/install.sh | bash - Replicate token → add
REPLICATE_API_TOKEN=r8_...to.env
Then proceed to interactive mode.
Interactive Mode — Ask Before Building
If the user invokes this skill without specifying all parameters, ASK:
-
Topic/Subject — "What topic should the course cover?" (e.g., "General English for beginners", "Business English", "English through IT skills")
-
Languages — "What is the learner's first language (L1) and target language (L2)?" (default: Thai → English)
-
Number of weeks/units — "How many units?" (default: 12)
-
Age group — "Who is this course for?"
- Children (4-7) — Audio-first, big visuals, tap/drag interactions, no reading required
- Older children (8-12) — Can read simple text, handle basic game rules
- Adults — Full text-based lessons with grammar explanations
-
Page types — "Which page types per unit?" Show options based on age group:
Adult page types:
- Lesson, Activities, Exam, Flashcards, Conversation, Pronunciation, Worksheet, Syllabus
Children's page types: See templates/children_pages/README.md for full list and specifications (Story, Game, Song, Coloring, Stickers, Flashcards, Reward, Avatar Video for ages 4-7; Comic, Quiz Show, Word Puzzle, Adventure, Journal, Video Lesson, Board Game, Reading for ages 8-12)
-
Output location — "Where should files go?" (default:
HTML/courses/{topic_slug}/) -
Color theme — "Any color preference?" (or auto-pick)
Backend choices group (Q8–Q10) — ask contiguously after Q7. Before showing each prompt, call the matching probe from scripts/backend_probes.py and display the availability result inline. If the operator picks a backend that the probe reports as unavailable, show a visible warning and record off — never silently accept an unavailable backend. The config file always reflects what was actually confirmed available.
-
Content-truth validation backend — probe availability first, then ask:
Content-truth validation backend? [tavily / notebooklm / off](default: off — no quota spend)tavily: cross-checks vocab cards, grammar boxes, and exam answers via Tavily Research CLI.notebooklm: queries the Phase-2 research notebook (ID stored in research.md).off: skip content-truth validation entirely — no quota consumed.- Records to
content_truth.backendin the course config.
-
Image generation backend — probe availability first, then ask:
Image generation backend? [flux / off](default: off)flux: generate images via Replicate (FLUX Dev model). RequiresREPLICATE_API_TOKENin env or.env. (Note: "FLUX" is the correct name — an earlier iteration of the spec used "FLEX" which was a typo.)off: no image generation.- Records to
images.backendin the course config.
-
Video generation backend — probe availability first, then ask:
Video generation backend? [heygen / remotion / capcut / webm / off](default: off)heygen: AI avatar video via HeyGen API. Costs approximately $2 per lesson video on the current plan — choose knowingly. Requires theheygenSSM parameter (AWS deploy profile).remotion: React-based video generation via thewatdonchan/ai-english-videoRemotion project. Free, requires Node + the project directory.capcut: prompt-to-human workflow — operator assembles video manually in CapCut. Always available; no runtime requirement.webm: NOT YET IMPLEMENTED — probe returns unavailable; will fall back tooffautomatically.off: no video generation.- Records to
video.backendin the course config. - Follow-up if not
off:Video max count (integer cap to prevent surprise spend)?→ records tovideo.max_count.
Course-creation backend choices — availability-check contract
Before each Q8/9/10 prompt, run the corresponding probe and show the result inline:
| Backend | Probe | On unavailable |
|---|---|---|
content_truth: tavily | probe_tavily() — tvly auth --json | warn, fall back to off |
content_truth: notebooklm | probe_notebooklm() — python -m notebooklm auth check --test --json | warn, fall back to off |
images: flux | probe_flux() — check `REPLICATE_API_ |