visualize

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Visualize an OKF bundle

可视化OKF包

Generate a self-contained HTML graph of the target bundle (default the project's
.okf/
). No backend, no install on the viewing side, no data leaves the page.
bash
uv run "${CLAUDE_SKILL_DIR}/scripts/okf_visualize.py" $ARGUMENTS
If
uv
is unavailable:
bash
python3 -m pip install --quiet pyyaml && \
python3 "${CLAUDE_SKILL_DIR}/scripts/okf_visualize.py" $ARGUMENTS
The detail panel shows each concept's
status
,
generated
,
verified
,
stale_after
, and
sources
(with their credibility signals, a
usage_count
alongside the
usage_window
that frames it); a
sources
entry pointing at another concept in the bundle also becomes a graph edge. A v0.1
timestamp
is read as
generated.at
, so legacy bundles still render fully.
Two badges are derived, not read: the §5.3 trust tier (unverified / machine-confirmed / human-reviewed, keyed off the
human:
prefix in
verified[].by
) and staleness (
today >= stale_after
). They are advisory signals — when reporting on a bundle, say which tier a concept is in rather than treating any of them as a gate.
The output defaults to
<bundle>/viz.html
. Pass
-o <path>
to write elsewhere. Bundles above 1,000 concepts default to the linear
concentric
layout (the force layout freezes the page at that size —
--layout cose
overrides), and
--max-nodes N
refuses oversized bundles, e.g. for CI. Open it in any browser;
${CLAUDE_SKILL_DIR}
resolves whether this runs as part of the
okf
plugin or as a standalone skills.sh skill.
生成目标包的独立HTML图谱(默认是项目的
.okf/
目录)。无需后端,查看端无需安装,数据不会离开页面。
bash
uv run "${CLAUDE_SKILL_DIR}/scripts/okf_visualize.py" $ARGUMENTS
如果
uv
不可用:
bash
python3 -m pip install --quiet pyyaml && \
python3 "${CLAUDE_SKILL_DIR}/scripts/okf_visualize.py" $ARGUMENTS
详情面板会显示每个概念的
status
generated
verified
stale_after
sources
(包含可信度信号、
usage_count
以及对应的
usage_window
);指向包内另一个概念的
sources
条目也会成为图谱的一条边。v0.1版本的
timestamp
会被读取为
generated.at
,因此旧版包仍可完整渲染。
有两个徽章是派生的,而非直接读取:§5.3信任等级(未验证 / 机器确认 / 人工审核,由
verified[].by
中的
human:
前缀决定)和过期状态(
today >= stale_after
)。它们是参考信号——在报告包内容时,应说明概念所属的等级,而非将其作为准入门槛。
输出默认路径为
<bundle>/viz.html
。传递
-o <path>
参数可指定其他输出位置。超过1000个概念的包默认使用线性
concentric
布局(力导向布局在该规模下会导致页面卡顿——
--layout cose
可覆盖此设置),
--max-nodes N
参数会拒绝处理过大的包,例如用于CI场景。在任意浏览器中打开生成的文件即可;
${CLAUDE_SKILL_DIR}
会自动解析此工具是作为
okf
插件运行还是作为独立的skills.sh技能运行。