fluent-db-updater
БесплатноБез исполняемых скриптовНе проверенAtomically update all 6 Fluent learner databases (learner-profile, progress, mistakes, mastery, spaced-repetition, session-log) at session end by calling…
Об этом скилле
DB Updater
Overview
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.
When to Use
Load this skill whenever the tutor:
- Finishes a practice session and needs to persist results.
- Needs to add new vocabulary to the spaced-repetition queue.
- Needs to record new errors, review results, or mastery changes.
- Needs to bump
total_sessions,current_streak_days, ortotal_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).
Instructions
1. Call the script
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.
2. Fill the payload
Required fields
session_id— string, conventionsession-NNN. Usecomputed.next_session_idfromread-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.
3. Field notes
errors[]— one entry per distinct mistake this session. Collapse duplicates (samepattern_id) before sending;frequencyis 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 thefluent-sm2-calculatorskill. Mapping:quality = floor(score / 2).skill_scores[].correctcounts correct exercises, not a percentage. Accuracy is derived.confidenceinlearner-profile.skillsis 0–100 integer;accuracyinprogress-dbis 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 nestedsession_id; the script stamps the authoritative top-level one. A malformed entry (neither string nor object, or an object missing/emptymilestone) exits1with no files written. Each milestone becomes both asession-log.milestones[]record and alearner-profile.achievements[]entry.
4. Read before writing
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).
Examples
Example 1 — /fluent-review session with 5 items
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
Example 2 — /fluent-vocab session with a new word
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"
Установить fluent-db-updater в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл fluent-db-updater?
Atomically 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-db-updater?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fluent-db-updater запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic