huawei-cloud-kunpeng-source-code-migrate
Analyze the migrability of C/C++/ASM/Fortran/Go/Java/Python/Scala source code to Kunpeng (ARM64) platform using Huawei DevKit CLI tool. Connect to the source…
от huaweicloudskill390 установок в других каталогах
Установить huawei-cloud-kunpeng-source-code-migrate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Kunpeng Source Code Migration Assessment
Analyze the migrability of C/C++/ASM/Fortran/Go/Java/Python/Scala source code to Kunpeng (ARM64) platform using Huawei DevKit CLI tool.
Overview
This skill assesses source code migrability to the Kunpeng (ARM64) platform using Huawei DevKit CLI. It connects to a source server via SSH (or installs locally), installs DevKit, scans source code, and generates a migration assessment report. If the user has no remote server, it can automatically provision a Kunpeng ECS instance on Huawei Cloud (Guiyang Region 1) via hcloud CLI.
Architecture: Local detection + remote execution + SFTP transfer. All SSH operations use the unified scripts/ssh_client.py (paramiko + password env var), cross-platform consistent. See the Architecture section below for the full tree.
Applicable scenarios:
- Assess source code portability/migrability to Kunpeng ARM platform
- Scan C/C++/ASM/Fortran/Go/Java/Python/Scala code for migration issues
- Generate a Kunpeng migration assessment report for a software project
- Check source code compatibility with ARM64/Kunpeng architecture
- Provision a Kunpeng server on Huawei Cloud for migration assessment
Report save path (fixed unless user explicitly requests otherwise): Windows → C:\devkit-report\, Linux/macOS → /home/devkit-report/.
Prerequisites
CLI version requirements:
| Tool | Version | Purpose |
|---|---|---|
| Python | 3.x | Run ssh_client.py, detect_os.py, paramiko dependency |
| paramiko | latest stable | SSH connection (pip install paramiko) |
| hcloud (KooCLI) | >= 3.2.0 | Only needed for provisioning path (Step 3d) |
| DevKit CLI | auto-installed by install_devkit.sh |
Source code migration scan |
Authentication:
- SSH credentials (existing server, Step 3c): User must set env vars
KUNPENG_SERVER_HOST,KUNPENG_SERVER_PORT(default 22),KUNPENG_SERVER_USER(default root),MIGRATE_SSH_PASSin their own terminal. AI must NEVER ask for or echo these values. - Huawei Cloud AK/SK (provisioning path, Step 3d): User must run
hcloud configure set --cli-region=cn-southwest-2 --cli-access-key=<your-ak> --cli-secret-key=<your-sk>in their own terminal. AI must NEVER ask for AK/SK.
IAM permissions (Step 3d only): Required for provisioning a Kunpeng ECS on Huawei Cloud. Minimum set: ECS create/list/delete, VPC create/get/delete, Subnet, SecurityGroup, EIP create/delete, IMS list, IAM projects list. See references/iam-policies.md for the full policy JSON and setup instructions.
OS support: DevKit local install supports openEuler/CentOS/Ubuntu/Kylin/UOS/EulerOS/Debian/SUSE/NeoKylin. Windows and macOS are NOT supported for local install — must use a remote Linux server.
Core Commands
1. Local OS detection:
python <skill_dir>/scripts/detect_os.py
2. SSH connection & remote execution (unified paramiko client):
python <skill_dir>/scripts/ssh_client.py test # Test SSH connection
python <skill_dir>/scripts/ssh_client.py exec "uname -a" 30 # Execute remote command
python <skill_dir>/scripts/ssh_client.py put <local> <remote> # SFTP upload single file
python <skill_dir>/scripts/ssh_client.py put-dir <local_dir> <remote_dir> # SFTP upload directory
python <skill_dir>/scripts/ssh_client.py get-report # Download migration report
3. DevKit installation:
bash <skill_dir>/scripts/install_devkit.sh --yes
4. Source code migration scan (DevKit CLI):
# C/C++ project (with build command):
devkit porting src-mig -i /home/project -s 'c, c++, asm' -b make -c 'make all' -p gcc9.3.0 -o /tmp/devkit-report -r all
# Java/Python project (no build command):
devkit porting src-mig -i /home/project -s 'java, python' -o /tmp/devkit-report -r all
5. Kunpeng ECS auto-provisioning (Step 3d only):
bash <skill_dir>/scripts/provision_kunpeng_server.sh --confirm
6. hcloud CLI install & configure (Step 3d only):
curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
tar -xzf huaweicloud-cli-linux-amd64.tar.gz && chmod +x hcloud && sudo mv hcloud /usr/local/bin/
hcloud configure set --cli-region=cn-southwest-2 --cli-access-key=<your-ak> --cli-secret-key=<your-sk>
hcloud version # Expected: >= 3.2.0
Parameter Confirmation
AI must confirm the following parameters with the user before execution.
SSH connection parameters (env vars, set by user in their own terminal):
| Parameter | Env Var | Required | Default | Description |
|---|---|---|---|---|
| Server address | KUNPENG_SERVER_HOST |
Yes | - | Remote server IP/hostname |
| SSH port | KUNPENG_SERVER_PORT |
No | 22 |
SSH port |
| SSH username | KUNPENG_SERVER_USER |
No | root |
SSH login user |
| SSH password | `MIGRATE_S |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-kunpeng-source-code-migrate?
Analyze the migrability of C/C++/ASM/Fortran/Go/Java/Python/Scala source code to Kunpeng (ARM64) platform using Huawei DevKit CLI tool. Connect to the source server via SSH, install DevKit, scan source code, and generate a migration assessment report. If the user does not have a remote server, this skill can automatically provision a Kunpeng ECS instance on Huawei Cloud (Guiyang Region 1) using hcloud CLI. Use this skill when the user wants to: (1) assess source code portability/migrability to Kunpeng ARM platform, (2) scan C/C++/ASM/Fortran/Go/Java/Python/Scala code for migration issues, (3) generate a Kunpeng migration report for their software project, (4) check source code compatibility with ARM64/Kunpeng architecture, (5) provision a Kunpeng server on Huawei Cloud for migration assessment. Trigger: user mentions "鲲鹏移植", "鲲鹏迁移", "Kunpeng migration", "Kunpeng porting", "源码迁移", "源码移植", "ARM64迁移", "ARM移植评估", "DevKit", "可迁移性分析", "migrability", "porting assessment", "migration report", "鲲鹏评估", "购买鲲鹏服务器", "鲲鹏云服务器", "Kunpeng ECS"
Как установить скилл huawei-cloud-kunpeng-source-code-migrate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-kunpeng-source-code-migrate запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…