A comprehensive Claude Code skill that provides expert guidance for using the GitLab CLI (glab) to manage GitLab resources directly from the command line.
This skill enables Claude Code to effectively assist with GitLab workflows using the official glab CLI tool. It provides detailed knowledge about GitLab operations including merge requests, issues, CI/CD pipelines, repository management, and more.
- Core workflows: Common GitLab operations (MRs, issues, CI/CD, repos)
- Authentication guidance: Quick setup for GitLab.com and self-hosted instances
- Best practices: When and how to use glab effectively
- Progressive disclosure: Concise core instructions with detailed references loaded as needed
- Comprehensive references: Detailed command docs, troubleshooting, and quick reference guides
This skill should be placed in your Claude Code skills directory:
# For project-specific installation
mkdir -p .claude/skills
git clone https://github.com/henricook/claude-glab-skill .claude/skills/glab
# For personal/global installation
mkdir -p ~/.claude/skills
git clone https://github.com/henricook/claude-glab-skill ~/.claude/skills/glabAfter installation, your directory structure will be:
.claude/skills/glab/
├── SKILL.md # Core skill (~200 lines, loaded when skill invoked)
├── references/ # Detailed docs (loaded only as needed)
│ ├── commands-detailed.md # Comprehensive command reference
│ ├── quick-reference.md # Command cheat sheet
│ └── troubleshooting.md # Detailed error scenarios
├── README.md
├── CONTRIBUTING.md
├── CHANGELOG.md
└── LICENSE
Before using this skill, ensure glab is installed on your system:
macOS:
brew install glabLinux:
# Debian/Ubuntu
sudo apt install glab
# Fedora/RHEL
sudo dnf install glab
# Arch Linux
sudo pacman -S glabWindows:
# Using Chocolatey
choco install glab
# Using Scoop
scoop install glabFrom source:
go install gitlab.com/gitlab-org/cli/cmd/glab@latestFor more installation options, visit: https://gitlab.com/gitlab-org/cli
Once installed, Claude Code will automatically detect when you need GitLab CLI assistance and can invoke this skill. You can also explicitly invoke it:
@claude using the glab skill, help me create a merge request
Or simply ask Claude Code to perform GitLab operations:
Can you list my open merge requests?
Create an issue for the bug we just found
Show me the status of the CI pipeline
This skill follows the progressive disclosure design principle for optimal performance:
- SKILL.md frontmatter (~50 chars) - Loaded first for skill discovery and invocation
- SKILL.md body (~200 lines) - Core workflows and patterns loaded when skill is invoked
- references/ folder - Detailed documentation loaded into context only as needed
The main skill file is concise and focused on:
- When to use glab for different tasks
- Essential authentication setup
- Common workflow patterns (not exhaustive command lists)
- Best practices and quick fixes
- References to detailed documentation
Why it's concise: Loads quickly when invoked, providing immediate guidance without overwhelming context.
commands-detailed.md - Load when:
- User needs specific flag or option details
- Working with advanced commands (API, variables, schedules)
- Need comprehensive command examples
troubleshooting.md - Load when:
- Encountering authentication or connection errors
- Debugging CI/CD pipeline issues
- Need detailed error scenarios and solutions
quick-reference.md - Load when:
- User wants a command cheat sheet
- Quick lookup of common flags and patterns
The skill is configured with allowed-tools: Bash, Read, Grep, Glob to ensure Claude Code can:
- Execute glab commands via Bash
- Read configuration and reference files as needed
- Search for relevant files and patterns
- Work within the repository context
Rather than memorizing commands, the skill teaches:
- Creating merge requests with reviewers and labels
- Reviewing code by checking out MRs locally
- Managing issues and linking them to MRs
- Monitoring CI/CD pipelines and handling failures
30+ glab commands documented across:
- Merge Requests, Issues, CI/CD Pipelines
- Repositories, API access, Labels, Releases
- Snippets, Users, Variables, SSH Keys
- And more (see references/commands-detailed.md)
The skill helps Claude Code:
- Detect when authentication is needed
- Identify repository context issues
- Suggest appropriate flags and options
- Load detailed docs only when necessary
Full support for GitLab.com and self-hosted instances with environment variable configuration and multi-instance authentication.
After installation, Claude Code can help with tasks like:
Creating a merge request:
Create a merge request for my current branch with the title "Fix login bug" and assign it to reviewers alice and bob
Reviewing merge requests:
Show me all merge requests where I'm assigned as a reviewer
Managing CI/CD:
Watch the current pipeline and let me know if it passes
Working with issues:
Create a bug issue titled "API timeout" with high priority label
The skill automatically adapts to:
- Current repository context
- Authenticated GitLab instances
- Self-hosted GitLab via GITLAB_HOST environment variable
- Multiple authentication profiles
This skill is designed to be comprehensive and up-to-date. If you find commands or workflows that should be added, please contribute:
- Test your additions with actual glab usage
- Follow the imperative/infinitive writing style established in SKILL.md
- Include practical examples
- Update this README if adding major new sections
- Claude Code with Skills support
- glab CLI tool installed and in PATH
- Authenticated GitLab account (via
glab auth login) - Git repository context for repository-specific operations
If Claude Code doesn't recognize the skill:
- Verify the skill is in
.claude/skills/glab/or~/.claude/skills/glab/ - Ensure SKILL.md exists and has valid YAML frontmatter
- Restart Claude Code if necessary
If glab commands fail:
- Verify installation:
glab --version - Check authentication:
glab auth status - Ensure you're in a Git repository or use
-R owner/repoflag
- glab Official Repository: https://gitlab.com/gitlab-org/cli
- GitLab CLI Documentation: https://docs.gitlab.com/editor_extensions/gitlab_cli/
- Claude Code Skills: https://docs.claude.com/en/docs/claude-code/skills
This skill is provided as a community resource for Claude Code users working with GitLab.
Version: 1.0.0 Last Updated: November 2025 Compatible with: glab v1.40.0+