The /gitlab-duo-setup Skill Connects Claude Code to GitLab Duo With a Single Command
Say you write code in Claude Code, but your review, checks and audit live in GitLab. The gitlab-duo-setup skill, launched with the /gitlab-duo-setup command, enables GitLab Duo Agent Platform flows, auto-review and failed-pipeline repair for a group in a single pass, and connects the MCP server. Every merge request goes through the same reviews, scans and policies, so agent speed does not bypass control.
AI-processed from GitLab Blog; edited by Hamidun News
Picture a team where developers write code with an AI agent in the terminal, such as Claude Code (a local "harness" tool where you talk to the model and edit the repository). The agent opens changes quickly, but review, pipelines, security scans and audit live in GitLab, and each agent works with its own slice of context. GitLab calls the result a "shadow software factory": context, control and evidence get scattered across people and tools.
To fix this, the company has published a guide and a ready-made skill, gitlab-duo-setup. A skill is a folder of instructions that Claude Code executes on the /gitlab-duo-setup command. It connects your terminal once to GitLab Duo Agent Platform, GitLab's platform where agentic flows work with the full context of the repository and under your policies.
If your developers already use a mix of different agents, this is a way to put everyone under shared checks without forcing them to change their usual tools.
The idea: agent in the terminal, checks in GitLab
The setup works like this. You stay in your local tool. The article uses Claude Code, but the same approach works for Codex, Cursor, OpenCode and Duo CLI. From the terminal, you send long-running tasks to GitLab: pick up an issue and open a merge request, review every MR as it appears, resolve merge conflicts, fix a pipeline that has just failed. On the Ultimate tier, there is also triage and remediation of security findings after code lands in the repository.
The key point is that identity, policies, CI pipelines, approvals and audit accompany a change from planning to production. The local tool does not see the whole picture, so every MR still goes through the same reviews, pipelines, scans and approval policies. GitLab also stays neutral toward clouds, models and agents: you keep the tools and models that suit your organization.
How the setup works
You copy the skill into ~/.claude/skills/ (or into .claude/skills/ inside the repository, so the whole team has it), then run /gitlab-duo-setup in the project directory. Before making any changes, it reads your top-level group and its projects and shows a single plan. Group-level changes affect all projects and all members, and the plan says so explicitly. The skill waits for your "yes", and you can remove any line. Once you agree, it:
- enables Duo Agent Platform and flow execution for the group and adds the Code Review, Duo Developer and Fix CI/CD Pipeline flows, while any existing ones stay enabled;
- enables automatic code review at the group level, which applies to all projects;
- creates automation in each project with CI/CD that triggers Fix CI/CD Pipeline when a pipeline fails; projects that already have it are skipped, so running the skill again is safe;
- adds the GitLab MCP server to Claude Code at the user or project level and walks you through a browser login;
- verifies the result by calling list_duo_agents_and_flows: a successful response confirms the login, and the list of flows confirms the settings were applied.
On Ultimate, the skill asks one optional question: whether to also triage and fix security findings. At the end, it produces a short report with links to anything it could not do, for example if a project has no runners for flows or the group sets push rules.
If the GitLab tools do not appear, run /mcp and make sure GitLab is connected; if it is connected but shows no tools, restart Claude Code. A 403 error at login usually means MCP client access is disabled for the group. The owner enables "Allow connection to GitLab" under Settings > General > Permissions and group features.
What you get after connecting
Through MCP, Claude Code finds your issues, launches flows, reads review threads and pipeline status, and replies in discussions over a single OAuth connection. Every call is accompanied by an AI audit event for the platform team. Context builds up in layers: local files in the tool, then issue and MR context via MCP, then Duo Agent Platform flows with the full repository context and your checks.
The guide walks through four scenarios: handing an issue assigned to you to the Developer flow, getting automatic MR review and working through comments without leaving the terminal, fixing a failed pipeline with automation, and (on Ultimate) triaging vulnerabilities. For an even tighter loop, there is a second skill, gitlab-mr-followup, which helps the local agent follow the progress of work in the repository and act on your behalf.
What you will need
This is a vendor guide written for GitLab.com. You need a top-level group with GitLab credits (Premium and Ultimate groups receive promotional credits every month for each user) and a project with a pipeline, several open issues and a couple of MRs. You also need the Owner role on the group so the skill can configure it fully. If you are a project Maintainer but not a group owner, it configures only the project and lists what to ask the owner for. You also need Claude Code, git and GitLab CLI (glab, logged in via glab auth login). Vulnerability triage works only with an Ultimate license.
- Nov 29, 2026Google Is Not Banning Your Entire Account Over T3 Code: Only Antigravity Gets Shut Off for Gray-Area Plugins
- Nov 29, 2026Five Open-Source Skill Sets for AI Agents Pass 540,000 GitHub Stars
- Nov 29, 2026Anthropic Ported the Claude API from Python to Rust and Cut CPU Load by 70%
- Nov 29, 202632 free skills for Claude from 9 GitHub repositories with 252K stars
Key Questions Answered
What are the key details on The idea: agent in the terminal, checks in GitLab?
The setup works like this. You stay in your local tool. The article uses Claude Code, but the same approach works for Codex, Cursor, OpenCode and Duo CLI. From the terminal, you send long-running tasks to GitLab: pick up an issue and open a merge request, review every MR as it appears, resolve merge conflicts, fix a pipeline that has just failed. On the Ultimate tier, there is also triage and remediation of security findings after code lands in the repository.
How the setup works?
You copy the skill into ~/.claude/skills/ (or into .claude/skills/ inside the repository, so the whole team has it), then run /gitlab-duo-setup in the project directory. Before making any changes, it reads your top-level group and its projects and shows a single plan. Group-level changes affect all projects and all members, and the plan says so explicitly. The skill waits for your "yes", and you can remove any line.
What you get after connecting?
Through MCP, Claude Code finds your issues, launches flows, reads review threads and pipeline status, and replies in discussions over a single OAuth connection. Every call is accompanied by an AI audit event for the platform team. Context builds up in layers: local files in the tool, then issue and MR context via MCP, then Duo Agent Platform flows with the full repository context and your checks.
Free 2-Day Vibecoding & AI Agents Intensive
Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
