Create classroom lesson plans for EduBot teacher groups. Analyzes all students in a class, computes average mastery and skill distribution, then generates mixed-level lesson content with scaffolding for weaker students and challenges for stronger ones. Use this whenever: a teacher needs a lesson plan for their class, creating group activities, generating a daily quiz for a class, designing mixed-level exercises, or when someone mentions 'class lesson', 'group plan', 'teach this class', or 'quiz for my students'.
You create data-driven classroom lesson plans for EduBot teacher groups by analyzing every student's mastery data and generating activities that work for the entire class — scaffolding for strugglers, challenges for high-performers.
In a typical EduBot class, some students score 80%+ on articles while others are at 30%. A one-size-fits-all lesson bores half the class and loses the other half. This skill creates differentiated activities within a single lesson flow, so the teacher can run one session that benefits everyone.
-- Get class info
SELECT c.id, c.name, c.telegram_group_id, c.teacher_id, c.class_level
FROM classes c WHERE c.id = ?
-- Get all students
SELECT cm.user_id, u.name, u.proficiency_level
FROM class_members cm
JOIN users u ON cm.user_id = u.id
WHERE cm.class_id = ?
For the chosen topic, compute the distribution:
-- Per-student mastery for the topic
SELECT u.name, tm.mastery_level, tm.accuracy_percent, tm.exercises_attempted, tm.status
FROM topic_mastery tm
JOIN users u ON tm.user_id = u.id
WHERE tm.user_id IN (SELECT user_id FROM class_members WHERE class_id = ?)
AND tm.topic = ?
ORDER BY tm.mastery_level ASC
-- Class-wide section performance (last 14 days)
SELECT ta.user_id, u.name, aa.section,
COUNT(*) as total,
SUM(CASE WHEN aa.is_correct = 1 THEN 1 ELSE 0 END) as correct
FROM attempt_answers aa
JOIN test_attempts ta ON aa.attempt_id = ta.id
JOIN users u ON ta.user_id = u.id
WHERE ta.user_id IN (SELECT user_id FROM class_members WHERE class_id = ?)
AND aa.submitted_at >= datetime('now', '-14 days')
AND aa.is_correct IS NOT NULL
GROUP BY ta.user_id, aa.section
Group students into tiers based on the topic's mastery:
Report the distribution: "5 students in Tier A, 8 in Tier B, 3 in Tier C"
Build 5-7 steps that work for all tiers:
Structure:
Each step includes:
If the teacher wants a daily quiz:
-- Get 5 questions from the topic, mixed difficulty
SELECT id, section, content, question_type, difficulty
FROM test_contents
WHERE topic = ? AND status = 'published'
ORDER BY RANDOM() LIMIT 5
If not enough questions exist for that topic, generate new ones (see content-factory skill).
INSERT INTO lesson_plans (user_id, title, description, plan_type, target_skills, lessons, current_step, total_steps, status, difficulty_level, estimated_minutes, class_id)
VALUES (?, ?, ?, 'classroom', ?, ?, 0, ?, 'active', ?, ?, ?)
## Classroom Lesson: [Topic] — [Class Name]
**Students:** [count] | **Avg Mastery:** [X]% | **Est. time:** [X] min
### Class Distribution
- Tier A (Advanced): [names] — [count] students
- Tier B (Developing): [names] — [count] students
- Tier C (Needs Support): [names] — [count] students
### Lesson Flow
1. **Warm-up** (5 min)
[Actual questions with answers]
2. **Concept Review** (5 min)
[Explanation text]
Teacher note: [scaffolding instruction for Tier C]
3. **Guided Practice** (8 min)
Tier C: [easier exercise with hints]
Tier B: [standard exercise]
Tier A: [challenging exercise]
...
### Quiz Questions (for /dailyquiz)
1. [question] → [answer]
2. ...
### Homework Suggestions
- Tier C: [basic reinforcement task]
- Tier B: [application task]
- Tier A: [extension/challenge task]
These are the main topics in EduBot's curriculum:
articles, sv_agreement, tenses, prepositions, passive_voice, conditionals, relative_clauses, word_formation, academic_words, collocations, paraphrasing, linking_words, reading_main_idea, reading_strategy, listening_practice, listening_strategy, speaking_templates, writing_templates, pronunciation