/fluent:fluent-sm2-calculatorfrom fluent
Implements the SM-2 spaced-repetition algorithm for the Fluent language learning system. Computes next review dates, easiness factor, and mastery levels after each answered question.
Ships in fluent. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Fluent uses SM-2 (SuperMemo 2) to decide when the learner next sees an item. This skill is the single source of truth for the algorithm. Every practice skill updates <data_dir>/spaced-repetition.json (where <data_dir> is resolved by fluent_paths.data_dir()) through these rules after each answered question.
Load this skill whenever the tutor:
easiness_factor, interval_days, repetitions, or mastery_level on a spaced-repetition item.today / tomorrow / this_week / later) to place an item in.Skip this skill when the fluent-db-updater skill is already being used — the update-db.py script runs SM-2 internally.
| Score | Quality | Meaning |
|---|---|---|
| 10/10 | 5 | Perfect, instant recall |
| 8-9 | 4 | Correct after hesitation |
| 6-7 | 3 | Correct with difficulty |
| 4-5 | 2 | Incorrect but remembered when shown |
| 2-3 | 1 | Incorrect, familiar |
| 0-1 | 0 | Complete blackout |
Rule: quality = floor(score / 2).
if quality >= 3: # correct
if repetitions == 0:
interval = 1
elif repetitions == 1:
interval = 6
else:
interval = round(previous_interval * easiness_factor)
repetitions += 1
else: # incorrect
interval = 1
repetitions = 0
Apply after every answer:
EF_new = EF + (0.1 - (5 - quality) * (0.08 + (5 - quality) * 0.02))
EF_new = max(1.3, EF_new)
Track consecutive_correct and consecutive_incorrect per item:
if consecutive_correct >= 5:
mastery_level = min(5, mastery_level + 1)
consecutive_correct = 0
elif consecutive_incorrect >= 3:
mastery_level = max(0, mastery_level - 1)
consecutive_incorrect = 0
After each answer, the item in spaced-repetition.json must have:
easiness_factor — updated via formulainterval_days — new intervalrepetitions — incremented or resetconsecutive_correct / consecutive_incorrect — one incremented, the other resettotal_reviews — incrementedmastery_level — possibly changeddue_date — today + interval_days (YYYY-MM-DD)last_reviewed — todayAfter updating:
interval_days == 1 → review_queue.tomorrowinterval_days <= 7 → review_queue.this_weekinterval_days > 7 → review_queue.laterIf the learner got it wrong (quality < 3), keep the item in review_queue.today so it reappears in the same session.
Do not hand-edit spaced-repetition.json. Call .claude/hooks/update-db.py with a review_results array — the script runs SM-2 atomically and rebuilds the queue. Only do manual math when the script is unavailable. See the fluent-db-updater skill for the payload schema.
python3 "${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.claude/hooks/update-db.py" <<'EOF'
{
"session_id": "session-NNN",
"date": "YYYY-MM-DD",
"review_results": [
{ "item_id": "vocab_huis", "quality": 4 }
]
}
EOF
See .claude/references/sm2-worked-examples.md for 4 worked examples covering: correct answer (regular case), wrong answer (reset + EF drop), 5th consecutive correct (mastery bump), 3rd consecutive wrong (mastery drop). Each example shows the full before/after state.
Quick version:
interval = round(prev * EF), repetitions += 1, EF barely moves.interval = 1, repetitions = 0, EF drops sharply, item stays in today's queue.update-db.py. Only reimplement this math when the script is unavailable.SM-2 reviews items just before the learner forgets them, maximizing long-term retention per minute of practice. Wrong scheduling means wasted reviews (too early) or forgotten items (too late). The whole Fluent system rests on these numbers being correct.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
spaced-repetition, sm-2, fluent, review-scheduling, algorithm
npx claudepluginhub mituso89/fluent --plugin fluent15 skills in this plugin
/fluent-db-updaterAtomically update all 6 Fluent learner databases (learner-profile, progress, mistakes, mastery, spaced-repetition, session-log) at session end by calling .claude/hooks/update-db.py with a single JSON payload. Use at the end of every practice session — fluent-writing, fluent-vocab, fluent-speaking, fluent-reading, fluent-review, fluent-learn — to persist the session's errors, review results, new vocabulary, and session metadata./fluent-feedback-formatterCanonical feedback template for every learner answer in the Fluent system — celebrate correct parts, correct mistakes with category and brief explanation, show the full correct version, score out of 10, and classify severity (🔴 critical / 🟡 moderate / 🟢 minor). Use in every practice session (fluent-writing, fluent-vocab, fluent-speaking, fluent-reading, fluent-review) immediately after the learner submits an answer./fluent-languageList, switch, and add languages for multi-language learners — each language gets its own isolated set of the 6 databases under data/<slug>/, tracked in data/languages.json. Triggered only when the learner types /fluent-language (list / switch <language> / add). Never auto-invoke — switching or adding changes which database directory every other skill reads from next./fluent-learnMain adaptive language-learning session that mixes skills (writing, speaking, vocabulary, reading) and exercise types based on the learner's current level, weak patterns, and due reviews. Triggered only when the learner types /fluent-learn. Greets the learner, shows today's plan, asks what to practice, runs interleaved exercises one at a time, and updates all databases at the end./fluent-progressShow the learner's language learning progress, statistics, mastery levels, streak, and achievements. Use when the learner asks "how am I doing", "show my progress", "stats", "dashboard", "what's my streak", "how many words have I learned", or invokes /fluent-progress. Read-only — safe to auto-invoke./fluent-readingRun an interactive reading comprehension session with a short target-language text followed by main-idea, detail, vocabulary-in-context, inference, and true/false questions. Triggered only when the learner types /fluent-reading. Presents the text, waits for the learner to read, then asks questions one at a time with immediate feedback, and optionally adds new vocabulary to the spaced-repetition queue.2 plugins ship this exact skill · first indexed Jun 9, 2026
Other plugins' skills for the same job