tilelang-ascend: Skill for Claude Code

.agents/skills/tilelang-a5-sim-convert/SKILL.md

tilelang-a5-sim-convert is a skill for Claude Code, Codex from tile-ai/tilelang-ascend. It costs 93 tokens per session (1,864 once invoked), scanned A, original, MIT.

A converter that creates a separate script for running a TileLang example in the A5 camodel simulator, a software environment that imitates Ascend hardware execution.

In plain words
What is it for?
Use it when converting an example for A5 simulation, preparing a camodel run, or testing a kernel in simulation mode instead of on an NPU.
Why use it?
It lets developers test a kernel without running it on a physical NPU. The original script remains unchanged while the simulator version is generated alongside it.

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-a5-sim-convert/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-a5-sim-convert

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-a5-sim-convert"><img src="https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-a5-sim-convert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,864 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.00093 $0.01864
Opus 5.5 $0.00037 $0.00746
Sonnet 5.5 $0.00019 $0.00373
Haiku 4.5 $0.00009 $0.00186

Measured 2mo ago against content hash 8025c7c38594, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tilelang-a5-sim-convert 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 2mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/parse_example.py, scripts/run_a5_sim_template.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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-a5-sim-convert/SKILL.md · 173 lines

How it starts

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

TileLang A5 Camodel 仿真脚本转换

将任意 tilelang DSL 脚本转换为 A5 camodel 仿真可运行的独立脚本。

模板结构(260 行,只改两处)

模板文件:.agents/skills/tilelang-a5-sim-convert/scripts/run_a5_sim_template.py

行 1-24    import 语句            ← 不动
行 25-96   环境自动设置            ← 不动(_find_ascend_home, _source_cann, _find_sim_lib, setup)
行 99-133  加载 camodel 运行时    ← 不动(load_runtime, dev_malloc)
行 136-166 kernel 定义            ← ★ 第 1 处要改
行 169-260 main() 编译+运行+验证   ← 部分要改(详见下方)

工作流程

收到脚本路径后,按以下步骤执行:

Step 1: 运行解析脚本获取 kernel 信息

cd <tilelang-ascend-root>
python .agents/skills/tilelang-a5-sim-convert/scripts/parse_example.py <target_script>

输出 JSON,包含 kernel_name、buffers(shape/dtype 列表)。

Step 2: 读取模板 + 原始脚本

  • 读取 .agents/skills/tilelang-a5-sim-convert/scripts/run_a5_sim_template.py
  • Read 目标脚本,找到 kernel 定义部分(@T.prim_func 或 @tilelang.jit 装饰的函数体)

Step 3: 生成 *_sim.py

输出路径:<原路径>/<原名>_sim.py(绝不覆盖原始文件)。


改动清单

改动 1:kernel 定义(模板 136-166 行)

原始脚本 仿真脚本
@tilelang.jit(out_idx=[-1]) 删掉
def matmul(M, N, K, ...): def make_kernel():
T.Tensor((M, K), dtype) T.Tensor((1024, 256), "float16") ← 用 Step1 解析出的具体数值
T.alloc_L0C(..., "float16") T.alloc_L0C(..., "float") ← A5 pto-isa 要求 float32
func = matmul(...) 触发编译 删掉,编译在 main() 里统一处理

生成的代码结构:

def make_kernel():
    import tilelang.language as T
    @T.prim_func
    def main(
        A: T.Tensor((1024, 256), "float16"),   # ← 具体数值
        B: T.Tensor((256, 1024), "float16"),
        C: T.Tensor((1024, 1024), "float16"),
    ):
        # ... kernel 逻辑(和原始脚本一模一样)...
    return main

改动 2:数据准备(模板 214-233 行)

a) 维度变量(第 215 行)

根据 Step1 的 buffers 设置:

# 原始模板(gemm 专用)
M, N, K = 1024, 512, 256

# 通用写法:从 buffers 提取
# buffers[0].shape = [M, K]  →  M = shape[0], K = shape[1]
# buffers[1].shape = [K, N]  →  N = shape[1]
# buffers[2].shape = [M, N]

如果不是矩阵(比如 1D/3D tensor),按实际 shape 处理。

b) 数据 dtype(第 216-218 行)

Read the full file on GitHub · 173 lines

Files

What ships with it

2 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. 2mo ago First seen · 173 lines · 93 tokens per session scan A 8025c7c38594

Subscribe to this mod's changes

tilelang-a5-sim-convert is a skill published in the GitHub repository tile-ai/tilelang-ascend (427 stars, last pushed yesterday), licensed MIT. It adds 93 tokens to every session and 1,864 once invoked, about $0.0004 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-a5-sim-convert compared with skills from other repositories

tilelang-a5-sim-convert next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tilelang-a5-sim-converttile-ai/tilelang-ascendSkill427yesterdayMITA93Claude Code, Codex
gke-compute-classesgoogle/skillsSkill22kyesterdayApache-2.0A83Claude Code, Codex
jetson-diagnosticNVIDIA/skillsSkill3.9kyesterdayApache-2.0A30Claude Code, Codex
holoscan-install-wheelNVIDIA/skillsSkill3.9kyesterdayApache-2.0A34Claude Code, Codex
offensive-z-waveSnailSploit/Claude-RedSkill10k25d agoMITA113Claude Code, Codex
doca-socket-relayNVIDIA/skillsSkill3.9kyesterdayApache-2.0A236Claude Code, Codex
hsb-flashNVIDIA/skillsSkill3.9kyesterdayApache-2.0B94Claude Code