glab-mr-line-comment

glab-mr-line-comment is a skill for Claude Code from dremonkey/agents-and-skills. It costs 88 tokens per session (1,969 once invoked), scanned A, original, MIT.

A procedure for posting comments attached to exact changed lines in a GitLab merge request, the review page for proposed code changes. It uses the glab command-line tool and GitLab’s line-position data.

In plain words
What is it for?
Use it when sending inline review feedback to specific added or changed lines of a GitLab merge request.
Why use it?
It avoids comments appearing only in the general discussion when the reviewer intended them to sit beside a particular line in the diff.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the agents-and-skills plugin — 8 skills shipped together

Good fit Use it when sending inline review feedback to specific added or changed lines of a GitLab merge request.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dremonkey/agents-and-skills/glab-mr-line-comment
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dremonkey/agents-and-skills --skill glab-mr-line-comment
Clone the repo
git clone --depth 1 https://github.com/dremonkey/agents-and-skills

Made for: Claude Code.

Or install agents-and-skills, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for glab-mr-line-comment

README.md
[![agentmods](https://agentmods.dev/badge/skills/dremonkey/agents-and-skills/glab-mr-line-comment/github.svg)](https://agentmods.dev/skills/dremonkey/agents-and-skills/glab-mr-line-comment)
Your own site
<a href="https://agentmods.dev/skills/dremonkey/agents-and-skills/glab-mr-line-comment"><img src="https://agentmods.dev/badge/skills/dremonkey/agents-and-skills/glab-mr-line-comment/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for glab-mr-line-comment

Your own site · 80×15
<a href="https://agentmods.dev/skills/dremonkey/agents-and-skills/glab-mr-line-comment"><img src="https://agentmods.dev/badge/skills/dremonkey/agents-and-skills/glab-mr-line-comment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,969 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.01969
Opus 5 $0.00044 $0.00984
Sonnet 5 $0.00018 $0.00394
Haiku 4.5 $0.00009 $0.00197

Measured 10d ago against content hash 52d15feb4c68, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

glab-mr-line-comment scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/glab-mr-line-comment/SKILL.md · 226 lines

How it starts

The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Line-attached MR comments on GitLab via glab

When to use

The user asks you to post review feedback as inline comments on specific lines of a GitLab MR diff. The deliverable is a DiffNote (rendered next to the changed line in the MR diff view), not a DiscussionNote (rendered in the MR-level activity feed).

The trap

The obvious approach is to use glab api with --field for each parameter, including nested position[*] keys:

# DO NOT DO THIS — silently degrades to a DiscussionNote
glab api projects/$PID/merge_requests/$IID/discussions -X POST \
  --field "body=$BODY" \
  --field "position[base_sha]=..." \
  --field "position[head_sha]=..." \
  --field "position[new_path]=path/to/file.ts" \
  --field "position[new_line]=42" \
  ...

GitLab's API accepts this request and returns 201, but the resulting note has type: DiscussionNote and no position field. The form-encoded position[*] keys are silently dropped on this endpoint. The comment appears on the MR but is not attached to any line of the diff.

This failure mode is invisible until you actually look at the MR in a browser or query the note back. glab mr note does not support diff positions at all — only glab api does, and only with a JSON body.

The fix

Send the request as a JSON body with --input and an explicit Content-Type header:

glab api projects/$PROJECT_ID/merge_requests/$MR_IID/discussions \
  -X POST \
  -H "Content-Type: application/json" \
  --input /tmp/comment.json

Where /tmp/comment.json is:

{
  "body": "...markdown...",
  "position": {
    "base_sha":     "...",
    "start_sha":    "...",
    "head_sha":     "...",
    "position_type": "text",
    "new_path":     "path/to/file.ts",
    "old_path":     "path/to/file.ts",
    "new_line":     42
  }
}

The response will have notes[0].type === 'DiffNote' and a populated position object. If type is DiscussionNote, the position was dropped — the comment is not line-attached.

Read the full file on GitHub · 226 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 226 lines · 88 tokens per session scan A 52d15feb4c68

Subscribe to this mod's changes

glab-mr-line-comment is a skill published in the GitHub repository dremonkey/agents-and-skills (2 stars, last pushed 27d ago), licensed MIT. It adds 88 tokens to every session and 1,969 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.