{"id":"gitlab","kind":"sdk","name":"GitLab","slug":"gitlab","description":"GitLab API clients for projects, CI/CD, and DevOps workflows.","vendor":"GitLab","languages":["ruby","python","javascript","typescript","nodejs","go"],"categories":["devtools"],"homepage":"https://docs.gitlab.com/ee/api/","docsUrl":"https://docs.gitlab.com/ee/api/","githubUrl":"https://gitlab.com/gitlab-org","packages":[{"registry":"rubygems","name":"gitlab","url":"https://rubygems.org/gems/gitlab"},{"registry":"pypi","name":"python-gitlab","url":"https://pypi.org/project/python-gitlab/"},{"registry":"npm","name":"@gitbeaker/rest","url":"https://www.npmjs.com/package/@gitbeaker/rest"}],"tags":["ci","devops"],"skills":[{"name":"glab","url":"https://skills.sh/gitlab-org/ai/glab","install":"npx skills add gitlab-org/ai --skill glab","sdk":"gitlab","key":"gitlab/glab","hasContent":false},{"name":"gitlab-cli-skills","url":"https://skills.sh/vince-winkintel/gitlab-cli-skills/gitlab-cli-skills","install":"npx skills add vince-winkintel/gitlab-cli-skills","sdk":"gitlab","key":"gitlab/gitlab-cli-skills","description":"Comprehensive GitLab CLI (glab) command reference and workflows for all GitLab operations via terminal. Use when user mentions GitLab CLI, glab commands, GitLab automation, MR/issue management via CLI, CI/CD pipeline commands, repo operations, authentication setup, or any GitLab terminal operations. Routes to specialized sub-skills for auth, CI, MRs, issues, releases, repos, and 30+ other glab commands. Triggers on glab, GitLab CLI, GitLab commands, GitLab terminal, GitLab automation.","hasContent":true,"content":"---\nname: gitlab-cli-skills\ndescription: Comprehensive GitLab CLI (glab) command reference and workflows for all GitLab operations via terminal. Use when user mentions GitLab CLI, glab commands, GitLab automation, MR/issue management via CLI, CI/CD pipeline commands, repo operations, authentication setup, or any GitLab terminal operations. Routes to specialized sub-skills for auth, CI, MRs, issues, releases, repos, and 30+ other glab commands. Triggers on glab, GitLab CLI, GitLab commands, GitLab terminal, GitLab automation.\nmetadata: {\"openclaw\": {\"requires\": {\"bins\": [\"glab\"], \"anyBins\": [\"cosign\"]}, \"install\": [{\"id\": \"brew\", \"kind\": \"brew\", \"formula\": \"glab\", \"bins\": [\"glab\"], \"label\": \"Install glab (brew)\"}, {\"id\": \"download\", \"kind\": \"download\", \"url\": \"https://gitlab.com/gitlab-org/cli/-/releases\", \"label\": \"Download glab binary\"}]}}\nrequirements:\n  binaries:\n    - glab\n  binaries_optional:\n    - cosign\n  notes: |\n    Requires GitLab authentication via 'glab auth login' (stores token in the active global glab config file).\n    Some features may access sensitive files: SSH keys (~/.ssh/id_rsa for DPoP), Docker config (~/.docker/config.json for registry auth).\n    Review auth workflows and script contents before autonomous use.\nopenclaw:\n  requires:\n    credentials:\n      - name: GITLAB_TOKEN\n        description: >\n          GitLab personal access token with 'api' scope. Used by automation\n          scripts (e.g. post-inline-comment.py) to post MR comments via the\n          REST API. If not set, scripts fall back to reading the token from\n          the active global glab CLI config.\n        required: false\n        fallback: glab config (set via glab auth login)\n    network:\n      - description: Outbound HTTPS to your GitLab instance (default https://gitlab.com)\n        scope: authenticated API calls only; HTTPS enforced; token never sent over HTTP\n    write_access:\n      - description: >\n          Scripts in this skill can post comments, resolve threads, and approve\n          merge requests on your behalf. Review scripts/post-inline-comment.py\n          before use in automated or agentic contexts.\n---\n\n# GitLab CLI Skills\n\nComprehensive GitLab CLI (glab) command reference and workflows.\n\n## Quick start\n\n```bash\n# First time setup\nglab auth login\n\n# Common operations\nglab mr create --fill              # Create MR from current branch\nglab issue create                  # Create issue\nglab ci view                       # View pipeline status\nglab repo view --web              # Open repo in browser\n```\n\n## Multi-agent identity note\n\nWhen you want different agents to appear as different GitLab users, give each agent its own GitLab bot/service account. Multiple personal access tokens on the same GitLab user still act as that same visible identity.\n\nUse the **Actor identity** for actor-authored GitLab comments, replies, approvals, and other writes. Use an **agent identity** only when the GitLab action is explicitly that agent's own work product. Choose the intended visible actor **before the first GitLab write**.\n\nTreat shell identity as sticky and unsafe by default. If another env file was sourced earlier in the same shell/session, `glab` may still write as that previously loaded identity unless you deliberately switch and verify first.\n\nA practical pattern is one env file per actor, for example `~/.config/openclaw/env/gitlab-actor.env`, `~/.config/openclaw/env/gitlab-reviewer.env`, and `~/.config/openclaw/env/gitlab-release.env`. Keep these env files outside version control, restrict their permissions (for example `chmod 600`), be mindful of backup exposure, and use least-privilege bot/service-account tokens. In a reused shell, clear stale GitLab auth vars first or start a fresh shell. If those files use plain `KEY=value` lines, load them with exported vars before running `glab`:\n\n```bash\nunset GITLAB_TOKEN GITLAB_ACCESS_TOKEN OAUTH_TOKEN GITLAB_HOST\nset -a\nsource ~/.config/openclaw/env/gitlab-<actor>.env\nset +a\n```\n\nPlain `source` updates the current shell but may not export variables to child processes such as `glab`. If the token/host vars are not exported, `glab` may silently fall back to shared stored auth from the active global glab config file, which can make the wrong account appear to perform the action.\n\n### Required pre-flight before any GitLab write\n\nRun this immediately before any GitLab write, including `glab mr note`, review replies/approvals, and any `glab api` `POST`/`PATCH`/`PUT`/`DELETE` call:\n\n```bash\nglab auth status --hostname \"$GITLAB_HOST\"\nglab api --hostname \"$GITLAB_HOST\" user\n```\n\nThis assumes the target actor env file set `GITLAB_HOST` for the exact GitLab instance you intend to modify. Do not write until both commands clearly show the intended visible actor on that host.\n\n### Wrong-identity remediation\n\nIf a comment or reply was posted under the wrong identity:\n\n1. Stop posting.\n2. Delete the mistaken comment or reply if cleanup is needed.\n3. `unset GITLAB_TOKEN GITLAB_ACCESS_TOKEN OAUTH_TOKEN GITLAB_HOST` or start a fresh shell.\n4. Source the correct env file with `set -a; source ...; set +a`.\n5. Rerun `glab auth status --hostname \"$GITLAB_HOST\"` and `glab api --hostname \"$GITLAB_HOST\" user`.\n6. Repost under the correct actor.\n7. Verify the thread no longer shows the wrong visible author for the replacement message.\n\nIf the wrong-identity write changed state beyond a comment or reply, do not treat the comment cleanup steps as sufficient. Re-auth as above, then use the matching GitLab reversal for that write under the correct actor and host, such as unapproving an MR or sending the compensating `glab api --hostname \"$GITLAB_HOST\"` mutation for the exact resource that was changed.\n\n## Skill organization\n\nThis skill routes to specialized sub-skills by GitLab domain. Each is a\nstandalone skill in a sibling directory; open its `SKILL.md` for full details.\n\n**Core Workflows:**\n- [`glab-mr`](../glab-mr/SKILL.md) - Merge requests: create, review, approve, merge\n- [`glab-issue`](../glab-issue/SKILL.md) - Issues: create, list, update, close, comment\n- [`glab-ci`](../glab-ci/SKILL.md) - CI/CD: pipelines, jobs, logs, artifacts\n- [`glab-repo`](../glab-repo/SKILL.md) - Repositories: clone, create, fork, manage\n\n**Project Management:**\n- [`glab-milestone`](../glab-milestone/SKILL.md) - Release planning and milestone tracking\n- [`glab-iteration`](../glab-iteration/SKILL.md) - Sprint/iteration management\n- [`glab-label`](../glab-label/SKILL.md) - Label management and organization\n- [`glab-release`](../glab-release/SKILL.md) - Software releases and versioning\n- [`glab-packages`](../glab-packages/SKILL.md) - Project package registry listing, filtering, and generic package uploads\n\n**Authentication & Config:**\n- [`glab-auth`](../glab-auth/SKILL.md) - Login, logout, Docker registry auth\n- [`glab-config`](../glab-config/SKILL.md) - CLI configuration and defaults\n- [`glab-ssh-key`](../glab-ssh-key/SKILL.md) - SSH key management\n- [`glab-gpg-key`](../glab-gpg-key/SKILL.md) - GPG keys for commit signing\n- [`glab-token`](../glab-token/SKILL.md) - Personal and project access tokens\n- [`glab-todo`](../glab-todo/SKILL.md) - Personal GitLab to-do triage and completion\n\n**CI/CD Management:**\n- [`glab-job`](../glab-job/SKILL.md) - Individual job operations\n- [`glab-schedule`](../glab-schedule/SKILL.md) - Scheduled pipelines and cron jobs\n- [`glab-variable`](../glab-variable/SKILL.md) - CI/CD variables and secrets\n- [`glab-securefile`](../glab-securefile/SKILL.md) - Secure files for pipelines\n- [`glab-runner`](../glab-runner/SKILL.md) - Runner management: list, assign/unassign, inspect jobs/managers, pause/unpause, delete\n- [`glab-runner-controller`](../glab-runner-controller/SKILL.md) - Runner controller, scope, and token management (EXPERIMENTAL, admin-only)\n\n**Collaboration:**\n- [`glab-user`](../glab-user/SKILL.md) - User profiles and information\n- [`glab-snippet`](../glab-snippet/SKILL.md) - Code snippets (GitLab gists)\n- [`glab-incident`](../glab-incident/SKILL.md) - Incident management\n- [`glab-workitems`](../glab-workitems/SKILL.md) - Work items: tasks, OKRs, key results, next-gen epics\n\n**Advanced:**\n- [`glab-api`](../glab-api/SKILL.md) - Direct REST API calls\n- [`glab-cluster`](../glab-cluster/SKILL.md) - Kubernetes cluster integration\n- [`glab-container-registry`](../glab-container-registry/SKILL.md) - Container registry repositories and tags\n- [`glab-deploy-key`](../glab-deploy-key/SKILL.md) - Deploy keys for automation\n- [`glab-orbit`](../glab-orbit/SKILL.md) - GitLab Knowledge Graph / Orbit discovery, schema inspection, and remote query workflows (EXPERIMENTAL)\n- [`glab-quick-actions`](../glab-quick-actions/SKILL.md) - GitLab slash command quick actions for batching state changes\n- [`glab-security`](../glab-security/SKILL.md) - Project security scan profile enable/disable/status management (EXPERIMENTAL)\n- [`glab-stack`](../glab-stack/SKILL.md) - Stacked/dependent merge requests\n- [`glab-opentofu`](../glab-opentofu/SKILL.md) - Terraform/OpenTofu state management\n\n**Utilities:**\n- [`glab-alias`](../glab-alias/SKILL.md) - Custom command aliases\n- [`glab-completion`](../glab-completion/SKILL.md) - Shell autocompletion\n- [`glab-help`](../glab-help/SKILL.md) - Command help and documentation\n- [`glab-version`](../glab-version/SKILL.md) - Version information\n- [`glab-check-update`](../glab-check-update/SKILL.md) - Update checker\n- [`glab-whatsnew`](../glab-whatsnew/SKILL.md) - Release notes since the last viewed or post-upgrade baseline\n- [`glab-changelog`](../glab-changelog/SKILL.md) - Changelog generation\n- [`glab-attestation`](../glab-attestation/SKILL.md) - Software supply chain security\n- [`glab-duo`](../glab-duo/SKILL.md) - GitLab Duo AI assistant\n- [`glab-mcp`](../glab-mcp/SKILL.md) - Model Context Protocol server for AI assistant integration (EXPERIMENTAL)\n- [`glab-skills`](../glab-skills/SKILL.md) - Install and manage bundled agent skills (EXPERIMENTAL)\n\n## When to use glab vs web UI\n\n**Use glab when:**\n- Automating GitLab operations in scripts\n- Working in terminal-centric workflows\n- Batch operations (multiple MRs/issues)\n- Integration with other CLI tools\n- CI/CD pipeline workflows\n- Faster navigation without browser context switching\n\n**Use web UI when:**\n- Complex diff review with inline comments\n- Visual merge conflict resolution\n- Configuring repo settings and permissions\n- Advanced search/filtering across projects\n- Reviewing security scanning results\n- Managing group/instance-level settings\n\n## Common workflows\n\n### Daily development\n\n```bash\n# Start work on issue\nglab issue view 123\ngit checkout -b 123-feature-name\n\n# Create MR when ready\nglab mr create --fill --draft\n\n# Mark ready for review\nglab mr update --ready\n\n# Merge after approval\nglab mr merge --when-pipeline-succeeds --remove-source-branch\n```\n\n### Code review\n\n```bash\n# List your review queue\nglab mr list --reviewer=@me --state=opened\n\n# Review an MR\nglab mr checkout 456\nglab mr diff\nnpm test\n\n# Approve\nglab mr approve 456\nglab mr note 456 -m \"LGTM! Nice work on the error handling.\"\n```\n\n### CI/CD debugging\n\n```bash\n# Check pipeline status\nglab ci status\n\n# View failed jobs\nglab ci view\n\n# Get job logs\nglab ci trace <job-id>\n\n# Retry failed job\nglab ci retry <job-id>\n```\n\n## Decision Trees\n\n### \"Should I create an MR or work on an issue first?\"\n\n```\nNeed to track work?\n├─ Yes → Create issue first (glab issue create)\n│         Then: glab mr for <issue-id>\n└─ No → Direct MR (glab mr create --fill)\n```\n\n**Use `glab issue create` + `glab mr for` when:**\n- Work needs discussion/approval before coding\n- Tracking feature requests or bugs\n- Sprint planning and assignment\n- Want issue to auto-close when MR merges\n\n**Use `glab mr create` directly when:**\n- Quick fixes or typos\n- Working from existing issue\n- Hotfixes or urgent changes\n\n### \"Which CI command should I use?\"\n\n```\nWhat do you need?\n├─ Overall pipeline status → glab ci status\n├─ Visual pipeline view → glab ci view\n├─ Specific job logs → glab ci trace <job-id>\n├─ Download build artifacts → glab ci artifact <ref> <job-name>\n├─ Validate config file → glab ci lint\n├─ Trigger new run → glab ci run\n└─ List all pipelines → glab ci list\n```\n\n**Quick reference:**\n- Pipeline-level: `glab ci status`, `glab ci view`, `glab ci run`\n- Job-level: `glab ci trace`, `glab job retry`, `glab job view`\n- Artifacts: `glab ci artifact` (by pipeline) or job artifacts via `glab job`\n\n### \"Clone or fork?\"\n\n```\nWhat's your relationship to the repo?\n├─ You have write access → glab repo clone group/project\n├─ Contributing to someone else's project:\n│   ├─ One-time contribution → glab repo fork + work + MR\n│   └─ Ongoing contributions → glab repo fork, then sync regularly\n└─ Just reading/exploring → glab repo clone (or view --web)\n```\n\n**Fork when:**\n- You don't have write access to the original repo\n- Contributing to open source projects\n- Experimenting without affecting the original\n- Need your own copy for long-term work\n\n**Clone when:**\n- You're a project member with write access\n- Working on organization/team repositories\n- No need for a personal copy\n\n### \"Project vs group labels?\"\n\n```\nWhere should the label live?\n├─ Used across multiple projects → glab label create --group <group>\n└─ Specific to one project → glab label create (in project directory)\n```\n\n**Group-level labels:**\n- Consistent labeling across organization\n- Examples: priority::high, type::bug, status::blocked\n- Managed centrally, inherited by projects\n\n**Project-level labels:**\n- Project-specific workflows\n- Examples: needs-ux-review, deploy-to-staging\n- Managed by project maintainers\n\n## Related Skills\n\n**MR and Issue workflows:**\n- Start with `glab-issue` to create/track work\n- Use `glab-mr` to create MR that closes issue\n- Script: `scripts/create-mr-from-issue.sh` automates this\n\n**CI/CD debugging:**\n- Use `glab-ci` for pipeline-level operations\n- Use `glab-job` for individual job operations\n- Script: `scripts/ci-debug.sh` for quick failure diagnosis\n\n**Repository operations:**\n- Use `glab-repo` for repository management\n- Use `glab-auth` for authentication setup\n- Script: `scripts/sync-fork.sh` for fork synchronization\n\n**Configuration:**\n- Use `glab-auth` for initial authentication\n- Use `glab-config` to set defaults and preferences\n- Use `glab-alias` for custom shortcuts\n","contentSource":"skills.sh/api/download/vince-winkintel/gitlab-cli-skills/gitlab-cli-skills","contentFetchedAt":"2026-07-27T08:59:33.620Z"}],"official":true,"generatedAt":"2026-07-27T09:02:29.956Z"}