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 agentmods add skills/mindspore-ai/akg/kernel-workflownpx skills add mindspore-ai/akg --skill kernel-workflowgit clone --depth 1 https://github.com/mindspore-ai/akgWhat 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 | $0.00050 | $0.00752 |
| Opus 5 | $0.00025 | $0.00376 |
| Sonnet 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 3d 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.
- 3d 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 (259 stars, last pushed 23d ago), licensed Apache-2.0. It adds 50 tokens to every session and 752 once invoked, about $0.0003 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.
Other skills, from other repositories
add-macos-statusbar
Add a macOS menu bar status indicator for NanoClaw. Shows a bolt icon with a green/red dot indicating whether NanoClaw is running, with Start, Stop, and Restart controls. macOS only.
cli-anything-3mf
3MF mesh geometry editor — detect and resize cylindrical holes, repair meshes, compare 3D printing files. Works with BambuStudio and PrusaSlicer 3MF files.
platform-port
Guide porting FastLED to new MCU platforms, including int.h types, clockless drivers, SPI implementations, and platform detection. Use when adding support for a new microcontroller family or board.
doca-compress
Use this skill for hands-on DOCA Compress programming on a BlueField DPU, ConnectX NIC, or host with DOCA — enabling compress-deflate, decompress-deflate, decompress-lz4-stream, or decompress-lz4-block tasks on a docacompress context (the hardware supports DEFLATE both directions plus LZ4 decompress; LZ4 encode is NOT…
pcbway
PCBWay PCB fabrication and assembly — turnkey/consigned assembly, design rules, ordering workflow. Alternative to JLCPCB for manufacturing. Use with KiCad. Use this skill when the user mentions PCBWay, needs turnkey assembly (PCBWay sources parts by MPN), has parts not available on LCSC, needs assembled boards with…
anta-validation
Validate Arista EOS network state with structured pass/fail verdicts using ANTA. Use for "is this switch healthy", "did my change break anything", "verify BGP/interfaces/hardware are correct", "run a health check on this device". Read-only. A test for a feature the device does not run reports notapplicable — never a…