fluent-sm2-calculator

fluent-sm2-calculator is a skill for Claude Code from m98/fluent. It costs 81 tokens per session (1,303 once invoked), scanned A, original, MIT.

A reference for the SM-2 spaced-repetition algorithm, a set of rules for deciding when a learner should review an item again. It defines how scores become review quality ratings and how intervals and mastery data change.

In plain words
What is it for?
Use it when grading a vocabulary, grammar, or mistake review and calculating its next due date, interval, repetitions, or mastery level.
Why use it?
It keeps review scheduling consistent after each answered question. This avoids different practice sessions applying different rules to the same learner data.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT variable. Also seen: reads .claude/ paths.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the fluent plugin — 12 skills, 4 hooks shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add m98/fluent
Claude Code
/plugin install fluent

Made for: Claude Code.

Or install fluent, the plugin that ships this one along with the rest of its 12 skills, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fluent-sm2-calculator

README.md
[![agentmods](https://agentmods.dev/badge/skills/m98/fluent/fluent-sm2-calculator.svg)](https://agentmods.dev/skills/m98/fluent/fluent-sm2-calculator)
Your own site
<a href="https://agentmods.dev/skills/m98/fluent/fluent-sm2-calculator"><img src="https://agentmods.dev/badge/skills/m98/fluent/fluent-sm2-calculator.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,303 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.01303
Opus 5 $0.00041 $0.00651
Sonnet 5 $0.00016 $0.00261
Haiku 4.5 $0.00008 $0.00130

Measured 6d ago against content hash d615ad4e7fb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

fluent-sm2-calculator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/fluent-sm2-calculator/SKILL.md · 134 lines

How it starts

The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SM-2 Calculator

Overview

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.

When to Use

Load this skill whenever the tutor:

  • Grades a review-queue item and must compute its next due date.
  • Maps a 0-10 score to an SM-2 quality.
  • Updates easiness_factor, interval_days, repetitions, or mastery_level on a spaced-repetition item.
  • Decides which queue (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.

Instructions

1. Convert score to quality

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).

2. Update interval

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

3. Update easiness factor

Apply after every answer:

EF_new = EF + (0.1 - (5 - quality) * (0.08 + (5 - quality) * 0.02))
EF_new = max(1.3, EF_new)

4. Update mastery level

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

Read the full file on GitHub · 134 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 134 lines · 81 tokens per session scan A d615ad4e7fb6

Subscribe to this mod's changes

fluent-sm2-calculator is a skill published in the GitHub repository m98/fluent (393 stars, last pushed 2mo ago), licensed MIT. It adds 81 tokens to every session and 1,303 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories