fluent-db-updater
Atomically updates Fluent learning databases with session metrics.
Install
mkdir -p .claude/skills/fluent-db-updater && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11961" && unzip -o skill.zip -d .claude/skills/fluent-db-updater && rm skill.zipInstalls to .claude/skills/fluent-db-updater
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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.Key capabilities
- →Atomically update all six Fluent learner databases
- →Persist session results including errors, new vocabulary, and review results
- →Rebuild the spaced-repetition queue
- →Validate the JSON payload before applying changes
- →Run pre-write backups for all database files
How it works
The skill executes a Python script with a JSON payload, which performs pre-write backups, validates the payload, applies changes atomically, and rebuilds the spaced-repetition queue.
Inputs & outputs
When to use fluent-db-updater
- →Persist study session results
- →Update spaced-repetition metrics
- →Record session learning data
About this skill
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"
}
]
}
EOF
Critical Rules
- Call once per session, at the end. The script rebuilds the review queue each run — partial updates risk inconsistency.
- Never hand-edit
spaced-repetition.review_queue. It's regenerated from scratch on every run. - Same
session_idreplaces. Sending the same ID twice overwrites the first call. Useful for corrections, dangerous if unintentional. - Backups are automatic. Written to
.backups/pre-update-<session_id>/before any change. Check there to roll back. - Exit code 1 means validation failed, no files touched. Fix the payload and retry.
- Exit code 2 means I/O failure, no files touched. Check disk space, permissions, then retry.
Why This Matters
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.
When not to use it
- →For read-only operations on the databases
- →During session setup or bootstrap
- →When hand-editing individual JSON files for updates
Limitations
- →It must be called once per session, at the end.
- →It does not allow hand-editing of `spaced-repetition.review_queue`.
- →Sending the same `session_id` twice overwrites the first call.
How it compares
This skill provides an atomic, single-script update mechanism for multiple interdependent databases, preventing desynchronization and errors common with manual or piecemeal updates.
Compared to similar skills
fluent-db-updater side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| fluent-db-updater (this skill) | 0 | 1mo | Review | Intermediate |
| data-engineer | 3 | 4mo | No flags | Advanced |
| comparing-database-schemas | 1 | 27d | Review | Advanced |
| base | 0 | 3mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
data-engineer
sickn33
Build scalable data pipelines, modern data warehouses, and real-time streaming architectures. Implements Apache Spark, dbt, Airflow, and cloud-native data platforms. Use PROACTIVELY for data pipeline design, analytics infrastructure, or modern data stack implementation.
comparing-database-schemas
jeremylongshore
Process use when you need to work with schema comparison. This skill provides database schema diff and sync with comprehensive guidance and automation. Trigger with phrases like "compare schemas", "diff databases", or "sync database schemas".
base
Anhvu1107
ALWAYS use this when the request matches Base: Database management, forms, reports, and data operations with LibreOffice Base.
df-basic-stats
qmakescl
>
snowflake-semantic-views
MiguelElGallo
Create, alter, validate, audit, debug, and optimize Snowflake semantic views using Snowflake CLI (`snow`), SQL DDL, YAML semantic view specs, Cortex Analyst verified queries, and Snowflake validation procedures. Use when asked to build semantic views, troubleshoot CREATE/ALTER SEMANTIC VIEW or SYSTE
rfp_contents
yellowCornSalad
공고 카드의 콘텐츠 품질 점검 + LLM 자동 요약. 예산·기간 정확성, 본문 가독성, 키워드 매칭 정확성, 상세보기 가독성 5축 점검 + 카드에 본문+첨부 종합 150자 요약을 ai_summary 컬럼에 저장.