glab-clilisted
Install: claude install-skill danielsitek/skills
# glab CLI — Agent Guide
The central virtue is **non-interactive**: always pass all required values as
flags so glab never prompts. The nuclear option: set `GLAB_NO_PROMPT=1` in the
environment to suppress every prompt globally.
The same virtue applies to **reading**: several read commands default to an
interactive/live view or open a pager, which stalls an agent. For any command
that reports state (`ci status`, `ci list`, `mr view`, `mr list`), request
machine output with `-F json` and filter with `--jq` — this never pages and is
directly parseable. Avoid the bare interactive forms.
---
## Creating a Merge Request
```bash
glab mr create \
--title "feat: short imperative description" \
--description "Full description of the change." \
--target-branch main \
--yes
```
Completion criterion: glab prints an MR URL in stdout — e.g.
`https://gitlab.com/org/repo/-/merge_requests/42`.
### Useful optional flags
| Flag | Effect |
|---|---|
| `--draft` | Open as draft / WIP |
| `--label "bugfix,backend"` | Attach labels |
| `--assignee username` | Assign to a user |
| `--reviewer username` | Request review |
| `--remove-source-branch` | Delete branch on merge |
| `--milestone "Sprint 10"` | Attach milestone |
| `--push` | Push current commits before creating MR |
### `--fill` mode (auto-title from commits)
`--fill` derives title and description from commit history. It is **mutually
exclusive** with `--title` and `--description`:
```bash
# ✅ non-interactive with explic