onescience-cli — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited onescience-cli (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
本技能根目录: 与当前 SKILL.md 同目录。资产路径均按本技能根目录解析,不按当前工作目录猜测。
需要环境检测与远程连接细则时,读取 ./references/cli_rules.md。 需要可渲染命令模板时,读取 ./references/cli_flow.md。
本技能是在远端环境执行任意 onescience 命令的统一入口。onescience 命令需预先安装,本技能不检查或安装 onescience 工具。本技能不限制子命令范围,任何 onescience 支持的子命令均可透传执行。
负责:
discover -> precheck(先检查计算节点 → 再检查环境)-> execute 运行闭环execution_mode、access_mode、execution_channel、hardware_profileonescience-installer 的主机发现与连接方式)onescience 命令执行用户请求的子命令不负责:
onescience-installer 负责)onescience 工具onescience-runtime 负责)| 阶段 | 触发条件 | 目标 | 关键输出 |
|---|---|---|---|
discover | 每次执行 | 命令级别判定 + 连接远端环境,收集运行目标与环境事实 | execution_mode、hardware_profile、remote_access_info、command_level |
precheck | 非 lightweight 级别 | 检查环境是否满足运行条件(先计算节点 → 再环境) | env_ready、on_compute_node、precheck_outcome |
execute | precheck 通过或 lightweight 快速通道 | 通过 onescience 命令执行用户请求的子命令 | onescience_command、execution_state、output |
三阶段按顺序推进,每阶段向用户实时汇报当前步骤。lightweight 级别跳过 precheck 直接进入 execute 快速通道。
precheck 发现不在计算节点时,交由 onescience-runtime 通过 sbatch 提交作业处理。precheck 发现环境未加载时,提示调用 onescience-installer。
优先消费:
skills/onescience-runtime/assets/execution_profiles.jsonskills/onescience-runtime/assets/backend_specs.jsonhardware_profile、execution_mode、access_mode若上游未给出可靠 execution_mode,用 cli_flow.md 的 §0 判定当前 shell 是否已在目标环境中。
IN_CONTAINER=yes:视为 local_slurm,当前 shell 即为执行目标IN_CONTAINER=no:视为 remote_slurm,必须先完成主机发现根据 cli_rules.md §0.1 规则判定当前命令级别:
| 级别 | 包含命令 |
|---|---|
lightweight | help, --version, list, info, config show/get |
normal | log, status, upgrade, remock, config set |
compute | bench 及所有训练/推理/评估命令 |
lightweight → 跳过 §1 环境探测和 §3 环境检查,走快速通道normal → 跳过 §1 环境探测和 §2 计算节点判定,执行 §3 环境检查compute → 执行完整三阶段参照 onescience-installer 的主机发现流程:
onescience.json 的 runtime.remote~/.ssh/configuser、host/hostname、port、identity_file 中任一项时,只询问缺失项Host 别名优先:当 ~/.ssh/config 中存在配置完整的 Host 条目时,使用 {ssh_host_alias} 替代完整的 -p -i user@host 参数。
仅对 `compute` 级别执行:lightweight 和 normal 级别跳过本节。
执行命令:
remote_slurm:执行 cli_flow.md 的 §1local_slurm:执行 cli_flow.md 的 §1b探测内容:
nvidia-smi)hipcc)/opt/dtk-*、/opt/rocm*、/usr/local/cuda*)/dev/kfd)module avail)实时汇报:🔄 正在执行 §1 远端环境探测...
命令级别决定跳过哪些检查步骤:
| 级别 | §2 计算节点判定 | §3 环境加载检查 |
|---|---|---|
lightweight | 跳过 | 跳过(走快速通道) |
normal | 跳过 | 执行 |
compute | 执行 | 执行 |
仅对 `compute` 级别执行。
执行命令:
remote_slurm:执行 cli_flow.md 的 §2 远端判定local_slurm:执行 cli_flow.md 的 §2 就地判定检查内容:
SLURM_NODEID:检查是否已设置SLURM_JOB_ID:检查是否已设置SLURM_JOB_NODELIST:检查是否已设置SLURM_NTASKS:检查是否已设置SLURM_CLUSTER_NAME:检查是否已设置hostname:获取当前主机名scontrol show node:尝试获取节点信息实时汇报:📋 正在执行 §2 计算节点判定...
不在计算节点时:调用 onescience-runtime 技能,通过 sbatch 提交作业到计算节点执行。
对 `normal` 和 `compute` 级别执行。
执行命令:
remote_slurm:执行 cli_flow.md 的 §3 远端检查local_slurm:执行 cli_flow.md 的 §3 就地检查检查内容:
onescience311 是否存在$CONDA_DEFAULT_ENV 是否为 onescience311module list 输出python -c "import onescience; print(onescience.__version__)" 是否成功实时汇报:📋 正在执行 §3 环境加载检查...
不满足条件时:调用 onescience-installer 技能完成环境初始化。
命令形式为:
onescience {onescience_subcommand} {onescience_args}其中 {onescience_subcommand} 是用户请求的子命令,{onescience_args} 是子命令后的附加参数。
根据命令级别和执行模式选择模板:
| 级别 | remote_slurm | local_slurm |
|---|---|---|
| lightweight | §5 快速执行通道 | §5 就地 |
| normal | §6 普通执行命令 | §6 就地 |
| compute | §4 通用执行命令 | §7 通用执行命令 |
快速通道(lightweight)特点:
普通通道(normal)特点:
计算通道(compute)特点:
remote_slurm:通过 SSH 在远端执行 onescience 命令onescience-runtime 的 sbatch 提交作业local_slurm:在当前计算节点上直接执行 onescience 命令日志路径:
{remote_work_dir}/.onescience/cli_logs{remote_work_dir}/.onescience/output日志同步:
remote_slurm:执行完成后通过 scp 同步日志到本地 .onescience/cli_logs/local_slurm:直接复制到本地 .onescience/cli_logs/输出展示:
只在以下情况询问用户:
onescience-runtime 通过 sbatch 提交作业onescience-installer每次阶段汇报或执行完成时,直接向用户展示以下内容,无需用户再次询问:
🚀 快速通道:跳过环境探测与检查,直接执行
📋 目标主机:{hostname}
📋 命令级别:lightweight
🚀 execute:正在执行 onescience {onescience_subcommand} {onescience_args}...
📊 输出结果:
{output}
📊 执行状态:{execution_state}
📊 退出码:{exit_code}🔄 discover:正在连接远端环境...
📋 目标主机:{hostname}
📋 硬件类型:{required_backend_id}
📋 执行模式:{execution_mode}
🔄 precheck:正在检查环境...
📋 计算节点状态:{on_compute_node}
📋 环境加载状态:{env_ready}
🚀 execute:正在执行 onescience {onescience_subcommand} {onescience_args}...
📊 输出结果:
{output}
📊 执行状态:{execution_state}
📊 退出码:{exit_code}
📂 日志路径:{log_path}❌ 执行失败
📋 错误类型:{error_category}
📋 错误信息:{error_message}
📋 建议:{suggested_action}
📊 退出码:{exit_code}| 错误类型 | 说明 |
|---|---|
command_not_found | onescience 命令未找到 |
permission_denied | 权限不足 |
missing_config | 配置文件缺失 |
missing_data | 数据文件缺失 |
out_of_memory | 内存不足 |
network_error | 网络错误 |
cli_error | onescience 命令执行错误 |
ssh_failure | SSH 连接失败 |
验证流程:
onescience-installer 返回 verify_state=verifiedenv_ready=true 后才进入 executefalse,输出: ❌ 环境安装失败
📋 建议:手动检查环境或联系管理员状态跟踪流程:
job_idsqueue -j {job_id} 轮询状态| 文件 | 用途 |
|---|---|
./references/cli_flow.md | 可渲染命令模板(§0–§7) |
./references/cli_rules.md | discover / precheck / execute 细则,含命令分级、快速通道和 Host Key 容错 |
skills/onescience-installer/SKILL.md | 环境初始化委托给 onescience-installer 技能处理 |
skills/onescience-runtime/SKILL.md | 计算节点申请与作业提交委托给 onescience-runtime 技能处理 |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.