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.
curl -O https://raw.githubusercontent.com/tile-ai/tilelang-ascend/ascendc_pto/.agents/skills/tilelang-custom-skill/tilelang-env-check/SKILL.mdgit clone --depth 1 https://github.com/tile-ai/tilelang-ascendWrote 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/tile-ai/tilelang-ascend/tilelang-env-check)<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.
<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>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.00112 | $0.06823 |
| Opus 5.5 | $0.00045 | $0.02729 |
| Sonnet 5.5 | $0.00022 | $0.01365 |
| Haiku 4.5 | $0.00011 | $0.00682 |
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.
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 — 637 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TileLang-Ascend 环境检查
概述
本技能用于验证 TileLang-Ascend 开发环境是否正确配置。包括:
- Python 包依赖检查:检查 torch 和 torch_npu 是否已安装且版本满足要求(torch/torch_npu >= 2.6.0)
- CANN 环境检查:检查 ASCEND_HOME_PATH 环境变量是否设置且版本满足要求(CANN >= 8.3)
- 代码仓库完整性检查:验证代码和子模块是否完整拉取
- 编译安装检查:验证是否已成功编译安装
- 环境变量检查:验证必要的环境变量是否设置
重要特性:
- 发现问题时,会自动调用相关 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}')
"
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.
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.
- 2mo ago First seen · 637 lines · 112 tokens per session scan A 0b739a67f03b
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.
tilelang-env-check compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| tilelang-env-checktile-ai/tilelang-ascend | Skill | 427 | yesterday | MIT | A | 112 | Claude Code, Codex |
| cardputer-buddyanthropics/claude-plugins-official | Skill | 46k | yesterday | Apache-2.0 | A | 109 | Claude Code |
| holoscan-install-wheelNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 34 | Claude Code, Codex |
| holoscan-module-lifecycleNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 47 | Claude Code, Codex |
| triton-ascendmindspore-ai/akg | Skill | 265 | 2d ago | Apache-2.0 | A | 28 | Claude Code, Codex |
| triton-ascend-case-index-putmindspore-ai/akg | Skill | 265 | 2d ago | Apache-2.0 | A | 73 | Claude Code, Codex |
| HA Integration Devtonylofgren/aurora-smart-home | Skill | 109 | yesterday | MIT | A | 55 | Claude Code |