Skip to content
Back to skills

Gitlab Cli Workflow

ASecurity

'HOW — GitLab CLI (glab): push branch, create draft MR with title/body; fallback untracked

  • 19 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 2, 2026
ai-agentsshellbashgit

Works with

  • cli

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add ulises-jeremias/agent-toolkit --skill gitlab-cli-workflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gitlab Cli Workflow?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gitlab Cli Workflow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ulises-jeremias-gitlab-cli-workflow/badge)](https://www.skillsdirectory.com/skills/ulises-jeremias-gitlab-cli-workflow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gitlab-cli-workflow
description: 'HOW — GitLab CLI (glab): push branch, create draft MR with title/body; fallback untracked
  markdown. Use when origin is GitLab.'
origin:
  type: first-party
---
# GitLab CLI — draft MR (HOW)

Use this skill when the remote is **GitLab** and you need to **push** and open a **draft** merge request. Workflow skills delegate here.

## Prerequisites

- `glab` authenticated for the host (`glab auth status`).
- Branch pushed to the documented remote.

## Discover draft flags

Run `glab mr create --help` on the machine—subcommands and flags evolve. Prefer **draft** / **WIP** equivalents when available.

## Recommended flow

1. Push the branch and set upstream per team practice.
2. Create an MR body file: use the project’s **merge request template** when present. If the project has no template, you may align the **Markdown** with **`pr-fallback`** (same default sections as the org PR body) and **`output-handshake`** for where the description file lives and human review—then use that file for `--description` or the equivalent.
3. **Draft** MR (illustrative; confirm flags with `glab --help`):

```bash
glab mr create --draft --title "YOUR_TITLE" --description "$(cat /path/to/body.md)"
```

If the CLI prefers a file flag, use that instead of shell substitution.

4. If draft creation fails, retry with non-draft **only** if the user accepts, and note the limitation in chat.

## Fallback (CLI failure)

1. Write **untracked** `MERGE_REQUEST_DESCRIPTION_<WORK_ITEM_ID>.md` (or `PR_DESCRIPTION_<ID>.md`) with title + body.
2. **Do not** `git add` it.
3. Instruct the user to open the GitLab **New merge request** UI from the branch and paste content, choosing **draft** if the UI offers it.

## Safety

- No secrets in MR descriptions.
- No force-push to shared defaults without explicit user request.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.