Cann Operator Env Config logo

Cann Operator Env Config

Organization
Ascend
cann-operator-env-config

提供昇腾NPU的CANN安装指导。当用户需要安装CANN、配置昇腾环境或解决安装问题时调用。

Overview

PublisherAscend
Repositoryagent-skills
Skill namecann-operator-env-config
Stars
54
Forks
4
Bundled files
1
LicenseMulanPSL-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Ascend on GitHub. Read the source before you install it.

Installation

Install the Cann Operator Env Config AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Ascend/agent-skills/tree/master/skills/cann-operator-env-config
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Ascend/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/cann-operator-env-config .claude/skills/cann-operator-env-config
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cann Operator Env Config in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cann Operator Env Config on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cann Operator Env Config is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CANN开发环境配置

此技能为在昇腾NPU平台上安装CANN(神经网络计算架构)提供全面指导。

调用时机

在以下情况下调用此技能:

  • 用户询问CANN安装
  • 用户需要帮助设置昇腾开发环境
  • 用户遇到CANN安装问题
  • 用户想了解CANN安装方法

安装步骤

第1步:检查驱动是否安装

硬件要求

  • 已安装昇腾NPU设备
  • 设备状态正常

驱动检查命令

bash
npu-smi info

检查结果

  • 如果显示NPU设备信息,说明驱动已安装
  • 记录驱动版本用于后续CANN版本兼容性检查
  • 如果提示"command not found",需要先安装昇腾驱动

第2步:检查CANN安装依赖

检查CANN安装依赖(Python和pip)是否已安装:

bash
# 检查Python
if ! command -v python3 &> /dev/null && ! command -v python &> /dev/null; then
    echo "Python not found, please install from env_dependence.md"
fi

# 检查pip
if ! command -v pip3 &> /dev/null && ! command -v pip &> /dev/null; then
    echo "pip not found, please install from env_dependence.md"
fi

如果任何依赖缺少,会显示提示信息,请参考 环境依赖安装指南 进行安装。

第3步:安装CANN

方法一:离线安装

步骤3.1:检查当前文件夹是否存在安装包

bash
# 检查当前文件夹是否存在CANN安装包
if ls Ascend-cann-toolkit_*.run 2>/dev/null | grep -q .; then
    echo "找到CANN Toolkit安装包"
    TOOLKIT_PACKAGE=$(ls Ascend-cann-toolkit_*.run)
else
    echo "未找到CANN Toolkit安装包,请使用在线安装方式"
    # 退出离线安装,建议使用在线安装
    exit 1
fi

# 检查当前文件夹是否存在ops安装包
if ls Ascend-cann-*-ops_*.run 2>/dev/null | grep -q .; then
    echo "找到CANN ops安装包"
    OPS_PACKAGE=$(ls Ascend-cann-*-ops_*.run)
else
    echo "未找到CANN ops安装包,请使用在线安装方式"
    # 退出离线安装,建议使用在线安装
    exit 1
fi

步骤3.2:安装CANN

重要:必须先安装Toolkit,再安装ops

run格式安装:

bash
# 安装 Toolkit (默认路径 /usr/local/Ascend)
bash "$TOOLKIT_PACKAGE" --install --quiet
# 安装 ops
bash "$OPS_PACKAGE" --install --quiet
方法二:在线安装(conda方式)

注意:conda主要用于创建Python虚拟环境,CANN工具包仍需通过离线安装包安装。

步骤3.1:创建conda虚拟环境

bash
# 创建Python环境(CANN支持Python 3.7.x - 3.13.11)
conda create -n cann_env python
# 激活环境
conda activate cann_env

步骤3.2:配置昇腾conda官方源

bash
# 添加昇腾conda源
conda config --add channels https://repo.huaweicloud.com/ascend/repos/conda

步骤3.3:安装CANN包

bash
# 使用conda安装CANN工具包
conda install ascend::cann-toolkit
# 安装CANN ops包(根据芯片类型选择,如910、910b、310等)
conda install ascend::cann-{芯片类型}-ops
方法三:在线安装(yum方式 - CentOS/RHEL)

步骤3.1:配置华为官方源

bash
sudo curl https://repo.oepkgs.net/ascend/cann/ascend.repo -o /etc/yum.repos.d/ascend.repo && yum makecache

步骤3.2:安装CANN包

bash
yum install -y Ascend-cann-toolkit
yum install -y Ascend-cann-{芯片类型}-ops

第4步:环境变量配置

临时设置(仅当前终端生效)

bash
source /usr/local/Ascend/ascend-toolkit/set_env.sh

永久设置(写入Shell配置文件)

bash
echo "source /usr/local/Ascend/ascend-toolkit/set_env.sh" >> ~/.bashrc

第5步:安装验证

使用Python验证ACL接口

bash
python3 -c "import acl;acl.init();acl.rt.set_device(0)"

验证结果

  • 如果执行成功,说明CANN Python接口正常工作
  • 如果执行失败,检查环境变量是否配置正确

第6步:安装运行时依赖

bash
pip3 install attrs cython numpy decorator sympy cffi pyyaml pathlib2 psutil protobuf==3.20.0 scipy requests absl-py --user
pip3 install protobuf==3.20.0

注意事项

  1. 版本兼容性:确保CANN版本与驱动版本匹配
  2. 安装顺序:必须先安装Toolkit,再安装ops
  3. 环境变量:安装后必须设置环境变量
  4. 权限问题:某些操作可能需要root权限
  5. 依赖包:确保所有必要的依赖包已安装

故障排查

如果安装过程中遇到问题:

  • 检查驱动版本是否与CANN版本兼容
  • 检查依赖包是否安装完整
  • 查看安装日志获取详细错误信息
  • 参考昇腾社区文档或寻求技术支持

参考资料

详细参考资料请查看 reference 目录,包含:

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Cann Operator Env Config AI skill do?

提供昇腾NPU的CANN安装指导。当用户需要安装CANN、配置昇腾环境或解决安装问题时调用。

Why use Cann Operator Env Config on TypingMind?

Because you install it once and use it with any model. Cann Operator Env Config is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cann Operator Env Config in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Ascend/agent-skills/tree/master/skills/cann-operator-env-config. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Cann Operator Env Config?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cann Operator Env Config?

As many as you like. As long as a model supports skills, you can use Cann Operator Env Config with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cann Operator Env Config AI skill free?

Yes. It is published on GitHub by Ascend under the MulanPSL-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