tilelang-ascend: Skill for Claude Code

.agents/skills/tilelang-custom-skill/tilelang-api-best-practices/SKILL.md

tilelang-api-best-practices is a skill for Claude Code, Codex from tile-ai/tilelang-ascend. It costs 79 tokens per session (1,573 once invoked), scanned A, original, MIT.

A reference guide for using TileLang APIs when writing kernels for Huawei Ascend AI processors. A kernel is a small program that performs work such as moving data, multiplying matrices, or reducing values.

In plain words
What is it for?
It is for writing Ascend kernels involving matrix multiplication, softmax or layer normalization, element-by-element operations, atomic accumulation, pipelines, and multi-core work.
Why use it?
It helps developers choose the documented API patterns for memory, calculations, scheduling, synchronization, and debugging.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is tile-ai/tilelang-ascend's own configuration. It tells Claude Code and Codex how to work on tilelang-ascend itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tilelang-ascend configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tile-ai/tilelang-ascend. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tile-ai/tilelang-ascend/ascendc_pto/.agents/skills/tilelang-custom-skill/tilelang-api-best-practices/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tile-ai/tilelang-ascend

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for tilelang-api-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-api-best-practices/github.svg)](https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-api-best-practices)
Your own site
<a href="https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-api-best-practices"><img src="https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-api-best-practices/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.

agentmods 80×15 button for tilelang-api-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-api-best-practices"><img src="https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-api-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00079 $0.01573
Opus 5 $0.00039 $0.00787
Sonnet 5 $0.00016 $0.00315
Haiku 4.5 $0.00008 $0.00157

Measured 9d ago against content hash d5f89f94ae0f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

tilelang-api-best-practices 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.

.agents/skills/tilelang-custom-skill/tilelang-api-best-practices/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TileLang Ascend API 最佳实践


API 文档索引

文档 涵盖内容 典型场景
api-kernel-memory.md Kernel 定义(T.prim_func, T.Kernel, @jit)、内存分配(Developer: T.alloc_shared/fragment/var, Expert: T.alloc_ub/L1/L0x)、数据搬运(T.copy) Kernel 编写、片上存储管理、数据搬运
api-compute.md 矩阵计算(T.gemm_v0, T.mma)、归约(T.reduce_sum/max/min)、Element-wise(T.Parallel + 符号 API)、Tile 扩展原语(T.tile.xxx,含 T.tile.atomic_add) GEMM、Softmax、逐元素计算、排序、原子累加
api-schedule-sync.md 循环(T.serial, T.unroll)、流水线(T.Pipelined)、持久化调度(T.Persistent)、同步(T.set_flag/wait_flag, T.barrier_all, T.set_cross_flag)、调试(T.printf, T.dump_tensor) 流水线优化、多核均衡、同步、调试

场景索引

使用场景 相关文档 关键技巧
GEMM 矩阵乘 api-compute, api-kernel-memory shared→fragment 层级搬运、init 参数、T.barrier_all
Softmax/LayerNorm api-compute T.reduce_max/sum、T.tile.exp/sub/div
逐元素计算 api-compute T.Parallel + 符号 API 或 T.tile.xxx 两种范式
多 block/core 累加到 GM api-compute T.tile.atomic_add(dst_gm, src_local),调用前显式清零 GM
CV 融合算子 api-kernel-memory, api-schedule-sync workspace 索引一致性、AUTO_CV_COMBINE、vid 并行化
流水线优化 api-schedule-sync T.Pipelined num_stages、核间/核内流水线
多核负载均衡 api-schedule-sync T.Persistent 缓存友好调度
排序 api-compute T.tile.sort → T.tile.merge_sort → T.tile.topk
Kernel 调试 api-schedule-sync T.printf、T.dump_tensor、get_kernel_source()
dtype 标量回退适配 api-compute 先确认硬件支持;同宽 reinterpret / kernel 内 cast / record-aware DMA / 块 DMA + UB-local fallback;宽 dtype lane 拆分仅作已验证实验

Read the full file on GitHub · 96 lines

Files

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.

Changes

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.

  1. 9d ago First seen · 96 lines · 79 tokens per session scan A d5f89f94ae0f

Subscribe to this mod's changes

tilelang-api-best-practices is a skill published in the GitHub repository tile-ai/tilelang-ascend (363 stars, last pushed today), licensed MIT. It adds 79 tokens to every session and 1,573 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-08-30.

Related

Other skills, from other repositories

jupyter-notebook

Iterative Python via live Jupyter kernel (hamelnb).

NousResearch/hermes-agent · 18 tokens

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.

K-Dense-AI/scientific-agent-skills · 42 tokens

pennylane

Hardware-agnostic quantum ML framework with automatic differentiation. Use when training quantum circuits via gradients, building hybrid quantum-classical models, or needing device portability across IBM/Google/Rigetti/IonQ. Best for variational algorithms (VQE, QAOA), quantum neural networks, and integration with…

K-Dense-AI/scientific-agent-skills · 98 tokens

cuopt-numerical-optimization-api

LP, MILP, and QP (beta) with cuOpt — Python, C, and CLI. Use when the user is solving LP, MILP, or QP with any cuOpt interface.

NVIDIA/skills · 51 tokens

rocm-kernels

Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…

huggingface/kernels · 93 tokens

gh-address-comments

Help address review/issue comments on the open GitHub PR for the current branch using gh CLI; verify gh auth first and prompt the user to authenticate if not logged in.

foryourhealth111-pixel/Vibe-Skills · 39 tokens