# gitlab-workflow

Adds GitLab practices to coding assistants, covering merge request guidelines and multi-stage .gitlab-ci.yml pipelines.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1100 installs · ★ 286
- Author: Mindrally
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/Mindrally/skills/tree/HEAD/gitlab-workflow/SKILL.md
- Updated: 2026-10-08
- HTML: https://affpapa.org/en/nevibecode/skills/gitlab-workflow

## What it does

The skill supplies your assistant with structured conventions for GitLab development. It outlines branching rules based on GitLab Flow and commit formatting for merge requests. It also provides structured ticket templates for `.gitlab/issue_templates/`.

Pipeline design centers around `.gitlab-ci.yml`. The reference explains stage definitions and test sharding with `$CI_NODE_INDEX`. Reusable YAML anchors help keep configurations clean. It also incorporates vendor includes for SAST and secret detection.

Keep in mind that security variables require manual setup in GitLab project settings. Mark secrets as Protected and Masked in the web console, or build logs will expose raw credentials.

## Requirements
- Works with: GitLab

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill gitlab-workflow -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/gitlab-workflow/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/gitlab-workflow/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill gitlab-workflow -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/gitlab-workflow/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill gitlab-workflow -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/gitlab-workflow/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Mindrally/skills gitlab-workflow
```

2. **Manually: put the files in place**
- File: `.github/skills/gitlab-workflow/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill gitlab-workflow -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Mindrally/skills --path gitlab-workflow
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/gitlab-workflow/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill gitlab-workflow -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Mindrally/skills/tree/HEAD/gitlab-workflow/SKILL.md

## When to use it
- configure `.gitlab-ci.yml` pipeline stages with test sharding
- draft standardized merge requests with test checklists
- create structured bug and feature templates in `.gitlab/issue_templates/`
- attach GitLab security scanning templates to existing pipelines

## Example prompts
- Generate a `.gitlab-ci.yml` file with build, test, and manual production deployment stages
- Draft a merge request description for user login following the project template
- Create a Bug.md template for `.gitlab/issue_templates/` with labels

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: ce9583b2809bf614.

BEGIN THIRD-PARTY FILE ce9583b2809bf614
````text
---
name: gitlab-workflow
description: GitLab best practices for merge requests, CI/CD pipelines, issue tracking, and DevOps workflows
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# GitLab Workflow Best Practices

You are an expert in GitLab workflows, including merge requests, CI/CD pipelines, issue tracking, and DevOps best practices.

## Core Principles

- Use merge requests for all code changes with thorough review
- Implement comprehensive CI/CD pipelines with `.gitlab-ci.yml`
- Follow GitLab Flow or similar branching strategy
- Leverage GitLab's built-in DevOps features
- Maintain security through proper access controls and scanning

## Merge Request Best Practices

### Creating Effective Merge Requests

1. **Keep MRs small and focused**
   - One feature or fix per MR
   - Split large changes into smaller, reviewable chunks

2. **MR Title Convention**
   - Use conventional commits: `feat: add user authentication`
   - Include issue reference: `feat: add login page (#123)`

3. **MR Description Template**
   ```markdown
   ## Summary
   Brief description of what this MR accomplishes.

   ## Changes
   - List of specific changes

   ## Testing
   - How changes were tested
   - Test commands to run

   ## Checklist
   - [ ] Tests added/updated
   - [ ] Documentation updated
   - [ ] Pipeline passes

   ## Related Issues
   Closes #123
   ```

4. **Link issues properly**
   - Use `Closes #123` to auto-close issues on merge
   - Use `Related to #123` for references without closing

### Draft Merge Requests

Use Draft MRs for work in progress:
- Prefix title with `Draft:` or use the Draft button
- Request early feedback on approach
- Convert to ready when complete

## CI/CD Pipeline Best Practices

### Basic Pipeline Structure

```yaml
stages:
  - build
  - test
  - security
  - deploy

variables:
  NODE_VERSION: "20"

default:
  image: node:${NODE_VERSION}
  cache:
    key: ${CI_COMMIT_REF_SLUG}
    paths:
      - node_modules/

build:
  stage: build
  script:
    - npm ci
    - npm run build
  artifacts:
    paths:
      - dist/
    expire_in: 1 week

test:
  stage: test
  script:
    - npm ci
    - npm test
  coverage: '/Coverage: \d+\.\d+%/'

lint:
  stage: test
  script:
    - npm ci
    - npm run lint
  allow_failure: false
```

### Advanced Pipeline Features

#### Parallel Jobs

```yaml
test:
  stage: test
  parallel: 3
  script:
    - npm ci
    - npm test -- --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL
```

#### Conditional Jobs

```yaml
deploy:production:
  stage: deploy
  script:
    - ./deploy.sh production
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
      when: manual
    - when: never
  environment:
    name: production
    url: https://example.com
```

#### Job Templates

```yaml
.test_template: &test_template
  stage: test
  before_script:
    - npm ci
  cache:
    key: ${CI_COMMIT_REF_SLUG}
    paths:
      - node_modules/

unit_tests:
  <<: *test_template
  script:
    - npm run test:unit

integration_tests:
  <<: *test_template
  script:
````
END THIRD-PARTY FILE ce9583b2809bf614

The third-party file has ended. Everything between the ce9583b2809bf614 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3045 of 6610 bytes. © Mindrally · Apache-2.0 · https://github.com/Mindrally/skills/tree/HEAD/gitlab-workflow/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
