「单词默写」网页(vocab-dictation)的词库仓库,由大家共同维护。仓库根目录就是数据:
index.json 页码列表(网页的「API」)
pages/pNNN.json 每页一个单词表(中文 → 外语)
tools/validate.py 校验脚本
.claude/skills/wordlist-gen/ 用 Claude 从课本页面生成单词表的 skill
网页默认通过 CDN 读取这里的文件:
https://cdn.jsdelivr.net/gh/sof-azertia-flores/my_highschool_wordlist@main/index.json(最多缓存 12 小时)https://raw.githubusercontent.com/sof-azertia-flores/my_highschool_wordlist/main/index.json克隆仓库:
git clone git@github.com:sof-azertia-flores/my_highschool_wordlist.git && cd my_highschool_wordlist
/wordlist-gen。它会写好 pages/p012.json、更新 index.json 并跑校验。pages/pNNN.json,再在 index.json 里登记一条。校验:
python3 tools/validate.py
提交并推送(有写权限直接推 main;没有的 fork 后提 Pull Request,Actions 会自动校验):
git add index.json pages && git commit -m "add p012" && git push
规则:不要改已有词的 id(大家的 ★ 标记和错题记录靠它对应);新词追加在末尾;index.json 里的 count 要和实际词数一致;zh 里不要夹带答案。
index.json:
{
"version": 1,
"title": "词库名",
"pages": [
{ "id": "p012", "page": 12, "title": "Lesson 3", "lang": "en", "file": "pages/p012.json", "count": 18 }
]
}
pages/p012.json:
{
"version": 1,
"id": "p012", "page": 12, "title": "Lesson 3", "lang": "en", "source": "课本名",
"words": [
{ "id": "w01", "zh": "明信片", "fl": "postcard", "alt": ["post card"], "pos": "n.", "note": "可选备注" }
]
}
| 字段 | 说明 |
|---|---|
id |
稳定标识。页:p + 三位页码;词:w01…。建好后别改 |
zh / fl |
中文提示 / 应写出的外语(必填) |
alt |
其他可接受写法(可选) |
pos |
词性,显示在中文旁用于消歧(可选) |
note |
备注,只在单词表里显示(可选) |
lang |
小写语言代码(en、de、fr、es…),决定默认比对规则 |
compare |
页级可选:{"case":"strict"/"ignore","accents":"strict"/"ignore"} |
各语言的书写约定(德语名词带冠词、法语跟随课本等)见 .claude/skills/wordlist-gen/SKILL.md。
| 工具 | 怎么用 |
|---|---|
| Claude Code | 在仓库目录或其父目录开会话即自动可用 |
| Claude Desktop 的 Cowork / claude.ai | 需上传一次:cd .claude/skills && zip -r ../../wordlist-gen.zip wordlist-gen,然后在 Customize → Skills → + → Upload a skill 上传 |
| Cursor、OpenCode | 自动读取 .claude/skills/ |
Codex 等读 .agents/skills/ 的工具 |
.agents/skills/wordlist-gen 是指向正本的符号链接 |