npx skills add ...
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-repo
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.
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-repo
Work with GitLab repositories and projects.
Repository URLs returned by the API are validated before glab passes them to Git. Supported URL schemes and scp-like SSH syntax are accepted; option-like strings, remote-helper transports, whitespace, and control characters are rejected. If a clone, fork, or remote operation fails with an invalid remote URL, inspect the exact trusted project/host metadata rather than bypassing validation or handing that string directly to Git.
Create repository:
Note: glab repo create --readme clones the newly created repository instead of using git init, ensuring a clean local copy with the initial README.
glab repo create --skipGitInit creates the remote project without prompting to initialize a local directory. If the current directory is not already a Git repository, glab also skips adding a remote instead of emitting a misleading fatal: not a git repository warning after successful remote creation.
A path containing nested groups preserves the complete namespace. For example, glab repo create group/subgroup/my-project creates my-project under group/subgroup, not only the final subgroup.
Clone locally (if not using --readme):
To clone only the GitLab wiki, pass --wiki with one project reference. It cannot be combined with group-wide --group cloning, and it fails clearly when the project's wiki is disabled.
SSH configurations that map gitlab.com to the official altssh.gitlab.com endpoint are recognized as GitLab.com rather than as a separate self-managed host.
For self-managed hosts that include a port, glab keys subfolder config lookup on the full host with port. If a repository resolves to the wrong API host or misses a configured subfolder, verify the exact host key in the config file at glab config path includes the port.
Initialize with content:
Fork upstream repository:
Clone your fork:
Add upstream remote:
glab repo remote add <namespace/project> resolves a GitLab project reference and adds the appropriate Git remote URL. The default remote name is the first path component (upstream-group in the example); override it with --name / -n. Use --protocol ssh|https / -p to override the git_protocol config.
Keep fork in sync:
Automated sync:
Use the sync script bundled with this skill under scripts/ for one-command
fork updates (paths below are relative to the skill's own directory):
This automatically: fetches → merges → pushes to origin.
View repository info:
Update repository settings:
Archive repository:
Transfer to new namespace:
Delete repository:
glab repo prune deletes local Git branches whose GitLab merge requests have been merged. It never deletes remote branches on GitLab, and it skips protected branches, the default branch, and the branch currently checked out.
Prefer the default GitLab-backed mode for correctness: it queries merge requests for each local branch and handles squash/rebase merge cases better than plain git branch --merged. Use --merged only when the faster fast-forward-only check is acceptable.
List collaborators:
Add member:
Remove member:
Update member access:
Clone all repos in a group:
Search and clone:
List your repositories:
Clone fails with permission error:
glab repo view group/projectglab auth statusFork operation fails:
glab repo fork --fork-path username/new-nameTransfer fails:
Group clone fails:
Authentication and access:
glab-auth for login and authentication setupglab-ssh-key for SSH key managementglab-deploy-key for deployment authenticationProject configuration:
glab-config for CLI defaults and settingsglab-variable for CI/CD variablesFork synchronization:
scripts/sync-fork.sh automates upstream syncglab repo contributors supports --output json / -F json for structured output, which is useful for agent automation.
For complete command documentation and all flags, see references/commands.md.
Available commands:
clone - Clone repository or groupcreate - Create new projectfork - Fork repositoryview - View project detailsupdate - Update project settingsdelete - Delete projectsearch - Search for projectslist - List repositoriestransfer - Transfer to new namespacearchive - Download repository archivecontributors - List contributorsmembers - Manage project membersmirror - Configure repository mirroringremote - Manage Git remotes using GitLab project referencesprune - Delete local branches whose GitLab merge requests are mergedpublish - Publish project resources