---
name: igit-mr-review
description: >-
  Parse an iGit or GitLab MR link, resolve the project and MR IID,
  use the igit-mr-bootstrap Plan B local CLI to fetch details, diff, and comments,
  then generate a standardized review report. It posts to the MR thread by default and
  does not require IDE-side MCP pre-registration. `/igit-mr-review-mcp` is kept in
  parallel for side-by-side debugging during the transition period.
---

# iGit MR Review

This is a high-frequency shortcut built on top of `igit-mr-bootstrap`. It preserves the
`/igit-mr-review` experience while avoiding a hard dependency on IDE-side MCP registration.

During the transition period, two review entries are kept in parallel:

- `/igit-mr-review`
  - Recommended default entry
  - Prefers the local CLI path
  - Best when you want a stable experience without IDE MCP pre-registration
- `/igit-mr-review-mcp`
  - Explicit MCP debugging entry
  - Best for comparing MCP registration, client config, and tool invocation issues

## When To Use

- The user pastes an MR link and wants a one-shot review
- The user wants to keep the old `/igit-mr-review` shortcut
- The target is explicit: generate a standardized review and post it to the MR comment thread

## Default Behavior

1. Parse an MR link from the input first:
   - For example: `https://igit.58corp.com/ep-fe/ebi-core/-/merge_requests/3376`
2. Extract:
   - project path, for example `ep-fe/ebi-core`
   - `merge_request_iid`, for example `3376`
3. Resolve the project and MR through the local CLI:
   - `igit-mr-bootstrap review <mr-url> --submit`
   - or `igit-mr-bootstrap review --project <path> --mr <iid> --submit`
4. To make the review more stable, the underlying flow still fetches:
   - `get_merge_request_details`
   - `get_merge_request_diff`
   - `get_merge_request_comments`
5. Then call:
   - `generate_and_add_standardized_review`
6. Default options:
   - `include_code_analysis: true`
   - `include_security_check: true`
   - `auto_add_comment: true`

## Accepted Input Forms

Preferred forms:

```text
/igit-mr-review
MR link: https://igit.58corp.com/ep-fe/ebi-core/-/merge_requests/3376
```

```text
/igit-mr-review https://igit.58corp.com/ep-fe/ebi-core/-/merge_requests/3376
```

If there is no full link, this is also acceptable:

```text
/igit-mr-review
Project: ep-fe/ebi-core
MR: 3376
```

## Fallback Strategy

- If `get_projects` returns multiple candidates, list them and ask the user to confirm the project ID
- If the user only wants analysis and does not want to post a comment, use:
  - `igit-mr-bootstrap review <mr-url>`
  - without `--submit`
- If auth or project lookup fails, remind the user to verify:
  - `MR_MCP_GITLAB_TOKEN`
  - `MR_MCP_GITLAB_HOST`
- If `igit-mr-bootstrap` is not available locally, prefer:
  - `npm run build`
  - or the bootstrap / bundle installer path to provision the command
- If the user wants to compare against the old path during debugging, switch to:
  - `/igit-mr-review-mcp`

## Relationship To The Main Skill

- This is a high-frequency shortcut, not a standalone capability set
- Its underlying capabilities still reuse the tool implementations from this repository, but execution goes through the Plan B local CLI
- `/igit-mr-review-mcp` is intentionally kept in parallel for now, with the expectation of converging later
