local-build-reminder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLocal Build Reminder
本地构建提醒
Always-on reminder for OMC fork development. When OMC is running in local
mode (HUD shows with an suffix), Claude Code loads compiled
JavaScript from — NOT TypeScript source from . Edits to
files are invisible to the running plugin until regenerates
.
[OMC#X.Y.ZL]Ldist/src/.tsnpm run builddist/OMC分支开发的常驻提醒。当OMC以本地模式运行时(HUD显示带后缀的),Claude Code会从加载编译后的JavaScript,而非从加载TypeScript源码。对文件的修改在运行中的插件中不会生效,直到执行重新生成目录。
L[OMC#X.Y.ZL]dist/src/.tsnpm run builddist/When to invoke this skill
何时触发该技能
The AI should mention this reminder whenever any of these happens:
- The user (or the AI itself) just edited in this repo.
src/**/*.ts - The user asks "why isn't my change working?" / "I edited X but it does the same" after a TS edit.
- The user is about to restart Claude Code and the working tree has TS edits with no rebuild.
- The user runs an OMC command and expects new behavior tied to a TS edit.
当出现以下任一情况时,AI应给出此提醒:
- 用户(或AI自身)刚刚修改了本仓库中的文件。
src/**/*.ts - 用户在编辑TS文件后询问“为什么我的修改不生效?”/“我修改了X但结果还是一样”。
- 用户即将重启Claude Code,且工作区存在未重新构建的TS修改。
- 用户执行OMC命令,并期望获得与TS修改相关的新行为。
What to say
提醒话术
Surface one clear sentence followed by the exact command. Don't repeat the
reminder on every turn — once per "round" of TS editing is enough. Example:
Heads up: you edited. Runsrc/...before restarting Claude Code —npm run buildwon't reflect the change otherwise.dist/
If multiple TS files were edited in a row, just remind once at the end.
先给出清晰的一句话提示,再附上准确的命令。无需每次对话都重复提醒——每轮TS编辑提醒一次即可。示例:
注意:你修改了。重启Claude Code前请执行src/...——否则npm run build不会同步修改内容。dist/
如果连续修改了多个TS文件,只需在最后提醒一次。
When NOT to remind
无需提醒的场景
- The user only edited /
.mjs/.cjs/.md— those load directly from disk, no build needed..json - The user is in a Claude Code session that isn't running OMC locally
(no in the HUD).
L - A /
tsc --watchis already running in the background — those rebuild automatically on save.npm run dev:full - The user just asked an unrelated question; don't shoehorn the reminder into off-topic responses.
- 用户仅修改了/
.mjs/.cjs/.md文件——这些文件直接从磁盘加载,无需构建。.json - 用户所在的Claude Code会话并非本地运行OMC(HUD中无后缀)。
L - 后台已运行/
tsc --watch——这些命令会在保存时自动重新构建。npm run dev:full - 用户刚提出了无关问题;不要强行在无关回复中插入提醒。
File-type cheat sheet
文件类型速查表
| Path | Restart picks up edit? | Needs build? |
|---|---|---|
| Only after build | Yes |
| Yes | No |
| Yes | No |
| Yes | No |
| Yes | No |
| Yes | No |
| Yes (on Claude restart) | No |
| Cosmetic only | No |
| 路径 | 重启后会生效修改吗? | 需要构建吗? |
|---|---|---|
| 仅构建后生效 | 是 |
| 是 | 否 |
| 是 | 否 |
| 是 | 否 |
| 是 | 否 |
| 是 | 否 |
| 是(重启Claude后) | 否 |
| 仅外观变化 | 否 |
One-command setup for hands-free dev
一键设置实现免手动开发
If the user is iterating heavily and tired of remembering the build, suggest:
powershell
npm run dev:fullThis runs plus all bridge builders in parallel — every save
triggers a rebuild within a second, so is all that's
needed afterwards.
tsc --watchrestart Claude Code如果用户频繁迭代,厌烦手动构建,可建议执行:
powershell
npm run dev:full该命令会并行运行及所有桥接构建器——每次保存后一秒内会自动触发重新构建,之后只需“重启Claude Code”即可。
tsc --watchDetection signal — how the AI knows it's "local mode"
检测信号——AI如何判断“本地模式”
The HUD's suffix is the visible cue. Programmatically, the
detection lives in and triggers
on any of: at package root, at package root, package reached
via symlink/junction, or any ancestor is a symlink/junction.
[OMC#X.Y.ZL]src/lib/version.ts::isRuntimePackageLocal().git/src/When running inside the OMC fork repo itself, the AI is by definition in
local mode — the reminder always applies.
HUD中的后缀是可见标识。从程序层面,检测逻辑位于,当满足以下任一条件时触发:包根目录存在、包根目录存在、包通过符号链接/连接点访问,或任何祖先目录是符号链接/连接点。
[OMC#X.Y.ZL]src/lib/version.ts::isRuntimePackageLocal().git/src/当AI运行在OMC分支仓库内部时,默认处于本地模式——此时提醒始终适用。