tilelang-ascend: Skill for Claude Code

.agents/skills/tilelang-custom-skill/tilelang-env-check/SKILL.md

tilelang-env-check is a skill for Claude Code, Codex from tile-ai/tilelang-ascend. It costs 112 tokens per session (6,823 once invoked), scanned A, original, MIT.

An environment checker for TileLang Ascend development. It verifies the repository, required Python packages, CANN—the toolkit for Ascend hardware—installation, compilation, and environment variables.

In plain words
What is it for?
Use it to check or set up a development environment, verify required versions, pull missing repository submodules, compile the project, and confirm that the environment is ready.
Why use it?
It finds setup problems that could prevent code from compiling or running. When supported problems are found, it repairs them in dependency order and checks again.

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 →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/user/Ascend/cann-8.5.0.

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-env-check/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-env-check

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-env-check"><img src="https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-env-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,823 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.
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.00112 $0.06823
Opus 5.5 $0.00045 $0.02729
Sonnet 5.5 $0.00022 $0.01365
Haiku 4.5 $0.00011 $0.00682

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

Security

Grade A, and why

tilelang-env-check 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 3 executable files (scripts/check_env.sh, scripts/get_npu_arch.py, scripts/quick_verify.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-custom-skill/tilelang-env-check/SKILL.md · 637 lines

How it starts

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

TileLang-Ascend 环境检查

概述

本技能用于验证 TileLang-Ascend 开发环境是否正确配置。包括:

  1. Python 包依赖检查:检查 torch 和 torch_npu 是否已安装且版本满足要求(torch/torch_npu >= 2.6.0)
  2. CANN 环境检查:检查 ASCEND_HOME_PATH 环境变量是否设置且版本满足要求(CANN >= 8.3)
  3. 代码仓库完整性检查:验证代码和子模块是否完整拉取
  4. 编译安装检查:验证是否已成功编译安装
  5. 环境变量检查:验证必要的环境变量是否设置

重要特性:

  • 发现问题时,会自动调用相关 skill 进行修复,并按依赖顺序重新执行后续步骤
  • 所有问题都会打印提示给用户,包括会被自动修复的问题,让用户知道之前存在这个问题

前置检查说明:步骤 0-1 为前置检查,只检查不修复,检查完成后统一告知用户结果,然后继续后续检查流程。

触发条件

当用户提到以下关键词时触发:

  • 环境检查、检查环境、验证环境
  • 环境配置、环境搭建
  • env check、check environment、verify environment、setup environment

版本要求

检查项 最低版本要求 说明
torch >= 2.6.0 PyTorch 基础库
torch_npu >= 2.6.0 昇腾 NPU 支持
CANN >= 8.3 昇腾计算架构

依赖关系说明

环境配置三步骤之间存在严格的依赖关系:

子模块完整 ──→ 编译成功 ──→ 环境变量设置

关键规则:

问题场景 需要执行的操作
子模块缺失 ① 拉取子模块 → ② 重新编译 → ③ 设置环境变量
无编译产物(子模块完整) ① 编译 → ② 设置环境变量
环境变量未设置 设置环境变量

重要:如果子模块缺失,即使之前存在编译产物,也必须重新编译,因为旧产物是基于不完整代码生成的。

自动修复策略

当检查发现问题时,AI agent 应主动执行以下修复操作,并按依赖顺序执行:

问题类型 自动修复动作 后续必须操作
子模块不完整 调用 tilelang-submodule-pull skill 必须重新编译 + 设置环境变量
编译产物不存在 执行 bash install_ascend.sh 必须设置环境变量
环境变量未设置 执行 source set_env.sh 无

重要:修复前必须告知用户问题存在,修复后再告知用户已修复。

检查流程

前置步骤零:检查 Python 包依赖

检查 torch 和 torch_npu 包是否已安装且版本满足要求:

# 检查 torch 和 torch_npu 版本
pip list 2>/dev/null | grep -E "^torch\s|^torch_npu\s" || pip3 list 2>/dev/null | grep -E "^torch\s|^torch_npu\s"

检查逻辑:

  • 同时存在 torch 和 torch_npu 且版本 >= 2.6.0:前置检查通过
  • 缺失 torch:告知用户 "✗ 未安装 torch 包"
  • 缺失 torch_npu:告知用户 "✗ 未安装 torch_npu 包"
  • torch 版本 < 2.6.0:告知用户 "✗ torch 版本过低 (当前版本: X.X.X),需要 >= 2.6.0"
  • torch_npu 版本 < 2.6.0:告知用户 "✗ torch_npu 版本过低 (当前版本: X.X.X),需要 >= 2.6.0"
  • 两者都缺失:告知用户 "✗ 未安装 torch 和 torch_npu 包"

版本比较方法: 使用 Python 进行版本比较:

python3 -c "
import re
def check_version(pkg_line, min_ver):
    match = re.search(r'(\d+\.\d+\.\d+)', pkg_line)
    if match:
        ver = match.group(1)
        parts = [int(x) for x in ver.split('.')]
        min_parts = [int(x) for x in min_ver.split('.')]
        return ver, parts >= min_parts[:len(parts)]
    return None, False

torch_line = 'torch                     2.5.0'  # 示例
torch_npu_line = 'torch_npu                 2.5.0'  # 示例

torch_ver, torch_ok = check_version(torch_line, '2.6.0')
torch_npu_ver, torch_npu_ok = check_version(torch_npu_line, '2.6.0')

if not torch_ok:
    print(f'torch 版本过低: {torch_ver}')
if not torch_npu_ok:
    print(f'torch_npu 版本过低: {torch_npu_ver}')
"

Read the full file on GitHub · 637 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. 2mo ago First seen · 637 lines · 112 tokens per session scan A 0b739a67f03b

Subscribe to this mod's changes

tilelang-env-check is a skill published in the GitHub repository tile-ai/tilelang-ascend (427 stars, last pushed yesterday), licensed MIT. It adds 112 tokens to every session and 6,823 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-env-check compared with skills from other repositories

tilelang-env-check next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tilelang-env-checktile-ai/tilelang-ascendSkill427yesterdayMITA112Claude Code, Codex
cardputer-buddyanthropics/claude-plugins-officialSkill46kyesterdayApache-2.0A109Claude Code
holoscan-install-wheelNVIDIA/skillsSkill3.9kyesterdayApache-2.0A34Claude Code, Codex
holoscan-module-lifecycleNVIDIA/skillsSkill3.9kyesterdayApache-2.0A47Claude Code, Codex
triton-ascendmindspore-ai/akgSkill2652d agoApache-2.0A28Claude Code, Codex
triton-ascend-case-index-putmindspore-ai/akgSkill2652d agoApache-2.0A73Claude Code, Codex
HA Integration Devtonylofgren/aurora-smart-homeSkill109yesterdayMITA55Claude Code