j6-hbdk-compile

j6-hbdk-compile is a skill for Claude Code, Codex from HorizonRobotics/OE-Skills. It costs 97 tokens per session (6,800 once invoked), scanned A, original, Apache-2.0.

A configuration-driven process for compiling ONNX or BC machine-learning models for J6 HBDK hardware. It creates a YAML configuration, waits for approval by default, then compiles and checks the output.

In plain words
What is it for?
Use it to generate compilation settings, compile supported models, check unsupported operations and outputs, measure performance, and produce a report.
Why use it?
It makes model compilation follow a defined sequence and prevents compilation from starting before important settings are confirmed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Use it to generate compilation settings, compile supported models, check unsupported operations and outputs, measure performance, and produce a report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/horizonrobotics/oe-skills/j6-hbdk-compile
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HorizonRobotics/OE-Skills --skill j6-hbdk-compile
Clone the repo
git clone --depth 1 https://github.com/HorizonRobotics/OE-Skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for j6-hbdk-compile

README.md
[![agentmods](https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-hbdk-compile/github.svg)](https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-hbdk-compile)
Your own site
<a href="https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-hbdk-compile"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-hbdk-compile/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for j6-hbdk-compile

Your own site · 80×15
<a href="https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-hbdk-compile"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-hbdk-compile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,800 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00097 $0.06800
Opus 5 $0.00048 $0.03400
Sonnet 5 $0.00019 $0.01360
Haiku 4.5 $0.00010 $0.00680

Measured 12d ago against content hash 7b6471699b75, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

j6-hbdk-compile scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/__init__.py, scripts/compile_model.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

horizon/skills/hbdk/j6-hbdk-compile/SKILL.md · 567 lines

How it starts

The opening of the file, as written. The whole thing — 567 lines — stays where its author put it; the contents beside it link to each section on GitHub.

J6 HBDK Compile - 通用模型编译 Skill

版本: 1.1.8

概述

本 skill 基于 YAML 配置文件驱动模型编译流程:

  1. 解析用户指令 -> 生成配置文件
  2. 用户确认配置文件 -> 是否需要修改
  3. 加载配置并执行编译 -> 检查 CPU 算子 -> 校验产物 -> hbm_perf -> 生成报告

交互原则(Step 2 为默认强制门禁)

  • 默认:Step 1 生成或写出 compile_config_*.yaml 后,必须先执行 Step 2,向用户展示配置路径与关键字段摘要,并结束本轮回复、等待用户下一条消息。在用户给出明确肯定(如「直接编译」「确认」「可以」)之前,禁止运行 compile_model.py -c 或任何等价编译命令。
  • 唯一例外:用户在同一条用户消息中已写明可跳过确认(如「直接编译」「跳过确认」「按上述配置立刻编译」「生成配置后马上编」),才允许在同一轮助手流程中连续执行 Step 1→3。
  • 仍须单独确认(不得默认继续):缺少模型路径;pyramid/resizer 的 mean/std 等关键项与用户描述不符或需用户拍板;检测到 CPU 算子后是否继续;编译失败后的重试或改配策略。
  • 模型合法性校验失败立即终止本 skill 流程;禁止修改 compile_model.py 或用旁路脚本绕过检查(详见下文「模型合法性检查」)。

默认配置

  • 目标平台: nash-e
  • 输出目录: 模型同级目录下的 compile_<timestamp> 文件夹(带时间戳避免覆盖)
  • 删除 QDQ 节点: 通过 remove_node_type: ["Quantize"]remove_all_qdq 已废弃)
  • debug: true

模型合法性检查(加载阶段)

compile_model.py首次加载模型时(含 --generate-config 拉取 IO 与正式编译的 load_model)会执行以下检查,不通过则立即终止(异常或非零退出)并输出明确错误信息;不得在同一轮任务里继续执行后续编译步骤或假装已加载成功。

