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 triton-syntaxgit 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/triton-syntax)<a href="https://agentmods.dev/skills/mindspore-ai/akg/triton-syntax"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/triton-syntax/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/triton-syntax"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/triton-syntax.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.00021 | $0.02813 |
| Opus 5 | $0.00010 | $0.01406 |
| Sonnet 5 | $0.00004 | $0.00563 |
| Haiku 4.5 | $0.00002 | $0.00281 |
Grade A, and why
triton-syntax 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 — 404 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Triton编程语言
概述
Triton是一种专为GPU编程设计的Python DSL,目标是让GPU编程像NumPy一样简单。
核心特性
1. Python-like语法
@triton.jit
def add_kernel(
x_ptr, y_ptr, output_ptr,
n_elements,
BLOCK_SIZE: tl.constexpr
):
# 程序ID
pid = tl.program_id(axis=0)
# 块偏移
block_start = pid * BLOCK_SIZE
offsets = block_start + tl.arange(0, BLOCK_SIZE)
# Mask处理边界
mask = offsets < n_elements
# 加载数据
x = tl.load(x_ptr + offsets, mask=mask)
y = tl.load(y_ptr + offsets, mask=mask)
# 计算
output = x + y
# 存储结果
tl.store(output_ptr + offsets, output, mask=mask)
2. 自动优化
Triton编译器自动进行:
- 内存合并优化
- 共享内存管理
- 寄存器分配
- 指令调度
3. Block编程模型
# 每个program处理一个block的数据
BLOCK_SIZE = 1024
grid = lambda meta: (triton.cdiv(n_elements, meta['BLOCK_SIZE']),)
add_kernel[grid](x, y, output, n_elements, BLOCK_SIZE=BLOCK_SIZE)
数据类型
基本类型
tl.float32 # 32位浮点
tl.float16 # 半精度浮点
tl.bfloat16 # Brain浮点
tl.int32 # 32位整数
tl.int64 # 64位整数
Tensor类型
# 1D tensor
x = tl.arange(0, BLOCK_SIZE) # shape: [BLOCK_SIZE]
# 2D tensor
rows = tl.arange(0, BLOCK_M)[:, None] # shape: [BLOCK_M, 1]
cols = tl.arange(0, BLOCK_N)[None, :] # shape: [1, BLOCK_N]
内存操作
加载(Load)
# 基本加载
data = tl.load(ptr + offsets)
# 带mask加载(处理边界)
data = tl.load(ptr + offsets, mask=mask, other=0.0)
# 带cache hint
data = tl.load(ptr + offsets, cache_modifier=".ca") # cache all
存储(Store)
# 基本存储
tl.store(ptr + offsets, data)
# 带mask存储
tl.store(ptr + offsets, data, mask=mask)
计算操作
算术运算
# 逐元素运算
c = a + b
c = a * b
c = a / b
c = tl.exp(a)
c = tl.log(a)
c = tl.sqrt(a)
规约操作
# Sum
total = tl.sum(x, axis=0)
# Max
maximum = tl.max(x, axis=0)
# Min
minimum = tl.min(x, axis=0)
矩阵运算
# Dot product
c = tl.dot(a, b) # 高度优化的矩阵乘法
# 支持混合精度
c = tl.dot(a.to(tl.float16), b.to(tl.float16), acc=tl.float32)
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 · 404 lines · 21 tokens per session scan A 88eb25d4694e
triton-syntax is a skill published in the GitHub repository mindspore-ai/akg (259 stars, last pushed 29d ago), licensed Apache-2.0. It adds 21 tokens to every session and 2,813 once invoked, about $0.0001 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
langium
A comprehensive skill to understanding how Langium-based projects work — from grammar definition through code generation, runtime parsing, linking, validation, and LSP integration.
lai-gen-mcp
Generate a Model Context Protocol (MCP) server that exposes a Langium DSL's parser and validator as an MCP tool, allowing any MCP-compatible client to validate DSL code and receive diagnostics.
lai-gen-descriptor
Generate or refine a language descriptor for a Langium DSL project. Bootstraps a new descriptor via lai gen descriptor if none exists, then guides refinement of paths, services, examples, documentation, and structure.
lai-gen-language-skill
Skill for generating a skill for understanding a specific Langium-based DSL. Used in cooperation with the lai & langium skills for understanding.
matlab
Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.
ast-grep
Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…