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,053 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,053 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.01053
Opus 5.5 $0.00032 $0.00421
Sonnet 5.5 $0.00016 $0.00211
Haiku 4.5 $0.00008 $0.00105

Measured 1mo ago against content hash 490471d5e945, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 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 定义、JIT/compile_flags、内存分配、数据搬运 Kernel 编写、编译配置、片上存储管理
api-compute.md GEMM、归约、tmp arena、Element-wise、Tile 扩展原语 GEMM、Softmax、逐元素计算、排序、显式 UB 规划
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 内存层级、layout、init 与模式对应的同步
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 Developer/Hybrid 用 threads + passes;Expert 用显式 scope/sync
流水线优化 api-schedule-sync T.Pipelined num_stages、核间/核内流水线
多核负载均衡 api-schedule-sync T.Persistent 缓存友好调度
排序 api-compute T.tile.sort → T.tile.merge_sort → T.tile.topk
显式 UB scratch / row-expand api-compute 区分通用 tmp arena 与 row-expand 专用布局
JIT 编译选项 api-kernel-memory 使用 kernel-scoped compile_flags,不修改进程环境
手动缓冲复用 api-schedule-sync 同时审计 ready 与 free 两个 ownership 方向
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 · 49 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. 1mo ago Changed · -47 lines 490471d5e945
  2. 1mo ago Changed bf35f90733fc
  3. 2mo 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 (427 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 1,053 once invoked, about $0.0003 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.

Related

tilelang-api-best-practices compared with skills from other repositories

tilelang-api-best-practices next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tilelang-api-best-practicestile-ai/tilelang-ascendSkill427yesterdayMITA79Claude Code, Codex
jupyter-notebookNousResearch/hermes-agentSkill261kyesterdayMITA18Claude Code, Codex
matlabK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA44Claude Code
pennylaneK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA74Claude Code
cuequivariance-jaxNVIDIA/skillsSkill3.9kyesterdayApache-2.0A38Claude Code, Codex
cuequivariance-torchNVIDIA/skillsSkill3.9kyesterdayApache-2.0A37Claude Code, Codex
cuopt-numerical-optimization-apiNVIDIA/skillsSkill3.9kyesterdayApache-2.0A51Claude Code, Codex