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 kernel-verifiergit 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/kernel-verifier)<a href="https://agentmods.dev/skills/mindspore-ai/akg/kernel-verifier"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/kernel-verifier/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/kernel-verifier"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/kernel-verifier.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.00088 | $0.01204 |
| Opus 5 | $0.00044 | $0.00602 |
| Sonnet 5 | $0.00018 | $0.00241 |
| Haiku 4.5 | $0.00009 | $0.00120 |
Grade A, and why
kernel-verifier 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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Kernel Verifier Skill
验证流程
Step 1 静态代码检查 ├─ 失败 → 结束 └─ 成功 → Step 2 创建验证项目 → Step 3 执行精度验证 → Step 4 收集结果
本 skill 加载后,
<base_url>标签提供 skill 目录路径(记为$SD)。所有验证相关脚本路径基于$SD/scripts/
Step 1: 静态代码检查(快速预检)
在创建验证项目前,先对生成代码进行静态检查,快速拦截明显错误,避免浪费验证资源。
使用 bash 工具调用本 skill 的 scripts/code_check.py(使用命令模板包裹):
python3 $SD/scripts/code_check.py \
--code_file <生成代码文件路径> \
--backend <backend> \
--dsl <dsl>
| 参数 | 必填 | 说明 |
|---|---|---|
--code_file |
是 | 待检查的代码文件路径 |
--backend |
否 | 后端(cuda / ascend / cpu) |
--dsl |
否 | DSL(如 triton_cuda、triton_ascend,triton 系列会做 DSL 合规性检测) |
检查内容(纯静态分析,不调用 LLM,零额外成本):
| 检查项 | 说明 |
|---|---|
| 语法检查 | ast.parse 检测括号不匹配、缩进错误、关键字拼写等 |
| 编译检查 | py_compile 捕获额外编译问题 |
| import 可用性 | 检测代码中引用的模块是否在当前环境可用 |
| 中文文本混入 | 检测代码 token 中连续 ≥3 汉字(注释和字符串除外) |
| DSL 合规性 | 仅 triton 系列:检测是否定义了 @triton.jit kernel、是否通过 kernel[grid](...) 调用、forward() 是否使用了 torch 高层 API 替代 kernel |
路由决策:
| 结果 | 判断 | 动作 |
|---|---|---|
| 通过 | stdout 包含 "静态检查通过",退出码 0 |
继续 Step 2 |
| 失败 | stdout 输出检查报告,退出码 1 | 不进入 Step 2,将报告作为 verifier_error 反馈给代码生成步骤 |
Step 2: 创建验证项目
在验证目录(如 {output-path}/logs/iteration_{n}/verify/)下创建两个文件:
{op_name}_{framework}.py:复制任务文件完整内容(包含Model,get_inputs,get_init_inputs){op_name}_{dsl}_impl.py:复制生成代码完整内容(包含ModelNew)
Step 3: 执行精度验证
必须使用 bash 工具调用本 skill 的 scripts/verify.py(使用命令模板包裹):
python3 $SD/scripts/verify.py \
--op_name <算子名> \
--dsl <dsl> \
--backend <backend> \
--framework <framework> \
--device_id <device_id> \
--verify_dir <验证目录> \
--timeout 300
| 参数 | 必填 | 说明 |
|---|---|---|
--op_name |
是 | 算子名称 |
--dsl |
是 | DSL(如 triton_cuda、triton_ascend) |
--backend |
是 | 后端(cuda / ascend / cpu) |
--framework |
否 | 框架(默认 torch) |
--device_id |
否 | 设备 ID(默认 0,-1 自动选择) |
--verify_dir |
否 | 验证目录(默认当前目录) |
--timeout |
否 | 超时秒数(默认 300) |
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 · 104 lines · 88 tokens per session scan A 599c4d994306
kernel-verifier is a skill published in the GitHub repository mindspore-ai/akg (259 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 88 tokens to every session and 1,204 once invoked, about $0.0004 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.