检查项 行为
文件后缀 仅允许 .onnx.bc;否则报错「不支持的模型类型」并停止。
.bc 能否 load hbdk4.compiler.load 失败,提示生成该 .bc 的 hbdk4 版本可能与当前环境不兼容,并停止。
.bc 阶段 在 load 成功后检查 inner modulenamed attributes:若存在 hbdk.target,则视为已 convertquantized.bc,本流程需要 qat.bc;否则继续。判定规则与业务侧 check_current_phase 一致:无 hbdk.target 时按 qat.bc 处理。
.onnx onnx.load 成功后,图中需至少包含一个 op_type == "HzCalibration" 的节点(Horizon PTQ 标志);否则报错并提示用户检查是否为 horizon_plugin_pytorch 导出的 PTQ ONNX

硬门禁(校验失败 = 停止本 skill 工作流)
任一检查失败时,你必须立刻停止:不得继续跑 -c、不得在未换模型的情况下反复「试编译」、不得替用户编造已通过校验的结论。应原样引用终端/日志中的错误信息,并明确告知用户需在模型或环境侧完成的动作(例如改回 qat.bc、换用带 HzCalibration 的 PTQ ONNX、对齐 hbdk4 与导出工具链版本)。

对 Agent 的禁止事项(严禁绕过校验)

  • 禁止为通过检查而修改 compile_model.py(包括注释、删除或改写 assert_supported_model_suffixload_bc_model_validatedassert_bc_is_qat_phaseassert_onnx_has_hz_calibration 及调用它们的代码路径)。
  • 禁止编写或使用其它脚本 / 临时 Python,在不做同等语义校验的情况下加载模型,仅为生成 IO、写 yaml 或推进编译。
  • 禁止向用户建议通过删断言、sed 去掉检查、环境变量关闭校验等方式绕过。
  • 唯一合规做法:用户更换为满足上表的模型或环境后,再重新执行本仓库中的 compile_model.py(含 Docker 场景下同步到容器内的同一份脚本,亦不得删减校验)。

Read the full file on GitHub · 567 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 567 lines · 97 tokens per session scan A 7b6471699b75

Subscribe to this mod's changes

j6-hbdk-compile is a skill published in the GitHub repository HorizonRobotics/OE-Skills (19 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 97 tokens to every session and 6,800 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

spark-environment-setup

Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13). Use when installing PyTorch/Unsloth/TRL/vLLM on DGX Spark, hitting libcudart or wheel-ABI errors on aarch64, or choosing between NGC containers and bare pip installs.

wshobson/agents · 76 tokens

spark-memory-thermal-ops

Manage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.

wshobson/agents · 59 tokens

spark-training-gotchas

Preflight and diagnose the ten known failure modes for ML training on NVIDIA DGX Spark. Use when a training run on DGX Spark fails to start, OOMs below the 128GB limit, slows down mid-run, or before any multi-hour training job on GB10.

wshobson/agents · 63 tokens

llama-cpp

Runs LLM inference on CPU, Apple Silicon, and consumer GPUs without NVIDIA hardware. Use for edge deployment, M1/M2/M3 Macs, AMD/Intel GPUs, or when CUDA is unavailable. Supports GGUF quantization (1.5-8 bit) for reduced memory and 4-10× speedup vs PyTorch on CPU.

davila7/claude-code-templates · 76 tokens

minicpm5-deploy-vllm-ascend

Deploy MiniCPM5-2B with vLLM on Huawei Ascend NPU using vLLM-Ascend. Use when the user mentions vLLM-Ascend, Ascend NPU, Huawei Ascend, CANN, torchnpu, davinci devices, or wants an OpenAI-compatible MiniCPM5 server on Ascend hardware.

OpenBMB/MiniCPM · 87 tokens

minicpm5-deploy-litert

Run MiniCPM5-2B or MiniCPM5-1B on-device with Google's LiteRT-LM runtime — the litert-lm CLI or its OpenAI-compatible server on a desktop, the Kotlin API or the AI Edge Gallery app on Android, the same .litertlm bundle on CPU or GPU. Use when the user says "LiteRT", "LiteRT-LM", "litertlm", ".litertlm", "Android"…

OpenBMB/MiniCPM · 121 tokens