gitlab-self-hosted
Skill4 starsChanged 9 months agoMITView on GitHub
GitLab Server MR workflow via REST API v4. Get MR details, create MRs, assign reviewers, post code review comments, analyze changes. READ + WRITE operations.
- Reads credentials
In this repository3 other files it gives its agents.
- handoffSkill
- recallSkill
- session-syncSkill
The file
Files
GitLab Self-Hosted (Server)
MR workflow via REST API v4 with PAT authentication.
Arguments
auth: Test PAT authenticationanalyze <MR_IID> <PROJECT>: Analyze MR (read-only, no comment)get <MR_IID> <PROJECT>: Get MR detailsdiff <MR_IID> <PROJECT>: Get MR changes/diffcreate <SOURCE> <TARGET> <TITLE> <PROJECT> [DESCRIPTION]: Create new MRassign <MR_IID> <USERNAME> <PROJECT>: Assign MR to userunassign <MR_IID> <PROJECT>: Unassign MRcomment <MR_IID> <BODY> <PROJECT>: Add comment to MRreview <MR_IID> <PROJECT>: Full code review workflow (analyze + generate review)staging-merge <FEATURE_BRANCH> <PROJECT>: Merge feature branch to staging-k8s via temp branchtest-cases <FEATURE_BRANCH> <PROJECT>: Generate test cases checklist from branch diff vs master
PROJECT: Can be short name (e.g., my-app) or full path (e.g., group/subgroup/my-app). Short names auto-prepend GITLAB_PROJECT_NAMESPACE from .env.
Argument Handling
Parse arguments and execute corresponding script:
| Argument | Script Command |
auth | ./scripts/gitlab-auth-test.sh |
analyze <IID> <PROJECT> | ./scripts/gitlab-mr-analyze.sh <IID> -p <PROJECT> |
get <IID> <PROJECT> | ./scripts/gitlab-mr-get.sh <IID> -p <PROJECT> |
diff <IID> <PROJECT> | ./scripts/gitlab-mr-diff.sh <IID> -p <PROJECT> |
create <SRC> <TGT> <TITLE> <PROJECT> [DESC] | ./scripts/gitlab-mr-create.sh -s <SRC> -t <TGT> -T <TITLE> -p <PROJECT> [-d <DESC>] |
assign <IID> <USER> <PROJECT> | ./scripts/gitlab-mr-assign.sh <IID> <USER> -p <PROJECT> |
unassign <IID> <PROJECT> | ./scripts/gitlab-mr-assign.sh <IID> --unassign -p <PROJECT> |
comment <IID> <BODY> <PROJECT> | ./scripts/gitlab-mr-comment.sh <IID> "<BODY>" -p <PROJECT> |
review <IID> <PROJECT> | Run analyze → read references/code-review-workflow.md → generate review |
staging-merge <BRANCH> <PROJECT> | Run staging merge workflow → read references/staging-merge-workflow.md |
test-cases <BRANCH> <PROJECT> | Generate test cases → read references/test-cases-generation-workflow.md |
Script base path: Relative to this skill's directory.
When to Use
- Getting MR details and diffs
- Creating new MRs
- Assigning/unassigning reviewers
- Posting code review comments
- Analyzing MR changes vs codebase
Scope: READ + WRITE operations
Quick Reference
Authentication
- Reference:
references/authentication.md- PAT setup, troubleshooting
API - Merge Requests
- Reference:
references/api-merge-requests.md- Get, create, update MRs
API - Comments
- Reference:
references/api-notes-comments.md- Notes, discussions
Code Review
- Reference:
references/code-review-workflow.md- Review process
Test Case Generation
- Reference:
references/test-case-generation.md- From MR analysis
Staging Merge
- Reference:
references/staging-merge-workflow.md- Merge feature to staging-k8s
Test Cases Generation
- Reference:
references/test-cases-generation-workflow.md- Generate test checklist from diff
Usage Examples
# Auth
/gitlab-self-hosted auth
# Get MR details
/gitlab-self-hosted get 123 my-app
# Get MR diff
/gitlab-self-hosted diff 123 my-app
# Create MR
/gitlab-self-hosted create feature-branch main "Add new feature" my-app
# Assign / Unassign
/gitlab-self-hosted assign 123 username my-app
/gitlab-self-hosted unassign 123 my-app
# Comment
/gitlab-self-hosted comment 123 "LGTM!" my-app
# Full code review
/gitlab-self-hosted review 123 my-app
# Analyze (read-only)
/gitlab-self-hosted analyze 123 my-app
# Staging merge
/gitlab-self-hosted staging-merge feat/TICKET-123-feature my-app
# Generate test cases
/gitlab-self-hosted test-cases feat/TICKET-123-feature my-appWorkflow: Code Review
- Analyze MR:
/gitlab-self-hosted analyze 123 my-app - Full review:
/gitlab-self-hosted review 123 my-app - Post comment:
/gitlab-self-hosted comment 123 "## Review..." my-app
Environment Setup
export GITLAB_DOMAIN="https://gitlab.your-company.com"
export GITLAB_TOKEN="glpat-xxxxxxxxxxxx"
export GITLAB_PROJECT_NAMESPACE="group/subgroup" # optional, auto-prepend for short names
export GITLAB_PROJECT_ID="group/project" # optional defaultPlatform Requirements
- GitLab Server with API v4
curlandjqavailable- PAT with
apiscope
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

