Adaptive Learning
by @weishuz
Create adaptive learning flashcard apps from course materials (URLs, PDFs, or folders). Uses FSRS (Free Spaced Repetition Scheduler) and Bayesian Knowledge T...
clawhub install adaptive-learningπ About This Skill
name: adaptive-learning description: Create adaptive learning flashcard apps from course materials (URLs, PDFs, or folders). Uses FSRS (Free Spaced Repetition Scheduler) and Bayesian Knowledge Tracing for intelligent review scheduling. Use when asked to create study materials, flashcards, review apps, spaced repetition systems, or adaptive quizzes from course content. Triggers on "make me a study app", "create flashcards for this course", "adaptive learning", "spaced repetition", "review system for [course]".
Adaptive Learning Skill
Create self-contained, browser-based adaptive learning apps from any course material.
Architecture
file://, no server neededWorkflow
1. Gather Course Material
From a URL:
1. Fetch the course page, extract topic list and resource links
2. Download HW/Discussion/Lecture PDFs to ~/COURSE_NAME/
From a local folder:
1. List files, identify PDFs and documents
2. Read/parse to understand topics and content
2. Generate Question Bank
Create questions.json with this schema:
[{
"id": "unique-id",
"topic": "Topic Name",
"topicIndex": 0,
"difficulty": 1,
"question": "Supports $LaTeX$ via KaTeX",
"answer": "Supports $LaTeX$ and \\n for line breaks",
"tags": ["tag1", "tag2"]
}]
Guidelines:
$...$ inline, $$...$$ block) for math\\n for line breaks in question/answer texttopicIndex controls topic ordering (0-based)3. Build the App
Run the bundler script:
bash SKILL_DIR/scripts/generate-course.sh
Then register the course in engine.js COURSE_REGISTRY:
{ id: 'course-id', name: 'Course Name', desc: 'Description', school: 'School', term: 'Term' }
4. Verify
Open in a browser. Verify:
Framework Files (assets/framework/)
| File | Purpose |
|------|---------|
| index.html | Main page with course selector + learning UI |
| style.css | Dark theme, responsive styles |
| engine.js | FSRS + BKT engine, question selection, state management |
| ts-fsrs.umd.js | FSRS algorithm library (UMD build of ts-fsrs) |
Key Features
Adding to Existing Installation
To add a new course to an existing adaptive-learning setup at ~/adaptive-learning/:
1. Save questions.json to ~/adaptive-learning/courses/
2. Generate preload: bash scripts/generate-course.sh
3. Add to COURSE_REGISTRY in engine.js