Huawei Cloud ModelArts platform integration. Modular design, OBS as primary storage support, environment variable authentication, includes pool plugin manage...
---
name: modelarts-skill
description: "Huawei Cloud ModelArts platform integration. Modular design, OBS as primary storage support, environment variable authentication, includes pool plugin management and node configuration template queries."
version: "1.0.0"
---
# ModelArts Skill
Huawei Cloud ModelArts platform integration skill, featuring modular design, OBS as Notebook primary storage, and environment variable auto-authentication.
---
## ๐ Security Model (CRITICAL)
All credentials handled internally, never returned to LLM:
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LLM / OpenClaw โ
โ โ NEVER sees: AK, SK, Security Token, raw credentials โ
โ โ
ONLY sees: Masked status, API results, resource IDs โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ (Safe data only)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ auth_manager.py (Secure Vault) โ
โ ๐ Credentials stored in memory only โ
โ โ
Only masked data exposed externally โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ (Secure session)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Module Functions (Secure SDK Wrapper) โ
โ Unified pattern: access.sdk().execute(api_func, ...) โ
โ Returns: Standard format API responses only โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## ๐ Authentication Methods
| Mode | How It Works |
|------|-------------|
| **Notebook Mode** | Auto-detects ModelArts environment, zero configuration |
| **Local Mode** | Reads `MODELARTS_AK/SK/PROJECT_ID/REGION` environment variables |
---
## ๐ Module Routing
Use keywords to find the corresponding reference file for function index and locations.
| Keyword | Reference File |
|---------|----------------|---------------|--------|
| **notebook, jupyter, image, obs, flavor, cluster, auth** | [`references/notebook.md`](references/notebook.md) |
| **pool, resource pool, dedicated pool, node, workload, os network, plugin** | [`references/pool.md`](references/pool.md) |
| **node pool, nodepool, scale node, node group, plugin, config template** | [`references/node_pool.md`](references/node_pool.md) |
| **train, training job, ่ฎญ็ปไปปๅก** | [`references/train.md`](references/train.md) |
| **infer1.0, inference, service, ๆง็ๆจ็ๆๅก,ๆง็ๅจ็บฟๆๅก** | [`references/infer_v1.md`](references/infer_v1.md) |
| **infer2.0, inference, service, ๆฐ็ๆจ็ๆๅก๏ผๅจ็บฟๆๅก,ๆฐ็ๅจ็บฟๆๅก** | [`references/infer_v2.md`](references/infer_v2.md) |
| **management, workspace, authmode, authorization, quota, tag, scheduled event** | [`references/management.md`](references/management.md) |
| **swr, image repo, ้ๅไปๅบ** | [`references/swr.md`](references/swr.md) |
| **vpc, virtual private, subnet, security group, ่ๆ็งๆไบ** | [`references/vpc.md`](references/vpc.md) |
| **kms, key management, ๅฏ้ฅ็ฎก็** | [`references/kms.md`](references/kms.md) |
| **liteserver, dev server, hyper cluster, hyperinstance, eip, roce** | [`references/liteserver.md`](references/liteserver.md) |
| **common, auth, api helper, format result, decorator** | [`references/common.md`](references/common.md) |
---
## ๐ฆ Module Architecture
```
modelarts/
โโโ scripts/
โ โโโ common_module/ # ่ทจๆจกๅๅ
ฑไบซๅบ็ก่ฎพๆฝ
โ โ โโโ __init__.py
โ โ โโโ _bootstrap.py # ็ปไธๅผๅฏผ
โ โ โโโ auth.py # ่ฎค่ฏ็ฎก็
โ โ โโโ api_helper.py # API ่ฐ็จๅฐ่ฃ
โ โ โโโ result.py # ่ฟๅๆ ผๅผ็ปไธ
โ โ
โ โโโ notebook_module/ # Notebook & ้ๅ็ฎก็
โ โโโ pool_module/ # ่ตๆบๆฑ ็ฎก็
โ โโโ node_pool_module/ # ่็นๆฑ ็ฎก็
โ โโโ train_module/ # ่ฎญ็ปไปปๅก็ฎก็
โ โโโ infer_v1_module/ # ๆง็ๆจ็ๆๅก็ฎก็
โ โโโ infer_v2_module/ # ๆฐ็ๆจ็ๆๅก็ฎก็
โ โโโ management_module/ # ๅนณๅฐ็ฎก็: ๅทฅไฝ็ฉบ้ด/ๆๆ/้
้ข/ไบไปถ
โ โโโ swr_module/ # SWR ้ๅไปๅบ
โ โโโ vpc_module/ # VPC ่ๆ็งๆไบ
โ โโโ kms_module/ # KMS ๅฏ้ฅ็ฎก็ๆๅก
โ โโโ liteserver_module/ # Lite Server ่ฝป้่ฎก็ฎ่็น็ฎก็ (ๅซ HPS/่ถ
่็นๅฎๆดๆฏๆ)
โ โโโ __pycache__/
โ
โโโ references/
โโโ notebook.md
โโโ pool.md
โโโ node_pool.md
โโโ train.md
โโโ infer_v1.md
โโโ infer_v2.md
โโโ management.md
โโโ swr.md
โโโ vpc.md
โโโ kms.md
โโโ common.md
```
---
## โ
Design Features
1. **Modular Design** - One file per function, clean structure, easy to maintain
2. **OBS as Primary Storage** - Notebook can use OBS buckets directly as root filesystem
3. **OBS Bucket Management** - Built-in create/delete/list OBS bucket functions
4. **Environment Variable Auth** - Zero configuration for local/CI environments
5. **Unified API Pattern** - All functions use consistent calling pattern
6. **Clean Deliverables** - No temp scripts, no debug code, no redundant files
7. **Node Pool Management** - Independent node pool lifecycle management
8. **Plugin Management** - Resource pool plugin listing and creation (ListPoolPlugins, CreatePoolPlugin)
9. **Node Configuration Template Query** - Query node configuration template details (ShowNodeConfigTemplate)
10. **Common Infrastructure** - Extracted shared infrastructure, improved code reuse
11. **Training Job Management** - Full lifecycle: create/list/stop/delete training jobs
12. **Inference Service Management** - Old v1 API: create/list/start/stop/update/delete inference services
13. **Workspace & Authorization** - Workspace CRUD, auth mode, IAM authorization, quotas, scheduled events
14. **SWR Image Repository** - Query training images from SWR
15. **VPC Virtual Private Cloud** - Query VPCs, Subnets, Security Groups from Huawei Cloud VPC service
16. **KMS Key Management Service** - Query SSH keypairs from Huawei Cloud KMS
17. **Lite Server Management** - Full lifecycle management of lightweight compute nodes (51 APIs covering Chapter 22)
18. **Hyper Cluster Management** - Create, list, delete hyper clusters for high-performance computing
19. **Hyperinstance Operations** - Scale, start, stop, and manage hyper instances
20. **Batch Operations** - Bulk actions on multiple Lite Server instances (start/stop/reboot/changeOS/reinstallOS/delete)
21. **Job Management** - Create, list, delete jobs on Lite Server instances
---
## ๐ฏ Quick Reference by Use Case
| What You Want To Do | Go To Module |
|---------------------|-------------|
| Start/Stop/Create/Delete Notebook | notebook_module |
| Save Notebook to Image | notebook_module |
| Attach/Detach OBS Storage | notebook_module |
| Create/Delete OBS Buckets | notebook_module |
| Create/Delete Dedicated Resource Pool | pool_module |
| Batch Node Operations (Reboot/Delete/Lock/Resize) | pool_module |
| Scale Node Pool Size | node_pool_module |
| Create Additional Node Pools (different flavors) | node_pool_module |
| List Resource Pool Plugins (ListPoolPlugins) | node_pool_module |
| Create Plugin in Resource Pool (CreatePoolPlugin) | node_pool_module |
| Query Node Configuration Template (ShowNodeConfigTemplate) | node_pool_module |
| Create/Stop/Delete Training Job | train_module |
| List Training Jobs (running/pending/completed) | train_module |
| Create/Start/Stop/Delete Inference Service | infer_v1_module |
| List/Get Inference Service Details | infer_v1_module |
| List Models (custom/subscription) | infer_v1_module |
| Create/Start/Stop/Delete Inference Service (ๆฐ็) | infer_v2_module |
| List/Get Inference Service Details (ๆฐ็) | infer_v2_module |
| Query Dedicated Pools & Flavors (ๆฐ็) | infer_v2_module |
| Get Service Exec Login Info (ๆฐ็) | infer_v2_module |
| Batch Delete Inference Services (ๆฐ็) | infer_v2_module |
| Service Version Management (ๆฐ็) | infer_v2_module |
| Service Events & Health Monitoring (ๆฐ็) | infer_v2_module |
| Region Detection & Consistency (ๆฐ็) | infer_v2_module |
| Create/Update/Delete Workspace | management_module |
| Manage Authorization (add/delete/list) | management_module |
| Query/Update Auth Mode | management_module |
| List Quotas & Scheduled Events | management_module |
| Query SWR Training Images | swr_module |
| Query VPC/Subnet/SecurityGroup | vpc_module |
| Query SSH Keypairs | kms_module |
| Create/Start/Stop Lite Server Instances | liteserver_module |
| Manage Hyper Clusters & Hyperinstances | liteserver_module |
| Batch Operations on Lite Servers | liteserver_module |
| Attach/Detach Volumes & EIPs | liteserver_module |
| Query Flavors & Images for Lite Server | liteserver_module |
| Create/Manage Jobs on Lite Server | liteserver_module |
| Infrastructure / Internal Tools | common_module |
don't have the plugin yet? install it then click "run inline in claude" again.