lwy-dispatch
/lwy-dispatch
Internal single-process coordinator for the three IDE-hook events used by the learnwy-* skills. UserPromptSubmit aggregates english-learner + llm-wiki + prompt-optimizer scans; Stop aggregates english-learner + knowledge-consolidation scans; SessionStart aggregates llm-wiki + english-learner + learnwy-status scans. Not user-invokable — installed automatically alongside the underlying skills. Triggers on every UserPromptSubmit / Stop / SessionStart event in Claude Code / Trae.
Assessment and security
- Files in this package
- 7
- Scripts
- 4
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 03.06.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 4 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/cli.cjs, scripts/hooks/session-start.cjs, scripts/hooks/stop.cjs, scripts/hooks/user-prompt-submit.cjs
What it does and when to use it
Internal single-process coordinator for the three IDE-hook events used by the learnwy-* skills. UserPromptSubmit aggregates english-learner + llm-wiki + prompt-optimizer scans; Stop aggregates english-learner + knowledge-consolidation scans; SessionStart aggregates llm-wiki + english-learner + learnwy-status scans. Not user-invokable — installed automatically alongside the underlying skills. Triggers on every UserPromptSubmit / Stop / SessionStart event in Claude Code / Trae.
Original author description
Internal single-process coordinator for the three IDE-hook events used by the learnwy-* skills. UserPromptSubmit aggregates english-learner + llm-wiki + prompt-optimizer scans; Stop aggregates english-learner + knowledge-consolidation scans; SessionStart aggregates llm-wiki + english-learner + learnwy-status scans. Not user-invokable — installed automatically alongside the underlying skills. Triggers on every UserPromptSubmit / Stop / SessionStart event in Claude Code / Trae.
How it works
- Why
- What runs per event
- Installation
- Not for direct invocation
SKILL.md preview
--- name: lwy-dispatch description: "Internal single-process coordinator for the three IDE-hook events used by the learnwy-* skills. UserPromptSubmit aggregates english-learner + llm-wiki + prompt-optimizer scans; Stop aggregates english-learner + knowledge-consolidation scans; SessionStart aggregates llm-wiki + english-learner + learnwy-status scans. Not user-invokable — installed automatically alongside the underlying skills. Triggers on every UserPromptSubmit / Stop / SessionStart event in Claude Code / Trae." metadata: author: "learnwy" version: "2.0" --- # learnwy-dispatch Single-process coordinator for the three IDE-hook events shared by the learnwy-* skills. ## Why Before this skill, every event fired N separate hook commands — one Node process per skill — and the user saw N back-to-back `<system-reminder>` blocks per turn. That multiplies the per-turn hook startup cost (~50 ms × N vs ~50 ms) and clutters context. This skill replaces those entries with **one hook per event** that imports each skill's pure scanner function, runs them in-process, and emits a single combined reminder. ## What runs per event ### UserPromptSubmit (`hooks/user-prompt-submit.cjs`) | Order | Module | Returns reminder when | |---|---|---| | 1 | `english-learner/lib/prompt-scan.scanPrompt` | English ratio ≥ 0.6 OR Chinese learn-intent OR Chinese ratio ≥ 0.3 | | 2 | `llm-wiki/lib/prompt-scan.scanPrompt` | wiki/topics.txt has any keyword overlapping a 4+ char word in the message | | 3 | `prompt-optimizer/lib/prompt-scan.scanPrompt` | explicit "optimize my prompt" trigger OR long structured prompt-shape | ### Stop (`hooks/stop.cjs`) | Order | Module | Returns reminder when | |---|---|---| | 1 | `english-learner/lib/stop-scan.scanStop` | Assistant response has 2–4 advanced English words worth surfacing | | 2 | `knowledge-consolidation/lib/stop-scan.scanStop` | Response shows substantive resolution signals (race condition / regression / "subtle"), not session-local trivia | ### SessionStart (`hooks/session-start.cjs`) | Order | Module | Returns reminder when | |---|---|---| | 1 | `llm-wiki/lib/session-scan.scanSession` | wiki/topics.txt exists — inject ≤30 topics | | 2 | `english-learner/lib/session-scan.scanSession` | First session of the day — push 3 due-for-review cards | | 3 | `learnwy-status/lib/session-scan.scanSession` | First session of the ISO week — prepend a compact cross-skill digest | Each scanner is a pure `(message | payload) => string | null` (a couple have minor side effects: prompt-optimizer appends to `~/.learnwy/prompt-optimizer/events.jsonl`; KC writes a debounce stamp). If any scanner throws, the failure is swallowed and the others still run. ## Installation This skill is installed by `pnpm run install:hooks` like any other skill. The corresponding `UserPromptSubmit` entries in `english-learner`, `llm-wiki`, and `prompt-optimizer` `hooks.json` files have been removed — only this skill registers a UserPromptSubmit handler now. After upgrading from a version without `learnwy-dispatch`, run: ```bash pnpm run uninstall:hooks # remove the old per-skill UserPromptSubmit entries pnpm run install:hooks # install the dispatcher (and re-register the others) ``` The `pnpm run install:hooks` orchestrator performs an uninstall sweep before installing, so you can re-run it any time as a one-shot, idempotent operation. ## Not for direct invocation There is no user-facing slash command and no `cli.cjs <subcommand>` other than `install` / `uninstall`. The skill description's trigger keywords exist purely so the AI surface area knows it is registered — direct invocation has no value.
Files in this package (7)
- SKILL.md 4 KB
- hooks.json 1 KB
- references/conditional-reflection.md 16 KB
- scripts/cli.cjs 17 KB
- scripts/hooks/session-start.cjs 25 KB
- scripts/hooks/stop.cjs 14 KB
- scripts/hooks/user-prompt-submit.cjs 19 KB
Versions
The database has no other skills named lwy-dispatch.
Database snapshot: 13.11.2026 · package version e1c7f8762407 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90lwy-status
Cross-subsystem digest for the ~/.learnwy/ data root. Aggregates vocab progress (english-learner), wiki health (llm-wiki), prompt-optimizer trigger trends, knowledge-consolidation nudges, and log size into one report. Use when the user asks for: 'what is my learnwy status',… - 100lwy-llm-wiki
当用户提到'知识库'、'llm wiki'、'个人wiki'、'收录来源'、'编译知识'、'第二大脑'、'构建wiki'、'知识管理', or wants to add books, articles, notes, podcasts, videos, or Feishu group chats/documents to persistent storage, use this skill to build and maintain a continuously compounding knowledge base. When… - 100create-hooks
Expert guidance for creating, configuring, and using Claude Code hooks. Use when working with hooks, setting up event listeners, validating commands, automating workflows, adding notifications, or understanding hook types (PreToolUse, PostToolUse, Stop, SessionStart, UserPromptSubmit, etc). - 90Codex CLI Hooks
This skill should be used when the user asks to "create a Codex hook", "configure Codex CLI hooks", "add a PreToolUse hook for Codex", "block commands in Codex", "create a stop hook", "set up SessionStart hooks", "write Codex hooks.json", or mentions Codex CLI hook events… - 95hook-development
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events… - 95hook-development
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events…