/review-word — 啟動複習界面

在本機啟動翻卡複習網頁,利用 SM-2 間隔重複演算法,高效複習今日到期的單字卡。

/review-word — open the flashcard review app

Boots a local flip-card review web app so you can practise your own due words today with SM-2 spaced repetition.

設計初衷

Anki 功能強大,但對於只想複習個人單字庫的使用者而言,其軟體安裝、帳號管理及牌組設定往往過於繁瑣。/review-word 提供了一個更輕量直覺的選擇:它會直接讀取 dictionary/words/ 中由 /ingest 建立的 Markdown 檔案,透過本機 Node.js 伺服器,讓您在瀏覽器中即時開始複習。

本工具完整建構了學習閉環:/ingest 收錄單字 → /flashcard 加入複習庫 → /review-word 每日複習。這三個指令將「初次接觸」轉化為「長效記憶」。所有資料皆儲存於本機,無需雲端帳號,更不必擔心隱私外洩。

隱私與安全:伺服器僅綁定 127.0.0.1(本機位址),不對外開放。您的 flashcards.json、字典內容及複習紀錄完全保留在個人硬碟中,落實「資料私有化」。

Why this exists

Anki is powerful but heavy when you just want to drill the words in your own vocabulary library — there is software to install, accounts to manage, deck settings to learn. /review-word takes a different path: it reads the same Markdown files you have been building with /ingest under dictionary/words/, runs a tiny Node server on your machine, and your browser shows today's due cards.

This is where the learning loop closes: /ingest captures a word, /flashcard enrols it, /review-word drills it daily, and you actually remember it. Three skills line up into a path from "I read this word once" to "I really remember it" — and every byte of data stays on your computer. No cloud, no account, no extra software to install.

Privacy note: the server binds to 127.0.0.1 (localhost only), so it is not reachable from the network; flashcards.json and the dictionary Markdown live entirely on your hard drive. Nothing leaves this computer — your vocabulary library, review history, and grading log are local files on your own device.

操作範例

若您先前已執行 /ingest unbelievable 並透過 /flashcard unbelievable 將其納入複習,今日執行:

# 在對話框輸入:
/review-word

# 終端機將顯示啟動資訊:
review server listening at http://127.0.0.1:5173

# 系統會回覆複習連結:
複習網頁已啟動,請開啟 http://localhost:5173

在瀏覽器中開啟該連結,即可看到複習界面:

┌────────────────────────────────────────┐
│  單字複習                       0 / 3  │
├────────────────────────────────────────┤
│                                        │
│           unbelievable                 │
│                                        │
│             [  點擊翻牌  ]             │
│                                        │
└────────────────────────────────────────┘

回想字義後按「翻牌」,卡片背面將載入詳細資訊:

┌────────────────────────────────────────┐
│  IPA      /ʌn.bɪˈliː.və.bəl/           │
│  詞性     形容詞                       │
│  中文釋義 難以置信的                   │
│                                        │
│  語素拆解                               │
│   • 前綴 un-      — 否定               │
│   • 字根 believe  — 相信               │
│   • 後綴 -able    — 具備能力           │
│                                        │
│  ▸ 詞源詳解 (點擊展開)                  │
│  ▸ 記憶策略 (點擊展開)                  │
│                                        │
│  [Again] [Hard]  [Good]  [Easy]        │
└────────────────────────────────────────┘

根據您的記憶狀況選擇評分按鈕。系統會同步更新 review/flashcards.json 並計算下次排程,自動推播下一張卡片。完成後可回終端機輸入 Ctrl+C 結束伺服器程式。

A concrete example

Suppose you ingested unbelievable yesterday with /ingest unbelievable, then enrolled it with /flashcard unbelievable. Today you want to drill it:

# Type this in the Claude Code chat box:
/review-word

# The terminal that hosts Claude Code prints:
review server listening at http://127.0.0.1:5173

# Claude Code replies with something like:
Review web app started. Open http://localhost:5173 in your browser.

You open your own browser (or click that link). What you see looks roughly like this:

┌────────────────────────────────────────┐
│  Word review                    0 / 3  │
├────────────────────────────────────────┤
│                                        │
│           unbelievable                 │
│                                        │
│             [  Flip  ]                 │
│                                        │
└────────────────────────────────────────┘

Think of the meaning, press Flip, and the back of the card appears:

┌────────────────────────────────────────┐
│  IPA       /ʌn.bɪˈliː.və.bəl/          │
│  POS       adjective                   │
│  Meaning   hard to believe             │
│                                        │
│  Breakdown                             │
│   • prefix  un-      — not             │
│   • root    believe  — to believe      │
│   • suffix  -able    — capable of      │
│                                        │
│  ▸ Etymology  (click to expand)        │
│  ▸ Mnemonic   (click to expand)        │
│                                        │
│  [Again] [Hard]  [Good]  [Easy]        │
└────────────────────────────────────────┘

You pick a grade button yourself and the server writes it back to review/flashcards.json, applies SM-2 to compute the next due date, and pushes the next card onto the screen. When the queue is empty you see "Today's review complete" — go back to the terminal and press Ctrl+C to stop the server.

