Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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…

huaweicloudот huaweicloud★ 59 звёзд на GitHub

Об этом скилле

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.

⚠️ Analysis depth varies by language (DevKit limitation): C/C++/ASM = deep analysis; Fortran = shallow; Go/Java/Python/Scala = file-level stats only (architecture-dependent code like JNI/CGo/ctypes/unsafe will NOT be detected — manual review required). See Supported Languages for details.

Architecture: Local detection + remote execution + SFTP transfer. All SSH operations use the unified scripts/ssh_client.py (paramiko + password env var), cross-platform consistent.

Applicable scenarios: Assess source code portability to Kunpeng ARM; scan C/C++/ASM/Fortran/Go/Java/Python/Scala code; generate a migration report; check ARM64 compatibility; provision a Kunpeng server on Huawei Cloud.

Report save path: Windows → C:\devkit-report\, Linux/macOS → ~/devkit-report/ (resolved from current user's home, NOT hardcoded /home/).

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:

  • Root access required (default install path): install_devkit.sh installs to /usr/local and creates a /usr/local/bin/devkit symlink, which requires root. Non-root users MUST use the --no-sudo flag (installs to $HOME/.local/devkit) and add DevKit to PATH manually: export PATH=$HOME/.local/devkit:$PATH. If system dependencies (python3, pip3, curl) are missing and --no-sudo is set, the script will error out — install them first or run as root.
  • SSH user: The default SSH user is root (see KUNPENG_SERVER_USER). Non-root SSH users are supported, but the remote install path and report download path will be under that user's home directory (see --no-sudo above).
  • 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_PASS in 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/hua
Полный SKILL.md на GitHub

Установить huawei-cloud-kunpeng-source-code-migrate в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/acceptance-criteria.mdreferences/cli-installation-guide.mdreferences/devkit-cli-reference.mdreferences/devkit-installation-guide.mdreferences/iam-policies.mdreferences/migration-report-guide.mdreferences/prerequisites.mdreferences/scripts-guide.mdreferences/task-connect-server.mdreferences/task-install-devkit.mdreferences/task-local-devkit.mdreferences/task-prepare-server.mdreferences/task-scan-source-code.mdreferences/troubleshooting.mdreferences/verification-method.mdscripts/detect_os.pyscripts/install_devkit.shscripts/provision_kunpeng_server.shscripts/ssh_client.py

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить huawei-cloud-kunpeng-source-code-migrate с