skills/specialized/gitlab-api/SKILL.md
Fetches and analyzes GitLab merge request (MR) comments, metadata, and review feedback using authenticated API calls. Capabilities include fetching comment threads, retrieving reviewer feedback, filtering unresolved discussions, and generating MR activity reports. Use when the user asks about GitLab MR comments, code review discussions, review feedback, approval status, troubleshooting review delays, or needs to fetch merge request metadata via the GitLab API.
npx skillsauth add pantheon-org/tekhne gitlab-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Retrieve and analyze GitLab merge request comments and metadata using authenticated API calls.
GITLAB_TOKEN or GITLAB_PAT with read_api scopecurl, jqFetches all comments from a GitLab merge request.
Location: .agents/skills/gitlab-api/scripts/get_mr_comments.sh
Usage:
.agents/skills/gitlab-api/scripts/get_mr_comments.sh <merge_request_url>
Example:
# Prerequisites assumed: GITLAB_TOKEN with read_api scope
.agents/skills/gitlab-api/scripts/get_mr_comments.sh "https://gitlab.com/your-group/your-project/-/merge_requests/123"
Output Format:
---
Author: Name (@username)
Date: ISO8601 timestamp (UTC)
Type: DiffNote|comment
System: true|false
Comment body text
System: true — automated/system-generated message; System: false — human commentType: DiffNote — inline code review comment; Type: comment — general MR commentExit Codes:
0: Success1: Invalid URL format, missing token, or API errorWhen to Examine Script Internals:
Read script source when debugging unexpected output, extending for custom metadata, or understanding URL encoding. For basic usage, the examples above suffice.
Script location: .agents/skills/gitlab-api/scripts/get_mr_comments.sh (~80 lines)
output=$(.agents/skills/gitlab-api/scripts/get_mr_comments.sh "$MR_URL")
echo "$output" | grep -q "Author:" || { echo "Invalid response — check token and URL"; exit 1; }
System: false to exclude automated messagesoutput=$(.agents/skills/gitlab-api/scripts/get_mr_comments.sh "$MR_URL")
[ -n "$output" ] && echo "$output" | grep -q "Date:" || { echo "Empty or malformed response — check credentials"; exit 1; }
401 Unauthorized: Token missing or invalid
GITLAB_TOKEN or GITLAB_PAT is set404 Project Not Found: Invalid project path
https://gitlab.com/group/project/-/merge_requests/IDGITLAB_TOKEN="glpat-xxxx" inline in a script committed to version control.$GITLAB_TOKEN) or a secrets manager; document the required scope in README.?per_page=100 without loop handlingX-Next-Page response header.curl .../merge_requests?per_page=100 assuming this returns all MRs.X-Next-Page is empty: check the header in each response and fetch the next page.429 Too Many Requests responses.429 status codes and implement exponential backoff; use the Retry-After header when provided.v3 API endpointv4.https://gitlab.com/api/v3/projects/...https://gitlab.com/api/v4/projects/...jq for JSON parsing, never grep on raw API JSON%2F for / in project paths)tools
A skill that produces warnings but no errors.
testing
A well-formed example skill for testing the validator.
development
A skill with code blocks and imperative instructions for testing content and contamination analysis.
tools