← Back to Skills Marketplace
mart1n-xyz

Bunpro

by mart1:n · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
634
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install bunpro-sync
Description
Sync Bunpro Japanese grammar learning progress from the API to local storage for analysis and insights. Use when the user wants to backup their Bunpro progre...
README (SKILL.md)

Bunpro Sync

Sync your Bunpro grammar learning progress locally for analysis and insights.

⚠️ Important: This uses a community-documented API. The official Bunpro API Key from settings does NOT work - you need the Frontend API Token from your browser.

Overview

This skill fetches your Japanese grammar progress from Bunpro and stores it in a local SQLite database. Track SRS stages, review forecasts, JLPT progress, and identify grammar leeches (items that keep falling back).

API Keys: The Two Different Tokens

Bunpro has two different API tokens that serve different purposes:

❌ DO NOT USE: "Official" API Key (from Settings)

  • Found at: bunpro.jp/settings/account
  • Looks like: d406663ff421af27c87caaa62eefdb7a (32 hex characters)
  • Does NOT work with the Frontend API endpoints this skill uses
  • Returns 401 Unauthorized errors

✅ USE THIS: Frontend API Token (from Browser)

  • Found in: Browser DevTools → Console or Application Storage
  • Looks like: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... (long JWT, 200+ chars)
  • This is what the skill requires
  • Expires periodically (you'll need to refresh it)

How to Get the Frontend API Token

Method 1: Console (Recommended)

  1. Go to bunpro.jp and log in
  2. Press F12 to open DevTools
  3. Click the Console tab
  4. Paste this JavaScript and press Enter:
    Object.fromEntries(
      new URLSearchParams(
        document.cookie.replace(/; /g, '&')
      )
    ).frontend_api_token
    
  5. Copy the long string that appears (starts with eyJ)

Method 2: Local Storage

  1. Go to bunpro.jp and log in
  2. Press F12 → Application tab (or Storage in Firefox)
  3. In the left sidebar, expand Local Storagehttps://bunpro.jp
  4. Look for token, authToken, or frontend_api_token
  5. Copy the value (starts with eyJ)

Method 3: Network Tab

  1. Go to bunpro.jp and log in
  2. Press F12 → Network tab
  3. Refresh the page
  4. Look for any API call (like /user or /queue)
  5. Click it → HeadersRequest Headers
  6. Find Authorization: Bearer eyJ...
  7. Copy the part after "Bearer "

⚠️ Token Expiry: The Frontend API Token expires eventually (days/weeks). When you get 401 errors, repeat the steps above to get a fresh token.

Quick Start

Sync All Data

# Using environment variable (recommended)
export BUNPRO_FRONTEND_API_TOKEN="eyJ0eXAiOiJKV1Qi..."
python3 scripts/sync.py

# Or pass token directly (less secure)
python3 scripts/sync.py --token "eyJ0eXAiOiJKV1Qi..."

# Store in specific directory
python3 scripts/sync.py --data-dir ~/bunpro-data

Sync Specific Data

# Only user info
python3 scripts/sync.py --user-only

# Only study queue
python3 scripts/sync.py --queue-only

# Only reviews
python3 scripts/sync.py --reviews-only

Force Full Sync

python3 scripts/sync.py --full

Database Schema

user

Your account info including level, XP, buncoin, lifetime status.

grammar_points

Grammar content including title, meaning, structure, JLPT level, unit/lesson.

reviews

Your SRS progress on each grammar point (stage, next review, burned status).

study_queue

Items scheduled for future review.

due_items

Items currently available for review (includes is_leech flag).

user_stats

Aggregated statistics (SRS overview, forecasts, JLPT progress, activity).

review_histories

Review session history (last session, last 24h).

sync_meta

Internal table tracking last sync timestamps.

Common Queries

-- Grammar mastery by JLPT level
SELECT jlpt_level, COUNT(*) as total,
       SUM(CASE WHEN burned = 1 THEN 1 ELSE 0 END) as burned
FROM reviews r
JOIN grammar_points g ON r.grammar_point_id = g.id
GROUP BY jlpt_level;

-- Upcoming reviews
SELECT DATE(next_review) as day, COUNT(*)
FROM reviews
WHERE next_review > datetime('now')
GROUP BY day
ORDER BY day
LIMIT 7;

-- Grammar leeches
SELECT g.title, g.meaning, d.streak, r.srs_stage_string
FROM due_items d
JOIN grammar_points g ON d.reviewable_id = g.id
LEFT JOIN reviews r ON d.reviewable_id = r.reviewable_id
WHERE d.is_leech = 1
ORDER BY d.streak ASC;

Query Tools

# Show SRS distribution
python3 scripts/queries.py srs

# Show upcoming review forecast
python3 scripts/queries.py forecast

# Show grammar mastery by JLPT level
python3 scripts/queries.py grammar --jlpt 5

# Show currently due reviews
python3 scripts/queries.py due

# Show grammar leeches
python3 scripts/queries.py leeches

# Show overall progress
python3 scripts/queries.py progress

# Show recent activity
python3 scripts/queries.py activity

API Notes

  • Base URL: https://api.bunpro.jp/api/frontend
  • Auth: Bearer JWT token from browser (not settings API key)
  • Rate limits: Unknown - be reasonable
  • Stability: Community-documented, may change without notice
  • Permission: Reverse-engineered with permission from Bunpro team

Troubleshooting

401 Unauthorized:

  • Token expired (get fresh one from browser)
  • Using wrong token type (need Frontend API Token, not settings API key)
  • Token format should be JWT (eyJ0eXAi...)

500 Server Error:

Empty data:

  • You're in vacation mode (check bunpro.jp)
  • No reviews done yet
  • Different endpoint structure than expected

References

Files

  • scripts/sync.py - Main sync tool with CLI
  • scripts/queries.py - Query helper with common reports
  • references/api-structure.md - Bunpro API reference
Usage Guidance
This skill appears to do exactly what it claims: pull your Bunpro frontend data and store it locally. Before installing/running: 1) Understand the token is a sensitive browser JWT — do not share it; prefer exporting BUNPRO_FRONTEND_API_TOKEN as an environment variable rather than passing it on the command line. 2) Inspect the included scripts yourself (they are plain Python) and ensure they only call https://api.bunpro.jp; the package uses the 'requests' library (install it into a virtualenv). 3) Treat the generated bunpro.db as sensitive personal data and store it securely (encrypt or keep in an isolated directory). 4) Because the skill uses community-documented endpoints and a frontend token that can expire, expect to refresh the token periodically. 5) If you have policy or TOS concerns, verify that using the frontend token and community API is acceptable to Bunpro and revoke your session token via logout if needed. Overall this is coherent and proportionate, but follow the usual precautions when handling authentication tokens and local backups.
Capability Analysis
Type: OpenClaw Skill Name: bunpro-sync Version: 1.0.0 The OpenClaw skill 'bunpro-sync' is designed to fetch Japanese grammar learning progress from the Bunpro API and store it in a local SQLite database for analysis. All files (SKILL.md, scripts/sync.py, scripts/queries.py, references/api-structure.md) align with this stated purpose. The `sync.py` script uses `requests` to interact with the legitimate Bunpro API (`https://api.bunpro.jp/api/frontend`) and `sqlite3` to store data locally in `bunpro.db`. The `queries.py` script provides tools to analyze this local data. There is no evidence of data exfiltration to unauthorized endpoints, malicious execution (e.g., `curl|bash`), persistence mechanisms, or prompt injection attempts against the AI agent in `SKILL.md`. The handling of the API token via environment variables is a standard and secure practice, and the code uses parameterized SQL queries to prevent injection vulnerabilities. The skill appears to be a well-intentioned utility.
Capability Assessment
Purpose & Capability
Name, description, SKILL.md, and included Python scripts all implement fetching Bunpro frontend endpoints and storing results in a local SQLite DB. Requested binary (python3) and single env var (frontend JWT) are appropriate for the stated task.
Instruction Scope
SKILL.md explicitly instructs the user how to extract the browser Frontend API Token via DevTools (console/local storage/network) and how to run the scripts. That instruction is sensitive but coherent with the need for a browser JWT; the skill does not instruct reading unrelated system files or posting data to external endpoints beyond api.bunpro.jp. Note: it allows passing the token directly on the CLI (less secure).
Install Mechanism
This is instruction-only (no installer downloads). It requires python3 and the scripts use the 'requests' library; no remote URLs or archive extraction are used. Minor note: the SKILL.md does not explicitly list Python package dependencies (requests), so the user may need to install them manually.
Credentials
Only BUNPRO_FRONTEND_API_TOKEN is required and is the correct credential for the frontend API the skill uses. The token is appropriately marked as primaryEnv. The skill recommends both env var and CLI token options — the latter is less secure but functionally consistent.
Persistence & Privilege
always is false and the skill does not request system-wide configuration changes or other skills' credentials. It only writes a local SQLite database in the specified data directory.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install bunpro-sync
  3. After installation, invoke the skill by name or use /bunpro-sync
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of bunpro-sync. - Sync your Bunpro Japanese grammar learning progress to a local SQLite database for analysis and insights. - Fetches user info, grammar points, SRS progress, study queue, due items, review histories, and stats. - Requires the Bunpro Frontend API token (not the settings API key); detailed setup instructions included. - Provides CLI tools for syncing data and running common queries (e.g., SRS, JLPT progress, leeches, forecasts). - Includes documentation on token retrieval, troubleshooting, and API details.
Metadata
Slug bunpro-sync
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Bunpro?

Sync Bunpro Japanese grammar learning progress from the API to local storage for analysis and insights. Use when the user wants to backup their Bunpro progre... It is an AI Agent Skill for Claude Code / OpenClaw, with 634 downloads so far.

How do I install Bunpro?

Run "/install bunpro-sync" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Bunpro free?

Yes, Bunpro is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Bunpro support?

Bunpro is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Bunpro?

It is built and maintained by mart1:n (@mart1n-xyz); the current version is v1.0.0.

💬 Comments