agentleFS
arnabdeypolimiarnabdeypolimi/claude_code_setup/.claude/skills/gitlab-integration/SKILL.md

gitlab-integration

Skill4 starsChanged 6 months agoMITView on GitHub

GitLab operations via glab CLI. Use when working with GitLab merge requests, issues, CI/CD pipelines, or repository operations. Triggers include creating/viewing/merging MRs, checking pipeline status, managing issues, and any GitLab-specific tasks.

  • Commits and pushes

The file

Files
SKILL.md

GitLab Integration

Patterns for interacting with GitLab via the glab CLI.

Authentication

Check Auth Status

glab auth status

Login

glab auth login
glab auth login --token <token>

Merge Requests

Create MR

# Basic
glab mr create --title "Title" --description "Description"

# With target branch
glab mr create --title "Title" --target-branch main

# With labels and assignee
glab mr create --title "Title" --label "feature,priority:high" --assignee username

# Draft MR
glab mr create --title "Draft: Title" --draft

Create MR via Push Options

git push -o merge_request.create \
         -o merge_request.target=<branch> \
         -o merge_request.title="Title" \
         -o merge_request.description="Description" \
         -o merge_request.label="label1,label2" \
         -o merge_request.assignee="username" \
         -o merge_request.remove_source_branch

List MRs

glab mr list                          # All open MRs
glab mr list --state opened|merged|closed
glab mr list --target-branch=main
glab mr list --author=username
glab mr list --assignee=@me
glab mr list --label="feature"

View MR

glab mr view <id>                     # View details
glab mr view <id> --comments          # View with comments
glab mr view <id> --web               # View in browser
glab mr diff <id>                     # View diff

Update MR

glab mr update <id> --title "New Title"
glab mr update <id> --description "New description"
glab mr update <id> --label "new-label"
glab mr update <id> --ready           # Mark ready (remove draft)

MR Actions

glab mr approve <id>
glab mr merge <id>
glab mr merge <id> --squash
glab mr close <id>
glab mr reopen <id>

MR Comments

glab mr comment <id> --message "Comment text"
glab mr note <id> "Note text"

Issues

List Issues

glab issue list                       # All open issues
glab issue list --state opened|closed
glab issue list --label "bug"
glab issue list --assignee @me

View Issue

glab issue view <id>
glab issue view <id> --comments
glab issue view <id> --web

Create Issue

glab issue create --title "Title" --description "Description"
glab issue create --title "Title" --label "bug,priority:high"

Update Issue

glab issue update <id> --title "New Title"
glab issue close <id>
glab issue reopen <id>

CI/CD

Pipeline Status

glab ci status                        # Current pipeline status
glab ci view                          # View pipeline
glab ci view <pipeline_id>            # View specific pipeline

Job Operations

glab ci trace <job_id>                # View job logs
glab ci list                          # List jobs

Pipeline Actions

glab ci retry <pipeline_id>           # Retry failed pipeline
glab ci cancel <pipeline_id>          # Cancel running pipeline
glab ci run                           # Run new pipeline

CI Config Validation

glab ci lint .gitlab-ci.yml

Repository

Clone

glab repo clone <repo>

View

glab repo view
glab repo view --web

Fork

glab repo fork <repo>

Project Configuration

View Project

glab project view

List Variables

glab variable list

API Access

Direct API Calls

# GET request
glab api projects/:id/merge_requests

# POST request
glab api projects/:id/issues --method POST --field title="Title"

Useful Patterns

Check MR Before Push

glab mr list --source-branch=$(git branch --show-current)

Monitor CI After Push

git push origin HEAD
sleep 5
glab ci status

Quick MR Workflow

git checkout -b feature/quick-fix
# ... make changes ...
git add . && git commit -m "fix: quick fix"
git push -o merge_request.create \
         -o merge_request.target=main \
         -o merge_request.title="fix: quick fix"

Troubleshooting

IssueSolution
Auth failedRun glab auth login
MR not foundCheck MR ID and project
CI lint failsCheck .gitlab-ci.yml syntax
Push rejectedPull and rebase first

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.