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 mindspore-ai/akg --skill op-testgit clone --depth 1 https://github.com/mindspore-ai/akgWrote 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/mindspore-ai/akg/op-test)<a href="https://agentmods.dev/skills/mindspore-ai/akg/op-test"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/op-test/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/mindspore-ai/akg/op-test"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/op-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00113 | $0.04860 |
| Opus 5 | $0.00056 | $0.02430 |
| Sonnet 5 | $0.00023 | $0.00972 |
| Haiku 4.5 | $0.00011 | $0.00486 |
Grade A, and why
op-test 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 9d 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 — 437 lines — stays where its author put it; the contents beside it link to each section on GitHub.
算子鲁棒性测试
流程概览
- 信息收集 — 读取 task_code / kernel_code,提取 tensor 签名、维度语义、kernel 分块参数
- 准备环境与测试目录 — 根据用户提供的 akg_agents 路径和环境名激活环境,创建独立测试目录
- 编写测试脚本并运行 — 复制通用运行器 (
robustness_test_runner.py),编写算子特定脚本(CONFIG + TEST_CASES + make_inputs),导入 Model / ModelNew,构造变异 shape/dtype 输入,精度验证(子进程 + 超时保护)+ 性能测试(方法与 akg_agents 仓库一致),DevicePool 支持多设备并行 - 分析结果与生成报告 — 输出 JSON 原始数据 + Markdown 洞察分析(失败模式聚类、性能剖面、修复建议)
Shape 变异策略
总元素数分级
根据单个 tensor flatten 后的元素数分为三级:
| 级别 | 元素数 | 说明 |
|---|---|---|
| 小 shape | ≤ 1e3 | 边界和极端情况 |
| 中等 shape | 1e4 ~ 1e7 | 常见业务场景 |
| 大 shape | ≥ 1e8 | 大规模计算,精度累积(按显存/内存量力而行) |
同一级别内 1 个代表值即可。
选值原则
- 每级 1 个代表:小、中、大各一个 shape
- 对齐边界:根据 kernel 的 BLOCK_SIZE / VECTOR_SIZE 取 BLOCK-1 和 BLOCK+1
- 最小边界:所有维度为 1
- 极端纵横比:某个维度为 1,其他维度大(如单 batch)
- 非 2 的幂:至少 1 个含素数或非对齐维度的 shape
典型 case 组成(8-12 个)
| # | 类型 | 说明 |
|---|---|---|
| 1 | 原始 shape | 基准 |
| 2 | 小 shape | ≤ 1e3 元素 |
| 3 | 中等 shape | 1e4 ~ 1e7 元素 |
| 4 | 大 shape | ≥ 1e8 元素(按显存/内存调整) |
| 5 | 最小边界 | 所有维度 = 1 |
| 6 | 极端纵横比 | 某维度 = 1 |
| 7 | 对齐边界 | BLOCK_SIZE ± 1 |
| 8 | 非 2 的幂 | 含素数维度 |
| 9+ | dtype 变异 | 原始 shape + 不同 dtype |
维度约束
- 自由维度(如 batch_size):直接变异输入 shape
- 参数绑定维度(如 Linear 的 in_features):需重新创建模型实例
dtype 变异策略
| 原始 dtype | 建议测试 |
|---|---|
| float32 | float16, bfloat16 |
| bfloat16 | float16, float32 |
| float16 | bfloat16, float32 |
精度容忍度:
| dtype | 容忍度 |
|---|---|
| float32 | 0.02 |
| float16 | 0.004 |
| bfloat16 | 0.03 |
执行流程
阶段 0:信息收集
读取 task_code 和 kernel_code,提取:
- tensor 签名:从
get_inputs()和Model.forward()确定每个输入的 shape 和 dtype - 维度语义:标注每个维度(batch、reduction_axis、spatial 等)
- 参数约束:从
get_init_inputs()确定哪些维度受模型参数绑定 - kernel 分块参数:查看 kernel 中的 BLOCK_SIZE、VECTOR_SIZE 等常量
- 当前验证通过的配置:shape、dtype、backend、dsl、arch
What ships with it
2 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.
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.
- 9d ago First seen · 437 lines · 113 tokens per session scan A 33e50a16c978
op-test is a skill published in the GitHub repository mindspore-ai/akg (259 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 113 tokens to every session and 4,860 once invoked, about $0.0006 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-09-03.
Other skills, from other repositories
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
mobiai-ios-testing
Use when writing or running tests in an iOS project — unit tests, UI tests, snapshot tests, choosing the right framework.
junit-5-skill
Generates production-grade JUnit 5 unit and integration tests in Java. Covers assertions, parameterized tests, lifecycle hooks, mocking with Mockito, and nested tests. Use when user mentions "JUnit", "JUnit 5", "@Test", "assertEquals", "Assertions", "Java unit test". Triggers on: "JUnit", "@Test", "assertEquals"…
restore-internals-seams-in-finally-blocks-after-each-test
When delegating a task affected by this skill, include.