glab-skills
Claude Code skills and hooks for working with GitLab via the glab CLI.
Plugin versions follow the glab CLI version covered by the documentation and skills. glab-skills 1.126.0 targets glab 1.126.0.
What's in here
This repo has four skills covering common GitLab operations: auth, merge requests, issues, and CI pipelines. It also includes glab-auth-guard.sh, a PostToolUse hook that detects authentication errors in glab output and prompts you to log in, and a settings.local.json with pre-approved glab command permissions so Claude does not ask for confirmation on every call. 256 commands are documented across docs/commands.md and docs/reference.md.
Requirements
glab CLI installed (documentation and skills verified against 1.126.0)
- Claude Code installed
Install glab
macOS:
brew install glab
Windows (winget):
winget install GitLab.GLab
Windows (scoop):
scoop install glab
Linux (apt):
sudo apt install glab
Linux (snap):
sudo snap install glab
Verify the install:
glab --version
Authenticate
You must authenticate before any glab command will work.
glab auth login
For a self-managed GitLab instance:
glab auth login --hostname gitlab.example.com
Check your current auth status:
glab auth status
The glab-auth-guard.sh hook runs after every Bash tool call. When it detects an authentication error in glab output, it tells Claude to prompt you to run glab auth login.
Plugin install (recommended)
Run these three commands inside any Claude Code session:
/plugin marketplace add moumine9/glab-skills
/plugin install glab-skills
/reload-plugins
Pick a scope when prompted. User is the one you want most of the time — it's available in every project. Project drops the plugin into .claude/plugins/ so the whole team gets it. Local keeps it project-scoped and just for you.
Skills are available as:
/glab-skills:auth
/glab-skills:mr
/glab-skills:issue
/glab-skills:ci
The auth guard hook activates automatically once the plugin is installed.
Note: The official Anthropic marketplace includes a gitlab plugin that connects via MCP. This plugin is different: it wraps the glab CLI using skills, which load progressively and use far less context than MCP tool definitions loaded at session start.
Test locally before installing
claude --plugin-dir ./
This loads the plugin from the current directory without installing it. Use /reload-plugins to pick up changes without restarting.
Manual install
Skills
Copy each skill directory into ~/.claude/skills/:
cp -r skills/auth ~/.claude/skills/
cp -r skills/mr ~/.claude/skills/
cp -r skills/issue ~/.claude/skills/
cp -r skills/ci ~/.claude/skills/
Standalone triggers (without the plugin namespace):
Auth guard hook
Copy the hook and make it executable:
cp hooks/glab-auth-guard.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/glab-auth-guard.sh
Add the following entry to ~/.claude/settings.json under hooks.PostToolUse:
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hooks/glab-auth-guard.sh\""
}
]
}
Project permissions
Copy .claude/settings.local.json into your project's .claude/ folder:
cp .claude/settings.local.json <your-project>/.claude/settings.local.json
Reference
Skills
| Skill | Plugin trigger | Standalone trigger | Description | Auto-invoked |
|---|
| auth | /glab-skills:auth | /auth | Auth flows, Docker credentials, tokens, and key management | No |
| mr | /glab-skills:mr | /mr | Full MR lifecycle: create, review, merge, and stacked diffs | No |
| issue | /glab-skills:issue | /issue | Create, manage, board view, and track issues | No |
| ci | /glab-skills:ci | /ci | Pipelines, jobs, schedules, runners, and CI variables | No |
Skills with disable-model-invocation: true require explicit invocation. Claude will not trigger them automatically.
Hooks
| Hook | Trigger | What it does |
|---|
| glab-auth-guard.sh | PostToolUse + PostToolUseFailure (Bash) | Detects auth errors in glab output and tells Claude to prompt for authentication |
The hook uses an if: "Bash(glab *)" condition so it only spawns when a glab command is involved, not on every Bash call.
Settings