local-build-reminder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Local Build Reminder

本地构建提醒

Always-on reminder for OMC fork development. When OMC is running in local mode (HUD shows
[OMC#X.Y.ZL]
with an
L
suffix), Claude Code loads compiled JavaScript from
dist/
— NOT TypeScript source from
src/
. Edits to
.ts
files are invisible to the running plugin until
npm run build
regenerates
dist/
.
OMC分支开发的常驻提醒。当OMC以本地模式运行时(HUD显示带
L
后缀的
[OMC#X.Y.ZL]
),Claude Code会从
dist/
加载编译后的JavaScript,而非从
src/
加载TypeScript源码。对
.ts
文件的修改在运行中的插件中不会生效,直到执行
npm run build
重新生成
dist/
目录。

When to invoke this skill

何时触发该技能

The AI should mention this reminder whenever any of these happens:
  1. The user (or the AI itself) just edited
    src/**/*.ts
    in this repo.
  2. The user asks "why isn't my change working?" / "I edited X but it does the same" after a TS edit.
  3. The user is about to restart Claude Code and the working tree has TS edits with no rebuild.
  4. The user runs an OMC command and expects new behavior tied to a TS edit.
当出现以下任一情况时,AI应给出此提醒:
  1. 用户(或AI自身)刚刚修改了本仓库中的
    src/**/*.ts
    文件。
  2. 用户在编辑TS文件后询问“为什么我的修改不生效?”/“我修改了X但结果还是一样”。
  3. 用户即将重启Claude Code,且工作区存在未重新构建的TS修改。
  4. 用户执行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
src/...
. Run
npm run build
before restarting Claude Code —
dist/
won't reflect the change otherwise.
If multiple TS files were edited in a row, just remind once at the end.
先给出清晰的一句话提示,再附上准确的命令。无需每次对话都重复提醒——每轮TS编辑提醒一次即可。示例:
注意:你修改了
src/...
。重启Claude Code前请执行
npm run build
——否则
dist/
不会同步修改内容。
如果连续修改了多个TS文件,只需在最后提醒一次。

When NOT to remind

无需提醒的场景

  • The user only edited
    .mjs
    /
    .cjs
    /
    .md
    /
    .json
    — those load directly from disk, no build needed.
  • The user is in a Claude Code session that isn't running OMC locally (no
    L
    in the HUD).
  • A
    tsc --watch
    /
    npm run dev:full
    is already running in the background — those rebuild automatically on save.
  • 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

文件类型速查表

PathRestart picks up edit?Needs build?
src/**/*.ts
Only after buildYes
templates/hooks/**/*.mjs
YesNo
scripts/**/*.mjs
/
*.cjs
YesNo
skills/**/SKILL.md
YesNo
agents/**/*.md
YesNo
commands/**/*.md
YesNo
.claude-plugin/plugin.json
Yes (on Claude restart)No
docs/**/*.md
Cosmetic onlyNo
路径重启后会生效修改吗?需要构建吗?
src/**/*.ts
仅构建后生效
templates/hooks/**/*.mjs
scripts/**/*.mjs
/
*.cjs
skills/**/SKILL.md
agents/**/*.md
commands/**/*.md
.claude-plugin/plugin.json
是(重启Claude后)
docs/**/*.md
仅外观变化

One-command setup for hands-free dev

一键设置实现免手动开发

If the user is iterating heavily and tired of remembering the build, suggest:
powershell
npm run dev:full
This runs
tsc --watch
plus all bridge builders in parallel — every save triggers a rebuild within a second, so
restart Claude Code
is all that's needed afterwards.
如果用户频繁迭代,厌烦手动构建,可建议执行:
powershell
npm run dev:full
该命令会并行运行
tsc --watch
及所有桥接构建器——每次保存后一秒内会自动触发重新构建,之后只需“重启Claude Code”即可。

Detection signal — how the AI knows it's "local mode"

检测信号——AI如何判断“本地模式”

The HUD's
[OMC#X.Y.ZL]
suffix is the visible cue. Programmatically, the detection lives in
src/lib/version.ts::isRuntimePackageLocal()
and triggers on any of:
.git/
at package root,
src/
at package root, package reached via symlink/junction, or any ancestor is a symlink/junction.
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分支仓库内部时,默认处于本地模式——此时提醒始终适用。