一键导入
sync-viewer-symlinks
Ensure site/viewer/lib has correct symlinks to src/viewer/assets/lib
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Ensure site/viewer/lib has correct symlinks to src/viewer/assets/lib
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when adding or changing what the rezolus viewer exposes — an /api/v1 endpoint, a dashboard section, the metric catalog, metadata/description derivation, or the frontend data those depend on — or when editing src/viewer/ or crates/viewer/, or reviewing a viewer change. The viewer ships as two separate Rust backends (server + WASM) behind one shared frontend; changing one silently diverges them.
Use when starting or picking up a non-trivial effort (feature, investigation, perf probe, refactor, migration) in a shared repo where teammates or future agents must coordinate or hand off; when a repo has no durable in-tree record of decisions and dead-ends; when you're about to drop a well-measured negative result; or when bootstrapping a journal from a repo's commit history.
Use when reviewing a Rezolus sampler change before merge — a new sampler, a change to an existing sampler's probes/refresh/metrics, or core changes that affect samplers; or whenever a sampler's overhead, cadence, or data source is in question.
Write or update the CLI `--help` text and README section for a new or changed rezolus feature (a subcommand, flag, mode, or behavior change), then prove the help is usable by dispatching a fresh subagent that has never seen the code. Use this whenever you add or change how rezolus is invoked — new `rezolus <subcommand>`, new flags/args on an existing mode, renamed options, or changed defaults — and any time the user says the help/README is thin, stale, confusing, or "an agent couldn't figure this out." Treats help text as an interface under test, not prose.
Tag and push a prerelease from the current Cargo.toml version. Use when the user wants to cut an alpha/beta/rc prerelease. Aborts on stable versions (no `-` in version string) and if the tag already exists.
Create a feature branch, commit changes, push, and open a PR against iopsystems/rezolus
| name | sync-viewer-symlinks |
| description | Ensure site/viewer/lib has correct symlinks to src/viewer/assets/lib |
Synchronize symlinks in site/viewer/lib/ so that the site viewer picks up
all shared modules from src/viewer/assets/lib/.
The site viewer (site/viewer/) shares most of its JavaScript and CSS with
the agent viewer (src/viewer/assets/). Shared files are kept as symlinks
in site/viewer/lib/ pointing into src/viewer/assets/lib/. A small set of
site-specific files are standalone (not symlinked).
When new files are added to src/viewer/assets/lib/, the corresponding
symlink in site/viewer/lib/ must be created manually. This skill detects
and fixes any missing symlinks.
These files in site/viewer/lib/ are site-specific and must NOT be replaced
with symlinks:
data.js — site-specific wrapper that imports shared logic from data_base.jsscript.js — site-specific entry pointdashboards.js — site-specific dashboard definitionsviewer_api.js — site-specific API transport layersrc/viewer/assets/lib/data.js is symlinked as site/viewer/lib/data_base.js
(different name, because site has its own data.js wrapper)Scan src/viewer/assets/lib/ recursively for all .js and .css files
For each source file, determine the expected symlink path in
site/viewer/lib/ using these rules:
script.js, viewer_api.js (top-level only)data.js (top-level) → data_base.js symlinkCheck whether the expected symlink exists and points to the correct
target. Compute the relative path from the symlink location back to the
source file (e.g., ../../../src/viewer/assets/lib/charts/chart.js for a
file in site/viewer/lib/charts/).
Create any missing symlinks. Create parent directories if needed. Report each symlink created.
Detect any stale symlinks in site/viewer/lib/ that point to
non-existent source files, and report them (but don't delete without
asking).
Stage newly created symlinks with git add.
Report a summary: how many symlinks checked, how many created, any stale links found.
A Claude Code hook at .claude/settings.json runs
.claude/scripts/pre-commit-check.sh before every git commit. It blocks
the commit if:
site/viewer/lib/src/viewer/dashboard/ or src/viewer/plot.rs files are staged)Both files are git-ignored (.claude/* excluding skills). To set up the
hook on a fresh checkout, create .claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash(git commit*)",
"hooks": [
{
"type": "command",
"command": ".claude/scripts/pre-commit-check.sh",
"timeout": 120
}
]
}
]
}
}
And copy or recreate .claude/scripts/pre-commit-check.sh (see the
existing copy in this repo's working tree for reference).