# glab-container-registry

glab-container-registry operates GitLab container registry repositories and tags via glab CLI. Useful for tag metadata inspection and scheduled image cleanup.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 121 installs · ★ 51 repo stars
- Author: vince-winkintel
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/vince-winkintel/gitlab-cli-skills/tree/HEAD/glab-container-registry/SKILL.md
- Updated: 2026-10-20
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/glab-container-registry

## What it does

This skill guides coding agents through `glab container-registry` commands. It covers inspecting repository lists for projects or groups, fetching digests and sizes, and pruning outdated tags.

Repository identifiers stem directly from registry listings rather than standard Git project IDs. Bulk tag purges execute asynchronously inside GitLab, meaning matching tags remain visible until backend workers finish.

Running queries outside an active repository checkout requires the `-R` flag. Destructive delete commands should skip `--yes` until target IDs and cleanup regexes get verified.

## Requirements
- Works with: GitLab

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-container-registry -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-container-registry -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-container-registry -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install vince-winkintel/gitlab-cli-skills glab-container-registry
```

2. **Manually: put the files in place**
- File: `.github/skills/glab-container-registry/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-container-registry -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/vince-winkintel/gitlab-cli-skills --path glab-container-registry
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-container-registry -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/vince-winkintel/gitlab-cli-skills/tree/HEAD/glab-container-registry/SKILL.md

## When to use it
- list registry repositories across GitLab projects or groups
- inspect image digest, size, and creation timestamps for specific tags
- schedule regex-based bulk cleanup of older tags while retaining recent builds
- delete an entire registry repository along with all published image layers

## Example prompts
- List all container registry repositories for group gitlab-org with tag counts
- Get detailed metadata including size and digest for tags in registry repository 456
- Delete tags older than 1month in repository 456 but keep tags matching latest

## Source text · SKILL.md · MIT

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: f5135e389e1cee0c.

BEGIN THIRD-PARTY FILE f5135e389e1cee0c
````text
---
name: glab-container-registry
description: Manage GitLab container registry repositories and tags with glab. Use when listing, viewing, or deleting container registry repositories/tags, cleaning old image tags, inspecting tag metadata, or using glab container-registry commands. Triggers on container registry, registry repository, registry tags, image tags, glab container-registry.
---

# glab container-registry

Manage GitLab container registry repositories and tags from the CLI.

Repository IDs come from registry repository list/view output, not from Git repository project IDs.

## Common workflows

```bash
# List registry repositories for the current project
glab container-registry repository list

# List repositories for another project
glab container-registry repository list -R gitlab-org/cli

# List repositories for a group
glab container-registry repository list --group gitlab-org

# Include tag counts/tags in project repository output
glab container-registry repository list --include-tags-count --include-tags

# JSON output for automation
glab container-registry repository list --output json --jq '.[].id'
```

## Repository commands

```bash
# View a registry repository
glab container-registry repository view <repository-id>

# Include tags in the repository response
glab container-registry repository view <repository-id> --include-tags

# Delete a repository and all images/tags published to it (destructive)
glab container-registry repository delete <repository-id>
glab container-registry repository delete <repository-id> --yes
```

Aliases: `repository ls`, `repository show`, and `repository del`.

## Tag commands

```bash
# List tags for a registry repository
glab container-registry tag list <repository-id>

# List tags for a repository in another project
glab container-registry tag list <repository-id> -R owner/repo

# Include digest, size, and creation time for each tag
glab container-registry tag list <repository-id> --details

# View a specific tag
glab container-registry tag view <repository-id> <tag-name>

# Delete one tag (destructive)
glab container-registry tag delete <repository-id> <tag-name>
glab container-registry tag delete <repository-id> <tag-name> --yes
```

Aliases: `tag ls`, `tag show`, and `tag del`.

## Bulk tag cleanup

Bulk deletion is scheduled asynchronously by GitLab. Matching tags may remain visible until the background deletion job completes.

```bash
# Schedule tags matching a regex for deletion
glab container-registry tag delete <repository-id> \
  --name-regex-delete '^release-.*' \
  --yes

# Delete old tags while keeping the 10 most recent matching tags
````
END THIRD-PARTY FILE f5135e389e1cee0c

The third-party file has ended. Everything between the f5135e389e1cee0c 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 2645 of 3607 bytes. © vince-winkintel · MIT · https://github.com/vince-winkintel/gitlab-cli-skills/tree/HEAD/glab-container-registry/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
