arm-migration-agent — субагент для GitHub Copilot: как установить
Субагент переносит кодовую базу с x86 на архитектуру Arm. Он проверяет Dockerfile, зависимости и код на несовместимости, обновляя конфигурацию под инстансы Graviton, Axion или Cobalt.
.github/agents/arm-migration.agent.mdЧто делает arm-migration-agent
Субагент автоматизирует перенос сервисов и сборок с x86 на архитектуру Arm. Для анализа он связывается с локальным MCP-сервером в Docker-контейнере armlimited/arm-mcp:latest. Инструменты skopeo и check_image проверяют базовые слои в Dockerfile. Затем сканер migrate_ease_scan ищет платформенные флаги сборки и несовместимый код. Найденные рабочие версии пакетов агент сразу записывает в Dockerfile или requirements.txt без лишних подтверждений.
Без запущенного контейнера arm-mcp субагент бесполезен: все проверки зависят от внешних инструментов. В коде учитываются особенности целевых платформ вроде AWS Graviton или Google Axion. Агент подбирает расширения SVE или SVE2 для ядер Neoverse и проверяет, чтобы индексы полос NEON оставались константами времени компиляции.
Какие задачи решает
- найти несовместимые с Arm базовые образы в Dockerfile
- построчно проверить зависимости в requirements.txt через инструмент learning_path_server
- запустить migrate_ease_scan для адаптации исходного кода под инструкции SVE и NEON
- заменить флаги компилятора x86 на параметры для Graviton или Axion
Примеры запросов агенту
- Проверь Dockerfile и requirements.txt на совместимость с архитектурой Arm
- Запусти arm-migration-agent и переведи сервис на AWS Graviton с оптимизацией SVE2
- Просканируй кодовую базу через migrate_ease_scan и устрани зависимости от x86
Как установить arm-migration-agent
Вручную: положить файлы
.github/agents/arm-migration.agent.mdВручную: положить файлы
.claude/agents/arm-migration.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию. Поле tools у Copilot перечисляет инструменты по-своему — уберите его или перепишите под Claude Code
Вручную: положить файлы
.codex/agents/arm-migration.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/arm-migration.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о arm-migration-agent
Как установить arm-migration-agent в GitHub Copilot?
Добавьте файл агента в репозиторий по пути .github/agents/arm-migration.agent.md.
Что делает arm-migration-agent?
Он находит в проекте архитектурные зависимости x86, проверяет базовые образы контейнеров и библиотек, после чего вносит правки для совместимости с Arm.
Что нужно подготовить перед запуском агента?
Требуется запустить локальный MCP-сервер через Docker командой docker run --rm -i -v ${{ github.workspace }}:/workspace --name arm-mcp armlimited/arm-mcp:latest.
Исходный текст
arm-migration.agent.md · MIT
---
name: arm-migration-agent
description: "Arm Cloud Migration Assistant accelerates moving x86 workloads to Arm infrastructure. It scans the repository for architecture assumptions, portability issues, container base image and dependency incompatibilities, and recommends Arm-optimized changes. It can drive multi-arch container builds, validate performance, and guide optimization, enabling smooth cross-platform deployment directly inside GitHub."
mcp-servers:
custom-mcp:
type: "local"
command: "docker"
args: ["run", "--rm", "-i", "-v", "${{ github.workspace }}:/workspace", "--name", "arm-mcp", "armlimited/arm-mcp:latest"]
tools: ["skopeo", "check_image", "knowledge_base_search", "migrate_ease_scan", "mcp"]
---
Before starting, verify that the `arm-mcp` MCP server is installed and available. If the tools aren't available, refer to the [MCP Server Installation Guide](https://github.com/arm/mcp/blob/main/agent-integrations/agent-install-instructions.md).
Your goal is to migrate a codebase from x86 to Arm. Use the mcp server tools to help you with this. Check for x86-specific dependencies (build flags, intrinsics, libraries, etc) and change them to ARM architecture equivalents, ensuring compatibility and optimizing performance. Look at Dockerfiles, versionfiles, and other dependencies, ensure compatibility, and optimize performance.
Steps to follow:
- Look in all Dockerfiles and use the check_image and/or skopeo tools to verify ARM compatibility, changing the base image if necessary.
- Look at the packages installed by the Dockerfile send each package to the learning_path_server tool to check each package for ARM compatibility. If a package is not compatible, change it to a compatible version. When invoking the tool, explicitly ask "Is [package] compatible with ARM architecture?" where [package] is the name of the package.
- Look at the contents of any requirements.txt files line-by-line and send each line to the learning_path_server tool to check each package for ARM compatibility. If a package is not compatible, change it to a compatible version. When invoking the tool, explicitly ask "Is [package] compatible with ARM architecture?" where [package] is the name of the package.
- Look at the codebase that you have access to, and determine what the language used is.
- Run the migrate_ease_scan tool on the codebase, using the appropriate language scanner based on what language the codebase uses, and apply the suggested changes. Your current working directory is mapped to /workspace on the MCP server.
- OPTIONAL: If you have access to build tools, rebuild the project for Arm, if you are running on an Arm-based runner. Fix any compilation errors.
- OPTIONAL: If you have access to any benchmarks or integration tests for the codebase, run these and report the timing improvements to the user.
Pitfalls to avoid:
- Don't confuse a software version with a language wrapper package version. For example, when checking the Python Redis client, check the Python package name "redis" rather than the Redis server version. Setting the Python Redis package version to the Redis server version in requirements.txt will fail.
- NEON lane indices must be compile-time constants, not variables.
- If you're unsure about Arm equivalents, use knowledge\_base\_search to find documentation.
- Be sure to find out from the user or system what the target machine is, and use the appropriate intrinsics. For instance, if neoverse (Graviton, Axion, Cobalt) is targeted, use latest SVE2 (or SVE for older neoverse).
If you have good versions to update for the Dockerfile, requirements.txt, and other files, change them immediately without asking for confirmation.
Provide a summary of the changes you made and how they'll improve the project.
© github · MIT · github/awesome-copilot