Skip to main content
skill CX Codex

glab-container-registry — Claude Code skill: what it does

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

MIT 121 installs ★ 51 updated 2026-10-20

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-container-registry -a claude-code
Open on GitHub

What glab-container-registry 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.

What it helps with

  • 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 for the agent

  • 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

How to install glab-container-registry

1Skills CLI (Vercel)

npx skills add vince-winkintel/gitlab-cli-skills --skill glab-container-registry -a claude-code

2Manually: put the files in place

~/.claude/skills/glab-container-registry/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/glab-container-registry/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about glab-container-registry

How to install glab-container-registry in Claude Code?

Run npx skills add vince-winkintel/gitlab-cli-skills --skill glab-container-registry -a claude-code in your terminal.

What does glab-container-registry do?

It gives the agent instructions and patterns to list, inspect, and remove GitLab container registry repositories and tags using the glab command line.

Where do registry repository IDs come from?

They come from the output of glab container-registry repository list or view commands. They are distinct from standard Git project IDs.

Source text

SKILL.md · MIT
---
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
glab container-registry tag delete <repository-id> \
  --name-regex-delete '.*' \
  --keep-n 10 \
  --older-than 30d \
  --yes

# Keep tags matching a regex during bulk deletion
glab container-registry tag delete <repository-id> \
  --name-regex-delete '.*' \
  --name-regex-keep '^stable$|^latest$' \
  --yes
```

Bulk flags:
- `--name-regex-delete <regex>` — tag names to delete.
- `--name-regex-keep <regex>` — tag names to keep.
- `--keep-n <n>` — keep latest N matching tags.
- `--older-than <duration>` — delete tags older than durations like `7d` or `1month`.

## Safety notes

- Treat repository/tag delete commands as destructive; omit `--yes` unless the target IDs and regexes have been reviewed.
- Use `--output json` and `--jq` for scripts instead of parsing tables.
- Use `-R/--repo` whenever running outside the target project's checkout.

## Reference

See [references/commands.md](references/commands.md) for command synopsis and flags.

© vince-winkintel · MIT · vince-winkintel/gitlab-cli-skills

Similar skills

All skills for DevOps and infrastructure →

From the same set45

The whole set →

Project sponsors

Companies that keep this analytics open