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-workflowgit 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-workflow)<a href="https://agentmods.dev/skills/mindspore-ai/akg/kernel-workflow"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/kernel-workflow/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-workflow"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/kernel-workflow.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.00050 | $0.00752 |
| Opus 5.5 | $0.00020 | $0.00301 |
| Sonnet 5.5 | $0.00010 | $0.00150 |
| Haiku 4.5 | $0.00005 | $0.00075 |
Grade A, and why
kernel-workflow 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 3mo 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.
What it actually says
Kernel 算子生成与优化工作流程
流程概述
- 分析用户输入 → 只有要求描述还是有 task 代码?
- 验证/生成 task 代码 → 详见
references/torch_task_verify.md - 选择生成/优化方式 → 详见
references/tool-selection.md - 执行生成/优化 → 调用子Agent(如用户有额外需求,传递
user_requirements) - 返回结果 → 使用
finish
注意:user_requirements 是可选参数。
输入类型判断
- 只有需求描述(无代码)→ 直接
call_op_task_builder - task 代码(包含
class Model(nn.Module))→ 加载references/torch_task_verify.md进行验证 - Kernel 代码需优化(包含
@triton.jit/__global__等)→ 验证 task 代码后加载references/tool-selection.md
基本流程示例
示例 1:用户只有需求描述
用户: 生成一个 ReLU 算子
Think: 用户没有提供代码,直接生成 task。
Action: call_op_task_builder(user_request="生成一个 ReLU 算子")
Observation: {status: "READY", task_code: "...", op_name: "relu"}
Think: task 已生成,加载 tool-selection 指导选择生成方式。
Action: read_file(file_path="resources/skills/kernel-workflow/references/tool-selection.md")
...
示例 2:用户提供 Torch task 代码
用户: 帮我生成这段代码的 kernel: class Model(nn.Module)...
Think: 用户提供了代码,加载验证指南。
Action: read_file(file_path="resources/skills/kernel-workflow/references/torch_task_verify.md")
Observation: <验证指南>
Think: 按指南验证代码格式。
Action: execute_script(script_path="resources/skills/kernel-workflow/scripts/check_torch_code.py", args="--stdin --json", stdin_input="<代码>")
...
示例 3:用户提供 kernel 代码要求优化
用户: 帮我优化这段 Triton kernel: @triton.jit def kernel(...): ...
对应的 task 是: class Model(nn.Module)...
Think: 用户提供了 kernel 和 task,先验证 task。
Action: read_file(file_path="resources/skills/kernel-workflow/references/torch_task_verify.md")
...验证通过后...
Action: read_file(file_path="resources/skills/kernel-workflow/references/tool-selection.md")
...
参考文档
references/torch_task_verify.md- task 代码验证与补全流程references/tool-selection.md- 子Agent 选择与二次确认流程
Scripts
scripts/check_torch_code.py- 验证 task 代码格式(参数:--stdin --json)
禁止行为
- 不验证 task 代码直接调用子Agent
- 用户未指定生成方式时自动选择
- task 已生成后再调用
call_op_task_builder - 调用子Agent 前不进行二次确认
What ships with it
3 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.
- 3mo ago First seen · 82 lines · 50 tokens per session scan A 0f19eb30150b
kernel-workflow is a skill published in the GitHub repository mindspore-ai/akg (269 stars, last pushed yesterday), licensed Apache-2.0. It adds 50 tokens to every session and 752 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.
kernel-workflow compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| kernel-workflowmindspore-ai/akg | Skill | 269 | yesterday | Apache-2.0 | A | 50 | Claude Code, Codex |
| cudnn-compile-and-serializeNVIDIA/skills | Skill | 4.4k | yesterday | Apache-2.0 | A | 59 | Claude Code, Codex |
| cudnn-installNVIDIA/skills | Skill | 4.4k | yesterday | Apache-2.0 | A | 49 | Claude Code, Codex |
| ax-cpp-aiax-llm/ax | Skill | 3.0k | today | Apache-2.0 | A | 47 | Claude Code, Codex |
| ax-cpp-genax-llm/ax | Skill | 3.0k | today | Apache-2.0 | A | 48 | Claude Code, Codex |
| ax-cpp-signatureax-llm/ax | Skill | 3.0k | today | Apache-2.0 | A | 37 | Claude Code, Codex |
| ax-cpp-typesafeax-llm/ax | Skill | 3.0k | today | Apache-2.0 | A | 57 | Claude Code, Codex |