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 pypto-case-elemwise-gelugit 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/pypto-case-elemwise-gelu)<a href="https://agentmods.dev/skills/mindspore-ai/akg/pypto-case-elemwise-gelu"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/pypto-case-elemwise-gelu/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/pypto-case-elemwise-gelu"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/pypto-case-elemwise-gelu.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.00040 | $0.00437 |
| Opus 5 | $0.00020 | $0.00218 |
| Sonnet 5 | $0.00008 | $0.00087 |
| Haiku 4.5 | $0.00004 | $0.00044 |
Grade A, and why
pypto-case-elemwise-gelu 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 12d 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
模式 A:1D Elementwise — GELU
def create_gelu_kernel(flat_size):
@pypto.frontend.jit(runtime_options=..., debug_options=...)
def gelu_kernel(
x: pypto.Tensor((flat_size,), pypto.DT_FP32),
) -> pypto.Tensor((flat_size,), pypto.DT_FP32):
output = pypto.tensor([flat_size], pypto.DT_FP32)
pypto.set_vec_tile_shapes(8192)
x_cubed = x * x * x
inner = x + x_cubed * 0.044715
tanh_arg = inner * 0.7978845608028654
exp_pos = pypto.exp(tanh_arg * 2.0)
tanh_val = (exp_pos - 1.0) / (exp_pos + 1.0)
output[:] = x * 0.5 * (1.0 + tanh_val)
return output
return gelu_kernel
forward:reshape(-1) → kernel → reshape(x.shape)
模式要点
- forward 中
assert dim + shape,reshape(-1)展平为 1D set_vec_tile_shapes(8192)— 1D 只需一个参数- 无内建 tanh →
(exp(2x)-1)/(exp(2x)+1)— 注意exp_pos - 1.0中 Tensor 在左,合法 - 所有
Tensor op scalar合法;若需scalar op Tensor则改写
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.
- 12d ago First seen · 39 lines · 40 tokens per session scan A 588180d77a75
pypto-case-elemwise-gelu is a skill published in the GitHub repository mindspore-ai/akg (259 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 40 tokens to every session and 437 once invoked, about $0.0002 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
triton-cuda-examples-torch
A set of complete examples showing how Triton CUDA kernels work inside PyTorch, including vector addition, matrix multiplication, layer normalization, and softmax.
triton-ascend-examples-mindspore
Integration examples for using Triton Ascend kernels inside MindSpore, a machine-learning framework. They show how to register a custom operation and pass tensors in and out.
pypto-case-norm-batchnorm
A worked example of BatchNorm, a machine-learning step that normalizes values in groups, for three-dimensional data. It demonstrates reducing dimensions, summing across several axes, and copying values across expanded dimensions.
pypto-case-loss-crossentropy
An example of implementing cross-entropy loss, a calculation commonly used to measure classification errors. It covers multiple inputs, tiled processing, softmax, selecting target values, summing, and producing one scalar result.
pypto-case-norm-layernorm
A PyPTO example showing how LayerNorm normalises values across a two-dimensional input using a loop. LayerNorm is a machine-learning operation that rescales values to help a model process them consistently.
pypto-case-elemwise-gelu
A PyPTO example for applying the GELU activation function element by element to a one-dimensional array. It demonstrates flattening, a hand-written formula without tanh, and operator use.