操作指南

  1. 環境檢查:確認已安裝 Node.js。在終端機輸入 node --version,應顯示 v18.x.x 以上版本。若未安裝,請至 nodejs.org 下載。
  2. 初始化檢查:確保已執行過 /setup。此步驟會配置伺服器原始碼並安裝必要的套件(npm dependencies)。
  3. 單字建案:確認複習庫中有資料。使用 /flashcard <word> 將單字檔案連結至複習排程。
  4. 啟動指令:輸入 /review-word,系統將在背景執行伺服器程式。
  5. 進入界面:在瀏覽器開啟 http://localhost:5173
  6. 評分與反饋:根據自身回憶狀況誠實評分。
    • Again:完全忘記或答錯。
    • Hard:費力思索後勉強想起。
    • Good:稍有遲疑但正確應答。
    • Easy:不費吹灰之力即刻答對。
  7. 關閉伺服器:完成後請務必回到對話框告知「停止複習 server」或在終端機按 Ctrl+C僅關閉瀏覽器分頁並不會終止伺服器程式。

關於 SM-2 演算法:系統會根據您的評分調整下次複習日。選擇「Again」會讓單字在隔天再次出現;選擇「Easy」則會顯著拉長複習間隔。誠實打分是長期記憶的最佳路徑。詳見:SM-2 間隔重複機制說明

Step by step

  1. Confirm Node.js is installed. In any terminal, type node --version. You should see something like v18.x.x or newer. If you get "command not found", install the LTS build from https://nodejs.org first.
  2. Confirm you have already run /setup. That skill copies the server source into review/ and pre-runs npm install. Without it, this skill stops with a "please run /setup first" message.
  3. Confirm you have at least one enrolled card. Use /flashcard <word> to add words from your dictionary into review/flashcards.json. The server still runs without any cards, but the screen will immediately say "Today's review complete" and there is nothing to practise.
  4. Type /review-word in the Claude Code chat box. Claude Code launches node review/server.js in the background and waits for the server to become ready.
  5. Open your browser to http://localhost:5173. Some systems auto-open it; if not, paste the URL manually.
  6. Flip, grade, repeat. See the word → think of the meaning → press Flip → compare → pick Again / Hard / Good / Easy yourself. When the queue drains, you are done.
  7. Stop the server. Go back to the Claude Code chat and say "stop the review server" (Claude Code remembers the process id and will kill it for you), or return to the terminal and press Ctrl+C. Closing the browser tab does not stop the server — that is the single most common point of confusion.

How to pick a grade: Again = blank / wrong; Hard = remembered, but after struggling; Good = remembered smoothly with a tiny pause; Easy = answered in a second, effortless. SM-2 uses your grade to schedule the next due date — Again pushes the card back to "tomorrow", Easy stretches the interval out a long way. Grade yourself honestly; no one else sees the score. The full algorithm is on How SM-2 spaced repetition works.

疑難排除與後續步驟

未安裝 Node.js:/setup 曾發出警告但被忽略,此指令將無法運作。請前往 nodejs.org 安裝穩定版(LTS),重啟終端機後再試。

Port 5173 衝突:若您目前正在執行其他前端工具(如 Vite)或上次伺服器未完全關閉,將會出現 EADDRINUSE 錯誤。請先終止該程式再重試。

庫中無卡:若開啟網頁即顯示「今日複習完成」,表示 review/flashcards.json 中尚無到期卡片。請先透過 /flashcard 新增單字。

伺服器殘留:關閉瀏覽器「不會」自動停止 Node 程式。若發現 Port 被佔用,請在終端機按 Ctrl+C,或在對話框請求系統停止伺服器。

後續探索:

← 回首頁

Common mistakes & next steps

Node.js not installed. When you ran /setup it may have warned about a missing Node and continued anyway — without Node this skill cannot run at all. Install the LTS build from https://nodejs.org, reopen your terminal, confirm node --version prints a version number, then come back.

Port 5173 already in use. If you also run Vite, another dev tool, or a previous copy of this server that did not exit cleanly, you will see an EADDRINUSE error. Close that other tool (not the browser tab — the actual program in its terminal), then run /review-word again.

No cards enrolled yet. If the page shows "Today's review complete" the instant you open it, nothing is broken — review/flashcards.json simply has no cards. Use /flashcard <word> to enrol words from your dictionary. Start with /flashcard — Manage flashcards.

Browser closed, server still running. Closing the tab does not stop the server. It will keep holding port 5173, and the next /review-word will collide with it. Return to the terminal and press Ctrl+C, or tell Claude Code "stop the review server" in the chat.

Next:

  • /flashcard — how to enrol words from your dictionary into the review queue (no cards = no review)
  • How SM-2 spaced repetition works — the algorithm behind Again / Hard / Good / Easy and why intervals grow the way they do
  • /ingest — capture a brand-new word into the dictionary
  • Getting Started — if you have not run /setup yet

← Back to home