自訂與進階微調

本頁彙整了您可以手動調整的各項設定:包含排除名單(Stopwords)、輸出語言、複習網頁的通訊埠(Port),以及目前不建議更動的系統機制。每項調整建議皆標註了對應的檔案位置、修改方式與潛在影響。

Customize & tune

This page collects the knobs you can actually turn today: the stopwords list, output language, the review web app port, and a handful of things that look configurable but are not. Each knob lists which file to open, which line to change, and what might break.

為何需要自訂與微調?

每位學習者的需求各異。有時您希望將過於基礎的單字(如 understandimportant)排除在複習計畫外;有時您需要更換通訊埠(Port)以避免與其他開發工具衝突;或者您偏好全英文的詞義解釋。本手冊不要求您具備程式開發背景,僅會明確指出哪些設定可以「修改單行代碼即生效」,哪些部分「動則得咎」,以及目前系統尚未觸達的功能邊界。

透過本頁的指引,您可以清楚判斷哪些功能是目前版本可安全調控的,哪些則需等待未來更新。我們堅持透明地呈現系統現況,協助您更精準地掌控個人單字庫。

Why this page exists

No two people run this project the same way. Some days you want to drop "too easy" words (understand, important) from review. Some days you need a different port because 5173 clashes with another tool. Some days you want English-language definitions instead of Traditional Chinese. This page does not teach you to code — it tells you which files take a one-line edit, which files break things when touched, and which features are not finished yet.

Once you have read it, you will know the project's edges: what you can safely tune, and what you must wait for. We chose to be honest rather than pretend everything is configurable.

常見微調情境

以下展示兩種最常見的調整方式:

情境 A:將單字加入排除名單,停止收錄。

/stopword understand

執行後,dictionary/stopwords.md## custom 區塊會新增一行 - understand。日後若再次執行 /ingest understand,系統將會拒絕處理該單字。

情境 B:更換複習網頁的通訊埠(例如從 5173 改為 5174)。

使用文字編輯器開啟 review/server.js,定位至約第 8 行:

const PORT = 5173;

修改為:

const PORT = 5174;

儲存後重啟服務,存取網址將變更為 http://127.0.0.1:5174

Two concrete examples

The two most common tweaks:

Example 1: add understand to stopwords so /ingest stops collecting it.

/stopword understand

After it runs, dictionary/stopwords.md's ## custom section gains a new line - understand. Next time you type /ingest understand, it is rejected on the spot.

Example 2: change the review web app port from 5173 to 5174 (because you also run Vite). Open review/server.js in any text editor and find line 8:

const PORT = 5173;

Change it to:

const PORT = 5174;

Save, run /review-word again, and the URL becomes http://127.0.0.1:5174.

設定項 1:Stopwords(排除名單)

功能說明:Stopwords 是指「不收錄進字典、不列入複習計畫」的單字清單。系統在執行 /ingest 時若檢索到名單中的單字,將會自動略過。預設已包含約 150 個基礎功能字(如冠詞、代名詞、介係詞等),您可以視需求自行增補。

檔案位置:dictionary/stopwords.md。檔案結構分為兩大部分:

  • ## default:執行 /setup 時初始寫入的 150 個基本單字(如 aaboutafter 等)。
  • ## custom:由使用者自行定義的單字區塊,初始狀態為空。

操作方式:使用指令將單字加入 ## custom 區塊:

/stopword understand
/stopword important
/stopword example

系統會自動將單字寫入檔案,並執行自動排序與去重處理。詳細說明請參閱 /stopword 技能說明

移除方式:目前尚未提供「/stopword remove」指令。如需移除,請手動開啟 dictionary/stopwords.md 並刪除對應行目。例如,若想重新收錄 after

# 在 ## default 區塊中找到以下內容並刪除之
- after

