lov-obsidian-ensure-dev-sync
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseObsidian 开发同步
Obsidian Development Sync
诊断并修复插件构建、Vault 同步及热重载链路。
Diagnose and fix plugin build, Vault synchronization, and hot-reload chains.
Triggers
Triggers
Activate when
Activate when
- “诊断并修复插件构建、Vault 同步及热重载链路。”
- “Fix an Obsidian plugin development sync chain.”
- “Diagnose and fix the plugin build, Vault synchronization, and hot-reload chain.”
- “Fix an Obsidian plugin development sync chain.”
Do not activate when
Do not activate when
- 只是查询本 Skill 的说明,或请求与上述结果无关的任务;不执行实际业务操作。
- 用户仅要预览或审查时,不进入修改、提交或发布分支。
- The user is only querying this Skill’s description or requesting tasks unrelated to the results above; do not perform actual business operations.
- The user only wants a preview or review; do not enter modification, commit, or publishing branches.
Execution boundary
Execution boundary
自然语言请求即可触发;无需旧 slash 路径、参数插值或指定助手。明确解析当前请求中的
项目、目标文件、选项与输出位置;用当前宿主实际提供的文件、搜索、CLI 和浏览器能力。
项目依赖版本与外部 API 在执行时核实,不能假设示例是现行配置。随包脚本从 Skill 根解析,
业务文件从目标项目根解析。先读当前状态,保护已有未提交内容与其他任务的暂存区。
分析、预览请求保持只读;修改、提交、推送、部署和发布各依当前请求的明确范围执行。
不绕过保护、自动发送消息、强制结束用户进程或抢前台。失败保留可诊断原始错误。
Natural-language requests are sufficient to trigger execution; no legacy slash path, argument interpolation, or designated assistant is required. Explicitly resolve the project, target files, options, and output location in the current request; use the file, search, CLI, and browser capabilities actually provided by the current host.
Verify project dependency versions and external APIs at execution time; do not assume examples represent current configurations. Resolve bundled scripts from the Skill root and business files from the target project root. Read the current state first and protect existing uncommitted changes and the staging areas of other tasks.
Keep analysis and preview requests read-only; perform modifications, commits, pushes, deployments, and releases only within the explicit scope of the current request.
Do not bypass protections, automatically send messages, forcibly terminate user processes, or take over the foreground. On failure, preserve the original error for diagnosis.
Workflow
Workflow
-
读取 manifest id、build/dev scripts、esbuild 配置和当前输出目录;确认这是 Obsidian 插件,区分 dist 构建与生产后的转换步骤。
-
解析显式 OBSIDIAN_PLUGIN_PATH 或项目 OBSIDIAN_VAULT_PATH,项目配置优先于无关 shell 遗留值。目标路径未确定时停止写入,不写占位 Vault 路径。
-
检查成功构建后的同步 hook、manifest/styles/main 复制与 .hotreload;只在无构建错误时同步,并保留 Vault 内 data.json 及用户设置。
-
按实际工具增加安全的文件复制或参数化 rsync,避免 execSync 拼接路径;失败需传播并记录。开发链必须包含必要 postbuild 转换。
-
检查 hot-reload 插件的真实 id 与资源。缺少时先按当前可信来源核验再安装到指定 Vault;不覆盖 community-plugins.json,不假称已在 UI 启用。
-
复用运行中的 watcher 验证构建文件校验和、Vault 文件与可得运行日志;静态配置正确、文件同步和实际热重载分别报告。
-
Read the manifest id, build/dev scripts, esbuild configuration, and current output directory; confirm that this is an Obsidian plugin and distinguish the dist build from post-production conversion steps.
-
Resolve the explicit OBSIDIAN_PLUGIN_PATH or project OBSIDIAN_VAULT_PATH. Project configuration takes precedence over unrelated leftover shell values. If the target path cannot be determined, stop all writes and do not write to a placeholder Vault path.
-
Inspect the post-build synchronization hook, copying of manifest/styles/main, and .hotreload; synchronize only when there are no build errors, and preserve data.json and user settings within the Vault.
-
Add safe file copying or parameterized rsync using the tools actually available; avoid concatenating paths with execSync. Propagate and record failures. The development chain must include all required postbuild transformations.
-
Check the actual id and resources of the hot-reload plugin. If missing, verify them against a currently trusted source before installing into the specified Vault; do not overwrite community-plugins.json or claim that the plugin has been enabled in the UI.
-
Reuse the running watcher to verify checksums of built files, Vault files, and available runtime logs. Report static configuration correctness, file synchronization, and actual hot reload separately.
Composition
Composition
执行前读取 能力组合,按明确制品交接相邻能力。
Before execution, read Capability Composition and hand off adjacent capabilities according to the explicitly defined artifacts.
Runtime context (shared)
Runtime context (shared)
运行前读取本包 与 Profile 合同。优先级为当前请求、
项目上下文、本 Skill records、共享 preferences、brand/user Profile、安全默认值。
只读取声明字段;没有专用运行时的宿主可使用 读取共享 Profile。
配置缺失只问影响结果的一个问题。用户明确要求长期保存的值通过该脚本原子写入,
报告实际路径;不保存推断、凭据或其他任务的资料。
skill.yamlscripts/profile_store.pyBefore execution, read this package’s and Profile Contract. The priority order is the current request, project context, this Skill’s records, shared preferences, brand/user Profile, and security defaults.
Read only declared fields; hosts without a dedicated runtime may use to read the shared Profile.
If configuration is missing, ask only one question that affects the result. Values the user explicitly requests to store long-term are written atomically through this script, and their actual paths must be reported; do not store inferred information, credentials, or materials from other tasks.
skill.yamlscripts/profile_store.py