huawei-cloud-cloudrobo-npu-patcher

huawei-cloud-cloudrobo-npu-patcher is a skill for Claude Code, Codex from huaweicloud/huaweicloud-skills. It costs 51 tokens per session (2,147 once invoked), scanned A, original, MIT.

A guide for adapting PyTorch vision-and-language models to run on Ascend NPU hardware. PyTorch is a machine-learning framework, and an NPU is a processor designed to accelerate neural-network workloads.

In plain words
What is it for?
Use it to migrate VLA models from CUDA to Ascend NPU, fix runtime compatibility problems, or improve NPU execution.
Why use it?
It addresses common differences between CUDA-based code and NPU execution, such as data types, tensor devices, and unsupported operations. It combines code scanning, targeted patches, verification, and training templates.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to migrate VLA models from CUDA to Ascend NPU, fix runtime compatibility problems, or improve NPU execution.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/huaweicloud/huaweicloud-skills/huawei-cloud-cloudrobo-npu-patcher
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-cloudrobo-npu-patcher
Clone the repo
git clone --depth 1 https://github.com/huaweicloud/huaweicloud-skills

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 huawei-cloud-cloudrobo-npu-patcher

README.md
[![agentmods](https://agentmods.dev/badge/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cloudrobo-npu-patcher/github.svg)](https://agentmods.dev/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cloudrobo-npu-patcher)
Your own site
<a href="https://agentmods.dev/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cloudrobo-npu-patcher"><img src="https://agentmods.dev/badge/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cloudrobo-npu-patcher/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 huawei-cloud-cloudrobo-npu-patcher

Your own site · 80×15
<a href="https://agentmods.dev/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cloudrobo-npu-patcher"><img src="https://agentmods.dev/badge/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cloudrobo-npu-patcher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,147 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.00051 $0.02147
Opus 5.5 $0.00020 $0.00859
Sonnet 5.5 $0.00010 $0.00429
Haiku 4.5 $0.00005 $0.00215

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

Security

Grade A, and why

huawei-cloud-cloudrobo-npu-patcher 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 25d ago.

The scan reads SKILL.md. This mod also ships 22 executable files (scripts/checks/__init__.py, scripts/checks/build.py, scripts/checks/common.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.

skills/ai/cloudrobo/huawei-cloud-cloudrobo-npu-patcher/SKILL.md · 182 lines

How it starts

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

Skill: huawei-cloud-cloudrobo-npu-patcher

Overview

Adapts PyTorch VLA models to Ascend NPU. Runtime patches via build_npu_patcher() automatically handle float64→float32, numpy safety, nan_to_num, and other issues; scanners detect semantic issues that require agent judgment.

Runtime Patches (zero-config, always active)

runtime_patches.py (copy it to the migrate_to_cloudrobo/ directory) provides the following patches, activated by the entry point's build_vla_patcher():

Patch Function
Float64To32 module-level torch.float64→float32 replacement + copyreg.pickle fix + from_numpy/as_tensor/Tensor.to hooks
TensorNumpySafe auto-inserts .cpu() before NPU tensors call .numpy()
NanToNumSafe auto-converts half precision to float32 before torch.nan_to_num()
TensorIndexDevice auto-aligns index tensors to the indexed tensor's device
TorchTensorSafe intercepts torch.tensor() to handle 0-dim NPU tensor elements
BuiltinMinMaxNPU Python min/max with NPU tensors → torch.minimum/maximum
PowFloatSafe torch.pow fractional exponent → result auto .float()
SdpaMaskBroadcast fixes NPU SDPA mask broadcast error (aclnnFlashAttentionScore error 561103): explicitly expands the (B,N,1,Skv) broadcast mask to (B,N,Sq,Skv)
Patch Function How to enable
AdamWFused redirects AdamW → NpuFusedAdamW to improve NPU throughput; requires contiguous large memory blocks, may OOM with large models / tight memory build_vla_patcher(fused_adamw=True)

Semantic-Level Issues (Agent-Assisted Fixing)

Scanners classify issues into the following categories; each pattern maps to a fix template under references/fix-templates/:

Category Description Pattern
DEVICE NPU tensor device mismatch P_RND
OPERATOR CUDA extensions → NPU API P_FLA
STRUCTURE loops, initialization, entry points P_ENT, P_VEC
FRAMEWORK pytorch_lightning P_LTM
SEMANTIC optimization P_TGT

Read the full file on GitHub · 182 lines

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. 25d ago First seen · 182 lines · 51 tokens per session scan A 2f7bc45b0473

Subscribe to this mod's changes

huawei-cloud-cloudrobo-npu-patcher is a skill published in the GitHub repository huaweicloud/huaweicloud-skills (59 stars, last pushed 4d ago), licensed MIT. It adds 51 tokens to every session and 2,147 once invoked, about $0.0002 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-11-05.

Related

huawei-cloud-cloudrobo-npu-patcher compared with skills from other repositories

huawei-cloud-cloudrobo-npu-patcher next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
huawei-cloud-cloudrobo-npu-patcherhuaweicloud/huaweicloud-skillsSkill594d agoMITA51Claude Code, Codex
spark-environment-setupwshobson/agentsSkill43k6d agoMITA76Claude Code
spark-memory-thermal-opswshobson/agentsSkill43k6d agoMITA59Claude Code
spark-training-gotchaswshobson/agentsSkill43k6d agoMITA63Claude Code
inference-serving-llama-cppdavila7/claude-code-templatesSkill34ktodayMITA80Claude Code, Codex
supercomputertrycua/cuaSkill33ktodayMITA0Claude Code, Codex
amc-run-rtsp-calibrationNVIDIA/skillsSkill4.2k2d agoApache-2.0A59Claude Code, Codex