/fluent:fluent-db-updaterfrom fluent
Atomically persists session results across 6 Fluent learner databases (learner-profile, progress, mistakes, mastery, spaced-repetition, session-log) via a single JSON payload to update-db.py. Use after any practice session to save errors, vocabulary, review results, and metadata.
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.
Every practice skill ends with a DB update. Instead of hand-editing 6 JSON files (error-prone, racy, easy to desync), pipe one JSON report to update-db.py. The script runs pre-write backups, validates the payload, applies all changes atomically via .tmp + fsync + rename, and rebuilds the spaced-repetition queue.
Load this skill whenever the tutor:
total_sessions, current_streak_days, or total_study_minutes.Skip this skill for read-only operations (use the fluent-progress skill or read-db.py directly) and during session setup (use fluent-setup skill instead — update-db.py is for session deltas, not bootstrap).
Run from the repo root:
python3 "${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.claude/hooks/update-db.py" <<'EOF'
{ ...payload... }
EOF
Exit codes: 0 success, 1 validation error, 2 I/O error.
Required fields
session_id — string, convention session-NNN. Use computed.next_session_id from read-db.py.date — YYYY-MM-DD.Optional fields — omit to skip. Full canonical example (copy-paste this and fill in):
${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.claude/references/db-updater-payload.example.json
Key blocks the example covers: skill_scores, errors[], new_vocabulary[], review_results[], topics_covered, breakthroughs, focus_next_session, session_notes, achievements_earned, milestones.
errors[] — one entry per distinct mistake this session. Collapse duplicates (same pattern_id) before sending; frequency is bumped by the script.new_vocabulary[] — items the learner met for the first time. Fill every field; incomplete entries yield incomplete spaced-repetition records.review_results[] — items already in the queue that were reviewed. The script runs SM-2 on each. See the fluent-sm2-calculator skill. Mapping: quality = floor(score / 2).skill_scores[].correct counts correct exercises, not a percentage. Accuracy is derived.confidence in learner-profile.skills is 0–100 integer; accuracy in progress-db is 0.0–1.0 float. The script handles the conversion.milestones[] — each entry is a bare string OR an object { "milestone": <required non-empty string>, "date": <optional YYYY-MM-DD, defaults to the session date> }. Don't set a nested session_id; the script stamps the authoritative top-level one. A malformed entry (neither string nor object, or an object missing/empty milestone) exits 1 with no files written. Each milestone becomes both a session-log.milestones[] record and a learner-profile.achievements[] entry.Always call read-db.py at session start to get current state + next_session_id. Don't read each JSON file separately:
python3 "${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.claude/hooks/read-db.py"
Returns all 6 databases plus computed fields (due_reviews_count, next_session_id, streak_active, days_since_last_session).
python3 "${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.claude/hooks/update-db.py" <<'EOF'
{
"session_id": "session-012",
"date": "2026-04-24",
"duration_minutes": 12,
"command_used": "/fluent-review",
"skills_practiced": ["vocabulary", "grammar"],
"skill_scores": {
"vocabulary": { "exercises": 3, "correct": 3, "time_minutes": 7 },
"grammar": { "exercises": 2, "correct": 1, "time_minutes": 5 }
},
"review_results": [
{ "item_id": "vocab_huis", "quality": 5 },
{ "item_id": "vocab_deur", "quality": 4 },
{ "item_id": "vocab_raam", "quality": 5 },
{ "item_id": "grammar_omdat_word_order", "quality": 2 },
{ "item_id": "grammar_past_tense", "quality": 4 }
],
"errors": [
{
"pattern_id": "grammar_omdat_word_order",
"category": "grammar",
"your_answer": "omdat ik ben moe",
"correct_answer": "omdat ik moe ben",
"context": "subordinate clause word order",
"severity": "critical"
}
],
"focus_next_session": ["Drill 'omdat' word order"]
}
EOF
python3 "${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.claude/hooks/update-db.py" <<'EOF'
{
"session_id": "session-013",
"date": "2026-04-25",
"command_used": "/fluent-vocab",
"skills_practiced": ["vocabulary"],
"new_vocabulary": [
{
"item_id": "vocab_keuken",
"item_type": "vocabulary",
"content": "de keuken",
"answer": "the kitchen",
"category": "household_rooms",
"difficulty": "A1",
"initial_quality": 4,
"priority": "medium"
}
]
}
EOF
spaced-repetition.review_queue. It's regenerated from scratch on every run.session_id replaces. Sending the same ID again replaces the earlier record instead of counting the session twice, so retrying after a failure or resending a corrected payload is safe. This only works for the most recent session; for an older one the script exits 1 without changing anything. A new session always needs a new ID..backups/pre-update-<session_id>/ before any change. Check there to roll back.Six interdependent JSON files must agree: a new session-log entry, a bumped total_sessions, updated SM-2 params, new mistake patterns, recalculated accuracy, refreshed streak. Hand-editing causes silent desync — streak says 7 days but session-log has 6 entries, mastery says 4 stars but accuracy says 45%. The script is the single source of truth.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub m98/fluent --plugin fluent12 skills in this plugin
/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-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./fluent-reviewRun today's spaced-repetition review queue — items scheduled by SM-2 that need reinforcement before the learner forgets them. Triggered only when the learner types /fluent-review. Pulls due items from spaced-repetition.review_queue.today, generates a targeted exercise for each, evaluates the response, updates SM-2 parameters, and reshelves items into the correct future queue./fluent-session-analyzerParse Fluent `/results/*.md` session files to extract error patterns, strengths, accuracy trends, and focus areas for the next session. Use when the tutor needs to analyze the learner's recent performance — planning the next lesson, recommending focus areas, or answering "what should I practice next?".Other plugins' skills for the same job