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.
npx skills add HorizonRobotics/OE-Skills --skill j6-plugin-dynamic-blockgit clone --depth 1 https://github.com/HorizonRobotics/OE-SkillsWrote 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.
[](https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-plugin-dynamic-block)<a href="https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-plugin-dynamic-block"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-plugin-dynamic-block/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.
<a href="https://agentmods.dev/skills/horizonrobotics/oe-skills/j6-plugin-dynamic-block"><img src="https://agentmods.dev/badge/skills/horizonrobotics/oe-skills/j6-plugin-dynamic-block.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00061 | $0.02746 |
| Opus 5.5 | $0.00024 | $0.01098 |
| Sonnet 5.5 | $0.00012 | $0.00549 |
| Haiku 4.5 | $0.00006 | $0.00275 |
Grade A, and why
j6-plugin-dynamic-block 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 2mo ago.
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.
How it starts
The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.
为 Horizon QAT 自动添加 dynamic_block 标注(Scope 约束版)
目标
在使用 horizon_plugin_pytorch 的基于图(如 PrepareMethod.JIT_STRIP / PrepareMethod.JIT)的 prepare 流程适配模型时,针对动态循环/动态控制流里会触发 function 算子替换 或 算子融合 的代码段,自动补齐 dynamic_block 标注,把该段逻辑定义为独立的 Scope,避免:
- 同一行 function 多次调用在不同 trace 次数/路径下导致的 scale/scope 错位
- 动态部分与静态部分意外融合,造成 forward 报错
- 算子替换/融合在动态控制流中发生时的 量化信息错乱
适用范围
- 你正在为
horizon_plugin_pytorch做量化适配,并使用prepare(..., method=PrepareMethod.JIT_STRIP/JIT)这类基于图的模式。 - 模型
forward存在运行次数/执行路径不稳定的逻辑,例如:- 循环次数由输入/随机数/外部状态决定(
numpy.random/数据相关分支等)
- 循环次数由输入/随机数/外部状态决定(
- 且该动态逻辑内部包含可能被
prepare替换/融合的算子(例如某些 torch function、可融合的 Conv+BN(+Add) 等 pattern)。
重要限制:
- 如果你的逻辑是纯静态的(没有数据依赖的 for/while、没有根据输入/随机数决定执行次数),即使其中有可替换或可融合算子,也不应该额外包 dynamic_block。
强约束(本 Skill 的“必须做到”)
- 只标注需要算子替换/融合的逻辑块,不要把整个 for/while 循环都包进去:标注的是“块内的算子替换/融合逻辑”,不是控制流本身。
Tracer.dynamic_block的第一个参数必须是当前nn.Module实例(通常是self),不是 function / lambda / 普通 callable:正确用法是Tracer.dynamic_block(self, "BlockName"),不要写成Tracer.dynamic_block(some_func, "BlockName")。with Tracer.dynamic_block(...)必须放在循环/分支内部,只包住需要替换/融合的语句,不要把for/while控制流包进with:控制流负责“执行次数/路径”,dynamic_block负责给其中那段非 module scope 的动态算子逻辑建立稳定 Scope。- 不要对“已经处于 Module Scope 内”的逻辑额外加 dynamic_block:
nn.Module.forward本身就是一个 Scope。- 因此如果动态控制流里只有“子 module 调用”(例如循环里只做
x = self.layer1(x)),通常不需要也不应该再包dynamic_block。 dynamic_block的主要目标是:动态控制流中出现的 非 module scope 的 function/Tensor 逻辑(例如x = x + 1、x = torch.relu(x)、x = sub_one(x))导致的 function 替换/融合错误的问题。
- 动态块必须是稳定可复现的 Scope:
- 同一段逻辑每次执行应使用同一个
dynamic_block名称(如果用命名 API)。 - 不要在同一
forward里复用同一个名字去标不同语义的块。
- 同一段逻辑每次执行应使用同一个
- 优先使用
Tracer.dynamic_block(self, "<Name>")(当代码中已引入/可引入Tracer且希望显式命名)。 - 如果已有 dynamic_block 标注,不重复嵌套/不改语义:只在缺失且确有必要的位置补齐。
标准改法(优先推荐)
1) 引入 Tracer(推荐写法)
from horizon_plugin_pytorch.fx.jit_scheme import Tracer
2) 在动态循环/动态分支中,包住需要替换/融合的算子段
for _ in range(n): # n 可能是动态的
# 只标注需要算子替换/融合的逻辑块(不是整个循环)
with Tracer.dynamic_block(self, "ConvBnAdd"):
x = self.conv(x)
x = self.bn(x)
x = x + y
What ships with it
1 file 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.
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.
- 2mo ago First seen · 173 lines · 61 tokens per session scan A 0dc5c2ea4892
j6-plugin-dynamic-block is a skill published in the GitHub repository HorizonRobotics/OE-Skills (27 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 61 tokens to every session and 2,746 once invoked, about $0.0002 per session on Opus 5.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.
j6-plugin-dynamic-block compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| j6-plugin-dynamic-blockHorizonRobotics/OE-Skills | Skill | 27 | 4mo ago | Apache-2.0 | A | 61 | Claude Code, Codex |
| agent-platform-model-registrygoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 60 | Claude Code, Codex |
| foundry-config-setupmicrosoft/agent-framework | Skill | 15k | yesterday | MIT | A | 65 | Claude Code, Codex |
| google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skills | Skill | 22k | yesterday | Apache-2.0 | A | 132 | Claude Code, Codex |
| training-checkwanshuiyin/Auto-claude-code-research-in-sleep | Skill | 19k | 3d ago | MIT | A | 35 | Claude Code |
| nemo-automodel-launcher-configNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 30 | Claude Code |
| finetuningmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 132 | Claude Code |