skills/english-learner/SKILL.md
Auto-intercepts English messages for grammar / word-choice / expression issues (max 3 per message); auto-translates Chinese / Japanese / Korean / Spanish / other-language messages with vocabulary extraction. Also handles word lookups, phrase lookups (e.g. 'break the ice'), translation requests, and quiz/review. Logs every prose input (clean OR with issues) to `prose_log` so fluency rate is tracked over time. Pushes 3 due-for-review words at the first session of each day (spaced repetition: 1/3/7/14/30/90 days). Triggers: any English message, any Chinese message, any non-English-non-Chinese prose, single English word, idiom, '查单词', '学英语', 'what does X mean', vocabulary review. Data stored at ~/.learnwy/english-learner/ with mastery + fluency tracking.
npx skillsauth add learnwy/skills english-learnerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Personal vocabulary assistant with persistent storage, mastery tracking, and spaced repetition.
| Mode | Trigger | Action |
|---|---|---|
| English intercept | User writes in English (EN ratio ≥ 0.6) | If issues found: show 1–3 corrections in a "💡 English Tip" table. If clean: render exactly "✅ English looks fluent — no issues found." Always call vocab record-input with had_issues + issue_count. |
| Chinese intercept | User writes in Chinese (CN ratio ≥ 0.3, OR contains 翻译/怎么说/用英语 intent). Always fires — never silently skipped. Tiered output: full mode for normal messages; light mode when ≥ 500 chars OR contains code keywords (代码/编程/bug/修复/重构/编译/部署/配置文件). | Full: "🌐 中译英" block — corrections (if any) + 2–3 EN translations + 2–3 vocab + batch_save. Light: "🌐 中译英 (light)" — 1 EN translation + optional 1 vocab. Both call record-input with language: zh. |
| Other-language intercept | User writes prose in JA / KO / ES / FR / DE / RU / AR / etc. (low EN, low ZH ratios). Always fires. Tiered: full mode for normal, light mode when ≥ 800 chars. | Full: "🌐 Translate & Learn" — detect language, translate, 2–3 vocab, auto-save. Light: 1 EN translation + optional 1 vocab. Both call record-input with language: ja/ko/other. |
All modes wired through learnwy-dispatch (UserPromptSubmit + Stop hooks). They never block the user's actual task — corrections come first, work continues.
Every fired turn logs an entry to prose_log so we can compute fluency rate, by-language activity, and 30-day trend (vocab prose-stats).
Detailed rules, exclusion filters, and Markdown formats: see references/intercept-modes.md.
| Trigger | Mode | What happens |
|---|---|---|
| Single word / phrase / sentence | Lookup | vocab batch_get → AI generates if new → batch_save → render card |
| 学习 / review / quiz | Quiz | quiz generate 5 all low_mastery → ask user with AskUserQuestion per item |
| stats / 统计 | Stats | vocab stats → render summary |
| 查单词 / 学英语 / 翻译请求 | Lookup | Same as single-word path |
Response formats (word card, phrase card, sentence breakdown, quiz prompt, stats): see references/learning-mode.md.
The intercept skips entirely only for inputs that aren't prose at all:
looksLikeNonProse)Use Skill: directivesTech-heavy or long Chinese is NOT skipped — it falls into light mode instead (1-sentence translation, optional 1 vocab). See [feedback-learning-tools-fire-everywhere] in memory: silent gates hurt the long-term dataset, so we always fire, just adjust verbosity.
English fluency check is special: if no issues, render the one-line ✅ English looks fluent ack — that is the fire, not a skip.
node:sqlite)~/.learnwy/english-learner/data.dbSingle CLI entry scripts/cli.cjs dispatches everything:
# vocab — CRUD + batch ops
node scripts/cli.cjs vocab batch_get '["word1","word2"]'
node scripts/cli.cjs vocab batch_save '[{"word":"...","definition":"...","phonetic":"...","examples":[]}]'
node scripts/cli.cjs vocab get_word|save_word|get_phrase|save_phrase|log_query|stats|update_mastery ...
# corrections — persist usage tips from the English intercept
node scripts/cli.cjs vocab record-correction '[{"original":"imrpove","corrected":"improve","reason":"typo","words":[{"word":"improve","definition":"改进;改善","phonetic":"/ɪmˈpruːv/"}]}]'
node scripts/cli.cjs vocab top-corrections [limit=5]
node scripts/cli.cjs vocab corrections-stats
# prose log — log every prose input (clean or with issues), then aggregate fluency
node scripts/cli.cjs vocab record-input '{"language":"en","text":"<original>","had_issues":false,"issue_count":0}'
node scripts/cli.cjs vocab prose-stats # totals, clean-rate, by-language, 30-day window
node scripts/cli.cjs vocab recent-prose [limit=20]
# sentence — input classification + word extraction
node scripts/cli.cjs sentence classify <text>
node scripts/cli.cjs sentence parse <sentence>
node scripts/cli.cjs sentence batch_check <words>
# quiz — review session
node scripts/cli.cjs quiz generate [count] [type] [focus]
node scripts/cli.cjs quiz review [limit]
node scripts/cli.cjs quiz summary
# spaced repetition + linking
node scripts/cli.cjs link-wiki # cross-link with llm-wiki
# report — generate a self-contained static HTML dashboard from the SQLite DB
# sections: Overview · Due now · Activity · Words · Phrases · Corrections · Fluency · Materials
# Fluency section shows overall + 30-day clean rate, by-language breakdown, and 20 most-recent inputs.
node scripts/cli.cjs report # writes ~/.learnwy/english-learner/report.html
node scripts/cli.cjs report --output <path> # custom destination
node scripts/cli.cjs report --json # also dump intermediate report.html.json
node scripts/cli.cjs report --open # open in default browser after generation
# install/uninstall hooks (registered with .claude/ + .trae/)
node scripts/cli.cjs install --scope global --target both
node scripts/cli.cjs uninstall --scope global --target both
vocab batch_* are mandatory whenever ≥2 items are involved.
~/.learnwy/english-learner/
├── data.db # SQLite — words, phrases, history (schema in references/data-storage.md)
└── memory/
├── SOUL.md
└── USER.md
Schema is migrated automatically by src/shared/db.ts (versioned migrations). Spaced-repetition columns (next_review_at, interval_days) drive the SessionStart push of 3 due cards per day.
Wired through learnwy-dispatch (single Node process — no per-skill spawn):
| Event | Lib function | Purpose |
|---|---|---|
| UserPromptSubmit | lib/prompt-scan.ts | Inject English/Chinese intercept reminder |
| Stop | lib/stop-scan.ts | After each assistant response, surface 2–4 advanced words found in the response (asks user; never auto-saves) |
| SessionStart | lib/session-scan.ts | Once per day, push 3 due-for-review cards (spaced-repetition algorithm) |
Each scanner is a pure (payload | message) => string | null. Side effects (DB writes) live behind lib/*-store.ts.
This skill only: vocabulary capture, lookup, mastery, spaced repetition, intercept-driven correction.
This skill does not: full essay editing, grammar tutoring beyond the 3-issue cap, native-language tutoring beyond Chinese, or persistent memory of preferences (use learnwy-status for cross-skill stats).
tools
Fallback skill when no project-specific one matches. Provides 10 battle-tested software-engineering methodology agents: problem-definer (Weinberg), story-mapper (Patton), spec-by-example (Adzic), domain-modeler (DDD/Evans), responsibility-modeler (CRC/Wirfs-Brock), architecture-advisor (Bass), tdd-coach (Beck), refactoring-guide (Fowler), legacy-surgeon (Feathers), test-strategist (Crispin). Use when user asks about DDD, TDD, refactoring, story mapping, test strategy, or software-architecture quality attributes.
development
Use when the user wants to build, implement, or develop a feature. Orchestrates evidence-driven Spec-Driven Development. Default lifecycle is `lite` (INIT → IMPLEMENTING → TESTING → DONE); auto-promote to `standard` or `full` when scope, risk, or AC traceability demands it. Triggers: 'develop feature', 'implement this', 'build feature', 'add module', 'fix bug', '开发功能', '实现这个'.
documentation
当用户需要创建、更新或设计项目级技能(.agents/skills/*/SKILL.md)时使用此技能。Analyzes the user's problem and project context to design reusable skill solutions. 触发词:'创建技能'、'编写技能'、'构建技能'、'添加技能'、'更新技能'、'项目技能'、'新建技能'、'设计技能', or when the user describes a repetitive workflow that should be captured as a reusable AI skill.
tools
Use this skill when the user wants to install, add, or configure a skill in a project. Analyze the project's tech stack and workflow, then recommend and install the best-matching skill. Triggers: 'install skill', 'add skill', 'configure skill', 'set up skill', 'enable skill', 'use skill in project', 'project skill', or when the user asks how to bring an existing skill capability into the current workspace.