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.
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-cloudrobo-npu-patchergit clone --depth 1 https://github.com/huaweicloud/huaweicloud-skillsWrote 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/huaweicloud/huaweicloud-skills/huawei-cloud-cloudrobo-npu-patcher)<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.
<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>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.00051 | $0.02147 |
| Opus 5.5 | $0.00020 | $0.00859 |
| Sonnet 5.5 | $0.00010 | $0.00429 |
| Haiku 4.5 | $0.00005 | $0.00215 |
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.
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 — 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 |
What ships with it
30 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.
- references/fix-templates/P_ENT.md 2.2 KB
- references/fix-templates/P_FLA.md 3.1 KB
- references/fix-templates/P_LTM.md 2.1 KB
- references/fix-templates/P_RND.md 770 B
- references/fix-templates/P_TGT.md 3.0 KB
- references/fix-templates/P_VEC.md 3.5 KB
- references/iam-policies.md 1.2 KB
- scripts/checks/__init__.py 694 B runs code
- scripts/checks/build.py 3.4 KB runs code
- scripts/checks/common.py 5.2 KB runs code
- scripts/checks/dataload.py 3.3 KB runs code
- scripts/checks/pipeline.py 3.7 KB runs code
- scripts/checks/runtime.py 4.9 KB runs code
- scripts/config.py 6.4 KB runs code
- scripts/patterns.py 8.7 KB runs code
- scripts/progress.py 13 KB runs code
- scripts/runtime_patches.py 19 KB runs code
- scripts/scan.py 3.9 KB runs code
- scripts/scanners/__init__.py 2.3 KB runs code
- scripts/scanners/device.py 2.9 KB runs code
- scripts/scanners/framework.py 1.1 KB runs code
- scripts/scanners/helpers.py 12 KB runs code
- scripts/scanners/operator.py 3.4 KB runs code
- scripts/scanners/semantic.py 3.3 KB runs code
- scripts/scanners/structure.py 18 KB runs code
- scripts/utils.py 2.7 KB runs code
- scripts/verify.py 7.9 KB runs code
- templates/ADAPTATION_SUMMARY.md 3.3 KB
- templates/env_npu.sh 2.2 KB runs code
- templates/train.sh 4.4 KB runs code
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.
- 25d ago First seen · 182 lines · 51 tokens per session scan A 2f7bc45b0473
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.
huawei-cloud-cloudrobo-npu-patcher compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| huawei-cloud-cloudrobo-npu-patcherhuaweicloud/huaweicloud-skills | Skill | 59 | 4d ago | MIT | A | 51 | Claude Code, Codex |
| spark-environment-setupwshobson/agents | Skill | 43k | 6d ago | MIT | A | 76 | Claude Code |
| spark-memory-thermal-opswshobson/agents | Skill | 43k | 6d ago | MIT | A | 59 | Claude Code |
| spark-training-gotchaswshobson/agents | Skill | 43k | 6d ago | MIT | A | 63 | Claude Code |
| inference-serving-llama-cppdavila7/claude-code-templates | Skill | 34k | today | MIT | A | 80 | Claude Code, Codex |
| supercomputertrycua/cua | Skill | 33k | today | MIT | A | 0 | Claude Code, Codex |
| amc-run-rtsp-calibrationNVIDIA/skills | Skill | 4.2k | 2d ago | Apache-2.0 | A | 59 | Claude Code, Codex |