風險預警:

  • 慎刪功能字: 若刪除 ## default 中的基礎詞(例如 the),當您執行整句分析模式時,系統會嘗試為 the 建立獨立字典頁,這通常會導致資源浪費。除非有特殊教學需求,否則建議保留預設清單。
  • 標題一致性: 區塊標題(## default## custom)不可更動,因為系統指令是透過精確匹配這些字元來運作的。

最佳實踐: 自己增補的單字一律放置於 ## custom。若未來版本更新並重新執行 /setup,系統僅會覆蓋 ## default,確保您的自訂名單得以保留。

Knob 1 — Stopwords (the review blacklist)

What: stopwords are words you don't want collected into the dictionary or drilled for review. /ingest rejects them on sight. The default pool is about 150 English function words (articles, pronouns, prepositions, auxiliaries) and you can add your own.

Where: dictionary/stopwords.md. The file has two sections:

  • ## default — the ~150 baseline words written by /setup on first run (a, about, after, and, are, be, but, can, did, do, for, from, have, he, i, in, is, it, not, of, on, or, the, to, was, were, with, you, your, ...).
  • ## custom — words you add yourself. Starts empty.

How to add: use the skill, which writes into ## custom:

/stopword understand
/stopword important
/stopword example

The skill writes them under ## custom, sorts alphabetically, and de-duplicates. See the /stopword skill page for details.

How to remove: there is no /stopword remove command yet. Open dictionary/stopwords.md in any text editor, delete the whole line, and save. For example, to let after through:

# In the ## default section, find this line
- after

# Delete the entire line and save

Risks:

  • Removing function words from ## default (say, deleting the) means /ingest "The cat sat." will try to add the to your dictionary. That is usually not what you want. Unless you genuinely want a dedicated page for a common word, leave ## default alone.
  • The section headings (## default and ## custom) must keep that exact spelling — /ingest and /stopword match them by literal text.

Recommended habit: always put your own additions under ## custom, never mix them into ## default. If the /setup template is ever refreshed in a future version, only ## default would be re-pulled, and your ## custom additions would survive.

設定項 2:輸出語言(誠實揭露:機制尚未完全實踐)

功能說明: 目前生成的字典內容(如繁體中文釋義、詞源描述、記憶法等)預設為繁體中文(zh-TW)。這是因為 /ingest 的核心技能定義(.claude/skills/ingest/SKILL.md)直接指派了該語系。

現狀說明: 雖然設計藍圖中規畫於 CLAUDE.md 加入 ## Wiki Configuration 區塊來統一切換輸出語言(如 enzh-TWja 等),但此機制目前尚未正式寫入 CLAUDE.md。這是目前系統中待完善的一環。

目前的兩種替代方案:

(A) 直接修改技能定義檔: 開啟 .claude/skills/ingest/SKILL.md,將所有出現「zh-TW」、「繁體中文」或「中文釋義」的地方手動更改為「English」或「English gloss」。修改後,/ingest 的生成內容將變為英文。注意: 修改前務必備份原始檔案(如 SKILL.md.backup),以便日後還原。

(B) 給予臨時指令: 在執行 /ingest 之前,您可以先向 Claude Code 下達一次性需求:

從現在起,請改用英文 (English) 輸出所有 ingest 結果的釋義、詞源與記憶法內容。
接著執行:
/ingest international

AI 通常會遵循此指令,但該設定僅在當前對話視窗有效;開啟新視窗後將恢復為中文預設值。

潛在風險:

  • 方案 (A) 會導致您的本地代碼與官方版本不一致,未來進行 git pull 時可能會產生衝突。
  • 方案 (B) 雖然安全,但頻繁重複輸入指令較為瑣碎。
  • 無論採用何種方案,部分系統固定的區塊標題與欄位標籤將不會隨之改變(詳見設定項 3)。

Knob 2 — Output language (honest disclosure: not finished)

What: the dictionary prose generated by /ingest — Chinese gloss, etymology paragraph, mnemonic text — is currently emitted as Traditional Chinese (zh-TW). The reason is that /ingest's skill spec (.claude/skills/ingest/SKILL.md) explicitly asks for zh-TW.

Honest disclosure: a ## Wiki Configuration section in CLAUDE.md was discussed as a single source of truth for switching the output locale (en / zh-TW / ja / ko / de ...), but it has not actually been added to CLAUDE.md yet. If you open CLAUDE.md looking for ## Wiki Configuration, you will not find it. This is one of the project's current rough edges — the work is in progress.

Two work-arounds you can use today:

(a) Edit the skill spec directly. Open .claude/skills/ingest/SKILL.md and replace every occurrence of "zh-TW", "繁體中文", and "中文釋義" with "English" and "English gloss". After saving, /ingest's prose output will be in English. Note: this file is the LLM's source of truth — before editing, copy it to SKILL.md.backup so you can revert easily.

(b) Give Claude Code a one-off instruction. Lighter weight. Before you run /ingest, tell Claude Code:

From now on, please emit all ingest output (gloss, etymology, mnemonic)
in English. Then:
/ingest international

The LLM usually obeys, but this instruction only applies in the current chat — a fresh window reverts to zh-TW.

Risks:

  • Route (a) puts your skill spec out of sync with the upstream repo; a future git pull may conflict.
  • Route (b) is safer but you must repeat the instruction every new chat — easy to forget.
  • Either way, certain fixed section names and field labels will not change with the locale (see Knob 3 below).

設定項 3:標籤與區塊標題(固定為繁體中文,不可修改)

核心說明: 即使您按照設定項 2 將內容改為英文,字典檔案(dictionary/words/<word>.md)中的下列元素必須維持繁體中文

  • 區塊標題(Sections): ## 拆解## 詞源## 記憶法## 筆記區
  • 欄位標籤(Labels): **詞性**:**IPA**:**中文釋義**:
  • 拆解行前綴: - 字首:- 字根:- 字尾:- 整字借詞:

技術限制: 複習服務(review/server.js)在處理 GET /api/cards 請求時,會利用正則表達式(Regex)即時掃描檔案。它是透過精確字串比對(如 ## 拆解)來抓取內容。若更動這些標籤,系統將無法解析數據,導致複習介面顯示空白。

給予英文輸出使用者的提醒: 這是目前的架構限制。生成描述(Prose)可以是英文,但結構化標籤(Labels)目前固定為中文。您的字典檔案外觀可能如下:

# international

**詞性**: adj.
**IPA**: /ˌɪn.təˈnæʃ.ən.əl/
**中文釋義**: pertaining to two or more nations; cross-border

## 拆解
- 字首: [[../prefix/inter-]] `inter-` — between, among
- 字根: [[../root/nat]] `nat` — to be born (Latin nasci)
- 字尾: [[../suffix/-ion]] `-ion` — noun suffix (act / result)
- 字尾: [[../suffix/-al]] `-al` — adjective suffix (related to)

## 詞源
From Latin inter- ("between") + natio ("birth, nation") ...

## 記憶法
Picture nations sitting between each other at a UN round table ...

## 筆記區

讀字典檔時把中文標題當成「分區標籤」就好 —— 真正要讀的是它們底下的內容。

能不能改 server.js 來支援英文 section 名?技術上可以,但 review/server.jssplitSectionsparseBreakdownLine 兩個函式都要改、所有現存 word md 也要全部重寫一次 —— 屬於開發者級的工作,不是「一行編輯」。等之後版本有時間做。

Knob 3 — Section names and field labels (fixed Chinese, not editable)

What: even if you follow Knob 2 and switch prose to English, a few things inside each dictionary/words/<word>.md file must stay in Traditional Chinese:

  • Section headings: ## 拆解, ## 詞源, ## 記憶法, ## 筆記區
  • Field labels: **詞性**:, **IPA**:, **中文釋義**:
  • Breakdown-line prefixes: - 字首:, - 字根:, - 字尾:, - 整字借詞:

Why fixed: the review web app (review/server.js) regex-parses each word md on every GET /api/cards, pulling the frontmatter and these sections into the flip-card UI. It matches them by literal string (## 拆解, ## 詞源, etc.); renaming them means nothing parses and the card UI shows blanks.

If you plan to use English as the output locale: this is a current design limit. Prose values can be English, but the labels stay Chinese. When you open a dictionary file you will see:

# international

**詞性**: adj.
**IPA**: /ˌɪn.təˈnæʃ.ən.əl/
**中文釋義**: pertaining to two or more nations; cross-border

## 拆解
- 字首: [[../prefix/inter-]] `inter-` — between, among
- 字根: [[../root/nat]] `nat` — to be born (Latin nasci)
- 字尾: [[../suffix/-ion]] `-ion` — noun suffix (act / result)
- 字尾: [[../suffix/-al]] `-al` — adjective suffix (related to)

## 詞源
From Latin inter- ("between") + natio ("birth, nation") ...

## 記憶法
Picture nations sitting between each other at a UN round table ...

## 筆記區

When reading a dictionary file, treat the Chinese headings as plain section labels — what you actually read is the content inside them.

Can you patch server.js to support English section names? Technically yes, but you would have to change both splitSections and parseBreakdownLine in review/server.js AND rewrite every existing word md — developer-level work, not a one-line edit. Saving that for a future version.

旋鈕 4 — 複習網頁的 port

什麼:複習網頁預設跑在 http://127.0.0.1:51735173 也是 Vite 開發伺服器的預設 port,所以如果你同時跑了一個前端專案,可能會撞到。

在哪裡:review/server.js,檔案最上方第 8 行附近:

const PORT = 5173;
const HOST = '127.0.0.1';

怎麼改:5173 換成任何沒被占用的 port,例如 51748080:

const PORT = 5174;

存檔。如果伺服器已經在跑,按 Ctrl + C 停掉,再 /review-word 重新啟動。瀏覽器網址變成 http://127.0.0.1:5174

風險:

  • 改了沒重啟伺服器 → 還是聽舊 port,新網址打不開。記得「改完一定要重啟」。
  • 選了系統保留 port(< 1024,例如 80、443)→ Windows / macOS 會拒絕綁定,啟動時報錯。請用 1024 以上的 port。
  • HOST 通常不要動。改成 0.0.0.0 會讓同網路其他人也能連進你的複習頁(個資外洩風險),除非你很清楚自己在做什麼,不然就讓它維持 127.0.0.1(只有本機可連)。

設定項 4:複習網頁通訊埠(Port)

功能說明: 複習服務預設監聽 http://127.0.0.1:5173。由於 5173 同時也是 Vite 等前端開發工具的預設埠號,若您同時執行其他專案,可能會產生衝突。

檔案位置: review/server.js,位於檔案頂部約第 8 行:

const PORT = 5173;
const HOST = '127.0.0.1';

修改方式:5173 更換為任何未被佔用的埠號(如 51748080):

const PORT = 5174;

操作流程: 儲存檔案後,若服務已在運行,請先按下 Ctrl + C 終止,隨後重新執行 /review-word。新網址將變更為 http://127.0.0.1:5174

風險預警:

  • 忘記重啟: 若未重啟服務,舊的埠號將繼續被佔用,新網址也無法開啟。
  • 權限限制: 請避免使用小於 1024 的埠號(如 80 或 443),否則 Windows/macOS 可能會因權限不足而報錯。建議選用 1024 以上的數值。
  • 維持 HOST 設定: 請保留 127.0.0.1。若修改為 0.0.0.0,將導致您的複習頁面暴露於區域網路中,產生隱私風險。

Knob 4 — Review web app port

What: the review web app listens on http://127.0.0.1:5173 by default. 5173 is also the default for the Vite dev server, so if you're running a front-end project at the same time you may collide.

Where: review/server.js, near the top of the file at line 8:

const PORT = 5173;
const HOST = '127.0.0.1';

How: replace 5173 with any free port, e.g. 5174 or 8080:

const PORT = 5174;

Save. If the server is already running, press Ctrl + C to stop it, then re-run /review-word. The URL becomes http://127.0.0.1:5174.

Risks:

  • Forgetting to restart → the server is still bound to the old port, and the new URL won't open. Always restart after editing.
  • Picking a privileged port (< 1024, e.g. 80 or 443) → Windows / macOS will refuse to bind and you'll see an error at startup. Use a port at 1024 or above.
  • Leave HOST alone. Changing it to 0.0.0.0 would expose your review page to anyone on the same network (privacy risk). Unless you know exactly what you're doing, keep 127.0.0.1 (local-machine only).

設定項 5:專案目錄結構(目前為硬編碼,不建議更動)

核心說明: 您在各處文件中會反覆看到以下固定路徑:

  • dictionary/:主目錄(包含單字、語素、排除名單、索引與日誌)。
  • dictionary/words/:存放單字 Markdown 檔案。
  • dictionary/{prefix,root,suffix}/:存放語素 Markdown 檔案。
  • dictionary/stopwords.md:排除名單。
  • review/flashcards.json:SM-2 複習數據。
  • review/server.js:網頁伺服器主體。

現狀說明: 這些路徑目前硬編碼(Hard-coded)於各技能(Skills)的規格檔與 server.js,並無通用的設定檔可一次性更換。若您執意更動目錄名稱,則必須同步手動修改:

  • .claude/skills/ 目錄下的所有 SKILL.md
  • review/server.js 中的 WORDS_DIR 相關常數。

修改風險: 極不建議手動更動目錄結構,這極易導致 Wiki-link 失效或索引解析錯誤,是目前系統中最脆弱的「非旋鈕」設定區。

致「設定檔獵人」: 本專案目前不具備 config.json.envsettings.yaml。系統完全基於「技能規格 + 約定路徑」運作。若有外部教學指引您「開啟 Config 修改路徑」,那並不適用於本專案。

Knob 5 — Project paths (currently hard-coded; there is no config file)

What: you will see the same paths over and over in the docs:

  • dictionary/ — everything: words, prefixes, roots, suffixes, stopwords, index, log.
  • dictionary/words/ — per-word md files.
  • dictionary/prefix/, dictionary/root/, dictionary/suffix/ — morpheme md files.
  • dictionary/stopwords.md — the stopwords list.
  • review/flashcards.json — SM-2 review progress.
  • review/server.js — the review web server.

Honest disclosure: these paths are hard-coded into the skill specs and into server.js — there is no central config file you can flip. To rename dictionary/ to my-class-words/, you'd have to manually edit:

  • .claude/skills/ingest/SKILL.md (every mention of dictionary/)
  • .claude/skills/new-word/SKILL.md, .claude/skills/stopword/SKILL.md, .claude/skills/flashcard/SKILL.md, .claude/skills/lint/SKILL.md (each spec's own path mentions)
  • The WORDS_DIR constant in review/server.js

Renaming is not recommended — you'll almost certainly break back-links and index parsing on the way. This is a "looks like a knob, isn't a knob" knob.

For the config-file hunters: there is no config.json, no .env, no settings.yaml. The project runs on "spec files + convention-based paths". If a tutorial tells you to "open the config and change X", it's not this project's tutorial.

快速查閱:我想改「這個」,要去哪裡?

  1. 過濾過於簡單的字詞 → 執行 /stopword <單字>,系統會自動將其寫入 dictionary/stopwords.md## custom 區塊。
  2. 將單字從排除名單中移除 → 直接開啟 dictionary/stopwords.md,手動刪除該行即可。
  3. /ingest 產出英文釋義 → 修改 .claude/skills/ingest/SKILL.md(永久生效),或在對話開始時輸入「請用英文輸出」(臨時生效)。請注意:結構化標籤固定為中文。
  4. 更換複習網頁通訊埠(Port) → 修改 review/server.js 約第 8 行的 const PORT = 5173;,儲存後務必重啟服務。
  5. 搬移 dictionary/ 資料夾不建議執行。目前沒有單一設定值可修改,更動將導致多處技能失效。

Cheat sheet — I want to change X, where do I edit?

  1. Add a word you don't want drilled/stopword <word> (writes to dictionary/stopwords.md under ## custom).
  2. Remove a word from stopwords → open dictionary/stopwords.md in a text editor and delete the line.
  3. Make /ingest emit English prose → edit .claude/skills/ingest/SKILL.md (permanent), or tell Claude Code at the start of the chat to "emit ingest output in English" (one-off). Reminder: section names stay Chinese either way.
  4. Change the review web app port → edit line 8 of review/server.js (const PORT = 5173;), save, restart.
  5. Rename the dictionary/ folder → don't. There's no single setting to flip and you'll break several places.

常見配置錯誤與後續步驟

避雷指南:

  • 標記錯誤: 請勿將自訂字詞寫入 ## default 區段,這會導致未來更新模板時您的設定被覆蓋。請一律使用 ## custom
  • 標籤更動: 切勿更改 dictionary/words/<word>.md 內的區塊標題(如將 ## 拆解 改為 ## Breakdown),這會導致 review/server.js 抓取不到數據,令複習介面顯示空白。
  • 服務重啟: 更改 Port 號後若未重啟伺服器,舊的處理程序仍會佔用原有通訊埠,新設定將不會生效。
  • 虛擬路徑: CLAUDE.md 中的 ## Wiki Configuration 欄位目前尚未實踐,若搜尋不到純屬正常,請參考本頁的替代方案。
  • 安全風險:HOST 修改為 0.0.0.0 會允許同區域網路內的所有人存取您的複習頁面,可能導致學習日誌與個資外洩。

相關資源:

Common mistakes & next steps

Common mistakes:

  • Adding custom stopwords under ## default — they should go under ## custom so a future template refresh doesn't wipe them.
  • Renaming sections inside dictionary/words/<word>.md (e.g. ## 拆解## Breakdown) — this breaks the regex parser in review/server.js and the flip-card UI goes blank.
  • Changing the port without restarting the server — the old process is still bound to 5173, so your "new" change looks broken.
  • Hunting for a locale config file — the ## Wiki Configuration section in CLAUDE.md does not exist yet. Stop looking.
  • Changing HOST to 0.0.0.0 to allow external connections — anyone on the same network can reach the page; that's a privacy risk.

Where to go next: