К основному содержанию
скилл CX Codex

mcore-create-issue — скилл для Claude Code: разбор и установка

Скилл исследует упавшие прогоны GitHub Actions в NVIDIA/Megatron-LM, находит причину сбоя и оформляет готовый баг-репорт.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add NVIDIA/skills --skill mcore-create-issue -a claude-code
Открыть на GitHub

Что делает mcore-create-issue

Скилл принимает ссылку на прогон или конкретную джобу GitHub Actions. Через CLI gh он запрашивает список упавших тестов и забирает последние строки логов с ошибками pytest, исключениями и assert. Длинные трейсы обрезаются до 30 строк, чтобы отчёт оставался читаемым.

Сценарий выясняет, какой PR запустил сборку, и находит автора файла теста через коммиты в базовой ветке. Перед публикацией скилл ищет открытые дубликаты через gh issue list. Если похожая задача уже есть, создание отменяется. При отсутствии повторов создаётся тикет с меткой bug и назначением на автора теста.

Без установленного и авторизованного GitHub CLI инструмент работать не сможет. Скилл жёстко ориентирован на репозиторий NVIDIA/Megatron-LM, поэтому для других проектов команды gh потребуется перенастроить вручную.

Какие задачи решает

  • Разобрать лог упавшего прогона GitHub Actions и извлечь текст ошибки
  • Найти автора проблемного теста через историю коммитов в ветке
  • Проверить существующие открытые тикеты на дубликаты перед созданием задачи
  • Создать issue с меткой bug и назначить ответственного

Примеры запросов агенту

  • Разбери сбой в CI: https://github.com/<owner>/<repo>/actions/runs/<run_id>
  • Заведи баг-репорт по упавшей джобе https://github.com/<owner>/<repo>/actions/runs/<run_id>/job/<job_id>
  • Проверь ошибки в прогоне https://github.com/<owner>/<repo>/actions/runs/<run_id> и создай тикет

Как установить mcore-create-issue

1Через Skills CLI (Vercel)

npx skills add NVIDIA/skills --skill mcore-create-issue -a claude-code

2Вручную: положить файлы

~/.claude/skills/mcore-create-issue/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/mcore-create-issue/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о mcore-create-issue

Как установить mcore-create-issue в Claude Code?

Выполните команду npx skills add NVIDIA/skills --skill mcore-create-issue -a claude-code.

Что делает скилл mcore-create-issue?

Он парсит логи сбоев GitHub Actions для NVIDIA/Megatron-LM, находит автора сломанного теста и создаёт баг-репорт через GitHub CLI.

Что происходит при обнаружении дубликата задачи?

Скилл ищет открытые задачи по имени файла теста через gh issue list. Если дубликат найден, новый тикет не создаётся, а ссылка на открытый issue возвращается пользователю.

Исходный текст

SKILL.md · Apache-2.0
---
name: mcore-create-issue
description: Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.
license: Apache-2.0
when_to_use: User shares a GitHub Actions URL and wants to file a bug report; 'create an issue for this failure', 'file a bug for this CI run', 'triage this GitHub Actions failure'.
user_invocable: true
argument: "GitHub Actions run or job URL"
metadata:
  author: Philip Petrakian <[email protected]>
---

# Triage CI Failure into a GitHub Issue

Investigate a failing GitHub Actions job, extract the root cause, and file a
well-structured bug issue against `NVIDIA/Megatron-LM`.

## Workflow

### 1. Parse the URL

The argument is a GitHub Actions URL. It will be one of:

- **Job URL**: `https://github.com/<owner>/<repo>/actions/runs/<run_id>/job/<job_id>`
- **Run URL**: `https://github.com/<owner>/<repo>/actions/runs/<run_id>`

Extract `run_id` and, if present, `job_id`.

### 2. Identify failed jobs

- If a `job_id` was provided, use that job directly.
- If only a `run_id` was provided, list all failed jobs in the run:

  ```bash
  gh run view <run_id> --repo NVIDIA/Megatron-LM --json jobs \
    --jq '[.jobs[] | select(.conclusion == "failure") | {id: .databaseId, name: .name, url: .url}]'
  ```

  If multiple jobs failed, ask the user which one to triage, or triage all of them if they say so.

### 3. Fetch the failure logs

For each failed job, retrieve the logs and narrow them down to the failure:

```bash
# Pull the raw log and keep only error-bearing lines
gh api repos/NVIDIA/Megatron-LM/actions/jobs/<job_id>/logs 2>&1 \
  | grep -E "(FAILED|ERROR|\bError\b|assert|Traceback|Exception|##\[error\])" \
  | head -200
```

Also capture the full job name:

```bash
gh run view --job <job_id> --repo NVIDIA/Megatron-LM --json name --jq .name
```

If the grep output is sparse, download the full logs and look for the pytest
`FAILURES` section or the last non-zero exit signal.

### 4. Resolve the triggering PR and test author

**Triggering PR**: the run's head branch follows the pattern `pull-request/<number>`.
Extract it and resolve the PR:

```bash
gh run view <run_id> --repo NVIDIA/Megatron-LM --json headBranch --jq .headBranch
# → e.g. "pull-request/4332"
# Extract PR number and fetch metadata:
gh pr view <pr_number> --repo NVIDIA/Megatron-LM --json number,title,url \
  --jq '{number: .number, title: .title, url: .url}'
```

**Test file author**: find the GitHub login of whoever last touched the failing
test file. The file may not exist on `main` — first determine the PR's base
branch, then search from there:

```bash
# 1. Get the PR's base branch (e.g. "main", "dev", "release/X.Y")
gh pr view <pr_number> --repo NVIDIA/Megatron-LM --json baseRefName --jq .baseRefName

# 2. Search commits on that base branch
gh api "repos/NVIDIA/Megatron-LM/commits?path=<test-file-path>&sha=<base-branch>&per_page=1" \
  --jq '.[0] | {login: .author.login, name: .commit.author.name, sha: .sha}'
```

If the result is empty (file was introduced by the PR itself), query the PR's
commits instead:

```bash
gh api "repos/NVIDIA/Megatron-LM/pulls/<pr_number>/commits" \
  --jq '[.[] | select(.files? // [] | any(.filename == "<test-file-path>"))] | .[0].author.login'
```

As a last resort, list the PR commits and pick the author of the commit whose
message most closely relates to the failing test file.

### 5. Extract the root cause

From the logs, identify:

- **Failed test(s)**: lines matching `FAILED tests/...::...` give the exact pytest node IDs.
- **Error message**: the assertion failure, exception type, or first meaningful
  traceback frame — keep it under ~30 lines.
- **Job name**: the GitHub Actions job name (e.g. `tests/unit_tests/transformer/moe/**/*.py - latest`).
- **Run / job URLs** and **PR URL**: for linking in the issue.

### 6. Check for duplicate issues

Search for open issues that already cover the same test:

```bash
gh issue list --repo NVIDIA/Megatron-LM \
  --state open \
  --search "<failed-test-filename>" \
  --json number,title,url \
  --limit 10
```

- If a matching open issue exists, **do not create a new one**. Report the
  existing issue to the user and stop.
- If no match is found, proceed to file a new issue.

### 7. Create the issue

Pass `--assignee <test-author-login>` to assign the issue to the test file's
author. Include the triggering PR URL in the issue body.

```bash
gh issue create \
  --repo NVIDIA/Megatron-LM \
  --title "🐛 CI failure: <failed-test-node-id>" \
  --label "bug" \
  --assignee "<test-author-login>" \
  --body "..."
```

Use the bug-report template body structure:

```markdown
**Describe the bug**

CI test `<failed-test-node-id>` failed in job [`<job-name>`](<job-url>).
Tag @NVIDIA/mcore-oncall to get oncall's attention to this issue.

**Failing run**

| Field | Value |
|-------|-------|
| PR    | [#<pr_number>: <pr_title>](<pr_url>) |
| Run   | [<run_id>](<run_url>) |
| Job   | [<job_name>](<job_url>) |

**Error**

```
<core error message / traceback — 30 lines max>
```

**Steps/Code to reproduce bug**

Re-run the failing CI job linked above, or locally inside the dev container:

```bash
pytest <failed-test-node-id>
```

**Additional context**

Triaged automatically via `/triage-issue`.
```

If multiple tests failed in the same job, list each one as a separate bullet
under "Describe the bug" and include the combined error snippets. Assign the
issue to the author of whichever test file appears first in the failure list.

### 8. Report back to the user

Print the URL of the newly created issue (or the duplicate, if found) so the
user can review or share it.

## Important guidelines

- Never create an issue if a duplicate already exists — link the existing one instead.
- Always include the triggering PR link in the issue body.
- Always assign the issue to the test file's most recent author. If the author
  lookup fails (e.g. the commit was made by a bot or the login is unavailable),
  skip `--assignee` and note it in the "Additional context" section.
- Keep the error snippet concise (≤30 lines). Truncate long tracebacks and note that the full log is available via the job URL.
- Do not guess the root cause — quote the actual log output verbatim.
- If the job is still in progress or the logs are unavailable, say so and ask the user to retry once the run completes.

© Philip Petrakian · Apache-2.0 · NVIDIA/skills

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

Все скиллы по теме «Git и GitHub» →
triage Matt Pocock Скилл проводит issue и внешние PR через роли триажа, проверку и подготовку брифа для агента. Подойдёт мейнтейнеру, который разбирает очередь задач. 990 453установок code-review Matt Pocock Проверяет изменения от выбранной точки по стандартам репозитория и требованиям задачи. Нужен для ревью ветки, PR или незавершённой работы. 789 521установок implement Matt Pocock Выполняет задачу по спецификации или тикетам, ведёт работу через тесты и завершает её ревью с коммитом. Подходит для задач, где нужен дисциплинированный цикл разработки. 774 700установок git-guardrails-claude-code Matt Pocock Скилл ставит хук Claude Code, который останавливает опасные Git-команды до их запуска. Нужен, если агент не должен делать push или удалять изменения. 499 069установок setup-pre-commit Matt Pocock Скилл настраивает pre-commit для JavaScript-репозитория: Husky запускает форматирование, проверку типов и тесты перед коммитом. 489 289установок scaffold-exercises Matt Pocock Скилл создаёт структуру учебных упражнений с секциями, задачами, решениями и пояснениями. Пригодится при запуске нового раздела курса. 480 196установок

Из того же набора178

holoscan-install-container Проверяет хост и ставит контейнер разработки Holoscan SDK 5.x с CUDA 13. Нужен перед запуском SDK в Docker с GPU. CX Codex +1 1 800установок holoscan-setup Проверяет хост и помогает выбрать способ установки Holoscan SDK 5.x: контейнер, Debian-пакеты, wheels или сборка из исходников. CX Codex +1 1 800установок tilegym-adding-cutile-kernel Пошагово проводит агента через добавление нового GPU-оператора на cuTile в библиотеку TileGym. Пригодится при расширении набора ядер и их интеграции в проект. CX Codex +1 1 800установок mcore-testing Скилл объясняет тестовую систему Megatron-LM: раскладку тестов, рецепты YAML, golden values и запуск unit-тестов локально. CX Codex +1 1 800установок mcore-run-on-slurm Скилл помогает подготовить запуск распределённого обучения Megatron-LM на SLURM-кластере. Пригодится для настройки sbatch, мног узлового запуска и разбора сбоев по логам рангов. CX Codex +1 1 800установок nemo-rl-brev-etiquette Скилл задаёт агенту правила хранения файлов на инстансе Brev: код остаётся в репозитории, тяжёлые артефакты уезжают на /ephemeral. CX Codex +1 1 800установок mcore-linting-and-formatting Скилл настраивает проверку и форматирование кода в проекте Megatron-LM. Помогает исправить ошибки ruff, mypy и отсортировать импорты перед открытием PR. CX Codex +1 1 800установок nemo-mbridge-perf-tp-dp-comm-overlap Скилл ведёт по настройке перекрытия коммуникаций TP, DP и PP в Megatron-Bridge: какие ручки крутить, где смотреть код и как проверить результат. CX Codex +1 1 800установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой