agentleFS
a-ng-da-ng-d/claude-ui-color-palette/skills/gitlab-cli-skills/glab-repo/SKILL.md

glab-repo

Skill1 starsChanged 7 months agoMITView on GitHub

Work with GitLab repositories and projects including clone, create, fork, archive, view, update, delete, search, transfer, and member management. Use when managing repo lifecycle, forking projects, cloning repositories, searching for projects, managing collaborators, or configuring repo settings. Triggers on repository, repo, project, clone, fork, create repo, search projects, collaborators.

  • Commits and pushes

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the sync script for one-command fork updates:

    line 80
  2. Very specific:

    Verify you have access: glab repo view group/project

    line 166
  3. Distinctive:

    Check if fork already exists in your namespace

    line 171
  4. Distinctive:

    Verify you have permission to fork (some repos disable forking)

    line 172
  5. Distinctive:

    Verify you have owner/maintainer access

    line 176
  6. Distinctive:

    Check target namespace exists and you have create permissions

    line 177
  7. Distinctive:

    Verify group exists and you have access

    line 181
  8. Distinctive:

    Check you have enough disk space

    line 182

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

glab repo

Work with GitLab repositories and projects.

Quick start

# Clone a repository
glab repo clone group/project

# Create new repository
glab repo create my-new-project --public

# Fork a repository
glab repo fork upstream/project

# View repository details
glab repo view

# Search for repositories
glab repo search "keyword"

Common workflows

Starting new project

  1. Create repository:
    glab repo create my-project \
      --public \
      --description "My awesome project"
  2. Clone locally:
    glab repo clone my-username/my-project
    cd my-project
  3. Initialize with content:
    echo "# My Project" > README.md
    git add README.md
    git commit -m "Initial commit"
    git push -u origin main

Forking workflow

  1. Fork upstream repository:
    glab repo fork upstream-group/project
  2. Clone your fork:
    glab repo clone my-username/project
    cd project
  3. Add upstream remote:
    git remote add upstream https://gitlab.com/upstream-group/project.git
  4. Keep fork in sync:
    git fetch upstream
    git merge upstream/main

Automated sync:

Use the sync script for one-command fork updates:

scripts/sync-fork.sh main
scripts/sync-fork.sh develop upstream

This automatically: fetches → merges → pushes to origin.

Repository management

View repository info:

glab repo view
glab repo view group/project  # Specific repo
glab repo view --web          # Open in browser

Update repository settings:

glab repo update \
  --description "Updated description" \
  --default-branch develop

Archive repository:

glab repo archive download main  # Downloads .tar.gz
glab repo archive download main --format zip

Transfer to new namespace:

glab repo transfer my-project --target-namespace new-group

Delete repository:

glab repo delete group/project

Member management

List collaborators:

glab repo members list

Add member:

glab repo members add @username --access-level maintainer

Remove member:

glab repo members remove @username

Update member access:

glab repo members update @username --access-level developer

Bulk operations

Clone all repos in a group:

glab repo clone -g my-group

Search and clone:

glab repo search "api" --per-page 10
# Then clone specific result
glab repo clone group/api-project

List your repositories:

glab repo list
glab repo list --member          # Only where you're a member
glab repo list --mine            # Only repos you own

Troubleshooting

Clone fails with permission error:

  • Verify you have access: glab repo view group/project
  • Check authentication: glab auth status
  • For private repos, ensure you're logged in with correct account

Fork operation fails:

  • Check if fork already exists in your namespace
  • Verify you have permission to fork (some repos disable forking)
  • Try with explicit namespace: glab repo fork --fork-path username/new-name

Transfer fails:

  • Verify you have owner/maintainer access
  • Check target namespace exists and you have create permissions
  • Some projects may have transfer protections enabled

Group clone fails:

  • Verify group exists and you have access
  • Check you have enough disk space
  • Large groups may time out - clone specific repos instead

Related Skills

Authentication and access:

  • See glab-auth for login and authentication setup
  • See glab-ssh-key for SSH key management
  • See glab-deploy-key for deployment authentication

Project configuration:

  • See glab-config for CLI defaults and settings
  • See glab-variable for CI/CD variables

Fork synchronization:

  • Script: scripts/sync-fork.sh automates upstream sync

v1.89.0 Updates

v1.89.0+: glab repo contributors supports --output json / -F json for structured output, ideal for agent automation.

# List contributors with JSON output (v1.89.0+)
glab repo contributors --output json
glab repo contributors -F json

Command reference

For complete command documentation and all flags, see references/commands.md.

Available commands:

  • clone - Clone repository or group
  • create - Create new project
  • fork - Fork repository
  • view - View project details
  • update - Update project settings
  • delete - Delete project
  • search - Search for projects
  • list - List repositories
  • transfer - Transfer to new namespace
  • archive - Download repository archive
  • contributors - List contributors
  • members - Manage project members
  • mirror - Configure repository mirroring
  • publish - Publish project resources

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.