wanikani-sync
Sync WaniKani Japanese learning progress data from the API to local storage for analysis and insights. Use when the user wants to backup their WaniKani progress, generate statistics about their learning, analyze review patterns, track level progression, or access their WaniKani data offline. Handles incremental sync to minimize API calls and stores data in SQLite for easy querying.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/mart1n-xyz/wanikani-syncWaniKani Sync
Sync your WaniKani progress data locally for analysis and insights generation.
Overview
This skill provides tools to fetch your WaniKani learning progress via the API and store it locally in SQLite. Once synced, you (or other services) can query the data to generate statistics, track learning patterns, visualize progress, and more.
Getting Your API Token
- Log into WaniKani
- Go to Settings → API Tokens
- Generate a new token (or use existing one)
- Copy the token (looks like a long alphanumeric string)
Security Note: Keep your token private. Never commit it to git or share it publicly.
Quick Start
Sync All Data
# Using environment variable (recommended)
export WANIKANI_API_TOKEN="your-token-here"
python3 scripts/sync.py
# Or pass token directly (less secure)
python3 scripts/sync.py --token "your-token-here"
# Store in specific directory
python3 scripts/sync.py --data-dir ~/wanikani-data
Sync Specific Data
# Only user info
python3 scripts/sync.py --user-only
# Only assignments (your progress on subjects)
python3 scripts/sync.py --assignments-only
# Only reviews
python3 scripts/sync.py --reviews-only
Force Full Sync
By default, the script does incremental sync (only fetching data updated since last sync). To force a full refresh:
python3 scripts/sync.py --full
Database Schema
The sync creates a wanikani.db SQLite database with these tables:
user
Your account info including level, subscription status, and start date.
assignments
Your progress on each subject (radicals, kanji, vocabulary). Tracks SRS stage, unlock/start/pass/burn timestamps.
level_progressions
Your journey through WaniKani levels with unlock/start/pass/completion timestamps.
reviews
Your review history with correctness counts and SRS stage changes.
review_statistics
Aggregated statistics per subject (correct/incorrect counts, streaks, percentages).
resets
Account reset history.
subjects
The actual learning content (kanji, vocabulary, radicals) with characters, meanings, readings, and mnemonics.
Sync subjects with:
# Sync all subjects (can be large!)
python3 scripts/sync.py --subjects-only
# Sync only specific levels (recommended)
python3 scripts/sync.py --with-subjects --subject-levels 1,2,3,4,5
# Include subjects in full sync
python3 scripts/sync.py --with-subjects
sync_meta
Internal table tracking last sync timestamps for incremental updates.
Common Queries
-- Current SRS stage distribution
SELECT srs_stage, COUNT(*) FROM assignments GROUP BY srs_stage;
-- Items burned per level
SELECT level, COUNT(*) FROM assignments WHERE burned_at IS NOT NULL GROUP BY level;
-- Average accuracy by subject type
SELECT subject_type, AVG(percentage_correct) FROM review_statistics GROUP BY subject_type;
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-mart1n-xyz-wanikani-sync": {
"enabled": true,
"auto_update": true
}
}
}