cajias/claude-skills/gitlab-mr-inline-comments

Claude Code and agent skill by cajias/claude-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when GitLab MR comments have position null, appear as DiscussionNote instead of DiffNote, or inline code review comments show as general MR comments. Also use when glab api nested object parameters are ignored.

Install

npx vskill@latest install cajias/claude-skills/gitlab-mr-inline-comments

SKILL.md

The same SKILL.md was published earlier as cajias/claude-skills/gitlab-mr-inline-comments.

GitLab MR Inline Comments

Overview

GitLab's API requires nested JSON objects for positioned comments. The glab api CLI tool's -f "position[key]=value" syntax sends flat keys instead of nested objects, causing GitLab to silently create DiscussionNote (general comment) instead of DiffNote (inline comment).

Quick Reference

SymptomCause
type: DiscussionNote instead of DiffNotePosition data sent as flat keys
position: null in responseGitLab rejected position silently
Comment appears in MR thread, not on code lineSame as above
201 Created but wrong note typeAPI accepts request, ignores invalid position

The Fix

Use --input with JSON file and --header "Content-Type: application/json":

bash
# Create JSON with properly nested position object
cat > /tmp/comment.json << 'EOF'
{
"body": "Your comment text",
"position": {
"base_sha": "abc123...",
"start_sha": "abc123...",
"head_sha": "def456...",
"position_type": "text",
"old_path": "path/to/file",
"new_path": "path/to/file",
"new_line": 42
}
}
EOF
# Post with proper content type
glab api "/projects/:id/merge_requests/:iid/discussions" \
--method POST \
--header "Content-Type: application/json" \
--input /tmp/comment.json

Position Field Rules

Line TypeRequired Fields
Added line (+)new_line only
Removed line (-)old_line only
Context line (``)Both old_line AND new_line

Getting SHA Values

bash
# Get diff_refs from MR
glab api "/projects/:id/merge_requests/:iid" | jq '.diff_refs'
# Returns: base_sha, head_sha, start_sha

Why glab -f Fails

bash
# This sends FLAT keys (WRONG):
glab api "..." -f "position[base_sha]=abc"
# Results in: {"position[base_sha]": "abc"}
# API expects NESTED object:
# {"position": {"base_sha": "abc"}}

Verification

Success response has:

  • type: "DiffNote" (not DiscussionNote or null)
  • position object with your SHA values (not null)

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Refreshed 21 Nov 2026, 8 days ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cajias/claude-skills/gitlab-mr-inline-comments/badge)](https://verified-skill.com/skills/cajias/claude-skills/gitlab-mr-inline-comments)

Something wrong with this skill or its page? Tell us.