fluent-db-updater
Skill0 starsChanged 2 months agoMITView on GitHub
Persist a practice session's results — errors, review results, new vocabulary, session metadata — by piping one JSON payload to update-db.py. Use at the end of every practice session.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- m98/fluentedited, first seen Jun 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- m98/fluent★ 42030% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- fluent-feedback-formatterSkill
- fluent-fsrs-referenceSkill
- fluent-learnSkill
- fluent-progressSkill
- fluent-readingSkill
- fluent-reviewSkill
- fluent-session-analyzerSkill
- fluent-setupSkill
- fluent-speakingSkill
- fluent-vocabSkill
- fluent-writingSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Every practice skill ends by piping one JSON report to update-db.py, which backs up, validates the payload, applies all six databases …
- Very specific: line 22
Call read-db.py at session start for current state and next_session_id.
- Very specific: line 69
One
session_id, one run: Every run adds to running totals, so update-db.py exits 1, writing nothing, on a session_id already in the …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
DB Updater
Overview
Every practice skill ends by piping one JSON report to update-db.py, which backs up, validates the payload, applies all six databases atomically (.tmp + fsync + rename) and rebuilds the spaced-repetition queue.
When to Use
Load this skill when a practice session ends and its results (errors, review results, new vocabulary, totals) need persisting.
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. Read state
Call read-db.py at session start for current state and next_session_id; one call replaces reading each JSON file:
python3 "${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.claude/hooks/read-db.py"It returns all 6 databases plus computed fields (due_reviews_count, next_session_id, streak_active).
2. Fill the payload
Required fields
session_id— string, conventionsession-NNN. Usecomputed.next_session_idfromread-db.py.date— today, as the output ofdate +%Frun while you build the payload. A resumed session still remembers the day it started; the shell knows the day it is saved.update-db.pyrejects any other day with exit1.
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.jsonKey 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 staged this session. Collapse duplicates (samepattern_id) before sending;frequencyis bumped by the script.categorycomes from the canon influent-feedback-formatter§"Use these category labels" —update-db.pyrejects any other value.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; stage each result as the session runs. The script reschedules each via FSRS-6 — see thefluent-fsrs-referenceskill for how a score becomes a due date.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 non-empty string. The object form ({ "milestone": ..., "date": ... }) was removed after v0.3.0 and now exits1, naming the offending index, with no files written. Every milestone is dated with the top-leveldateand stamped with the top-levelsession_id. Each becomes both asession-log.milestones[]record and alearner-profile.achievements[]entry.allow_backdate—truewhen the learner asks you to record a session from an earlier day, such as one whose save failed.datemay then name any day from the last recorded session up to yesterday, and the record carries nomeasured_minutes, because the prompt clock holds only today. A date error meansdateis wrong: rerundate +%F.
4. Call the script
python3 "${CLAUDE_PLUGIN_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.claude/hooks/update-db.py" <<'EOF'
{ ...payload... }
EOFExit codes: 0 success, 1 validation error, 2 I/O error. On 1 or 2 no files are touched — fix the payload, or clear the disk-space/permission problem, and retry.
Critical Rules
- Call once, at session end. The script rebuilds the review queue each run — partial updates risk inconsistency.
review_queueis regenerated on every run; feedreview_results[]and leave the queue itself alone.- One
session_id, one run. Every run adds to running totals, soupdate-db.pyexits1, writing nothing, on asession_idalready in the session log. On a retry, that exit means the first run landed. - Backups are automatic. Before any change the script copies the six databases to
<data_dir>/.backups/pre-update-<session_id>/(fluent_paths.pyprints<data_dir>). When the learner asks to correct the last saved session, copy that folder's*.jsonfiles back into<data_dir>, then send the corrected payload under the samesession_id. The copy rolls back every session saved after it too, so this corrects the most recent session only.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

