| name | gitlab-explorer |
| description | Explore GitLab repositories using glab CLI and git commands. Use when user asks to: clone repositories, search projects or code in GitLab, view merge requests, explore project structure, check CI/CD pipelines, work with issues, or analyze git history. IMPORTANT: Always run authentication check script first before any GitLab operation. |
GitLab Explorer
This skill enables exploring GitLab repositories, searching code, viewing merge requests, and working with git history.
Before Any GitLab Operation
ALWAYS run the authentication check first:
bash /mnt/skills/public/gitlab-explorer/scripts/check_gitlab_auth.sh
This script will:
- Verify if GitLab token is configured
- Validate the token by calling GitLab API
- Show logged-in user info if valid
- Provide setup instructions if not configured
DO NOT try to read or echo $GITLAB_TOKEN directly - the script handles validation securely without exposing the token.
If authentication is not configured, inform the user:
To use GitLab features, please go to and add your GitLab Personal Access Token. Then start a NEW chat to apply the token.
Quick Start
Clone a Repository
git clone https://gitlab.com/group/project.git
cd project
Search for Projects
glab api "projects?search=keyword" | jq '.[].path_with_namespace'
glab api "groups/GROUP_NAME/projects" | jq '.[].name'
Check Current User
glab api user | jq '{username, email, name}'
Exploring Code
Repository Structure
tree -L 2
find . -name "*.py" -type f
git grep "pattern"
Git History
git log --oneline -20
git log --oneline --graph --all -20
git blame filename
git show COMMIT_HASH
git diff main..feature-branch
Top Contributors
git shortlog -sn --all | head -10
Working with Merge Requests
glab mr list
glab mr view 123
glab mr diff 123
glab mr checkout 123
CI/CD Pipelines
glab ci status
glab ci list
glab ci view PIPELINE_ID
glab ci trace
Issues
glab issue list
glab issue view 123
glab issue create --title "Bug report" --description "Description here"
Reference Materials
For detailed command reference, see:
references/glab-commands.md - Complete glab CLI reference
references/git-commands.md - Git commands for code exploration
Common Workflows
Explore Unknown Repository
- Clone the repo
- Check README and documentation
- Explore directory structure with
tree
- Find main entry points
- Use
git log to understand recent changes
- Use
git blame to find who wrote specific code
Review Merge Request
glab mr view ID - read description
glab mr diff ID - review changes
glab mr checkout ID - test locally if needed
- Check CI status with
glab ci status
Find Code by Pattern
git grep "function_name"
git grep -n -C 3 "pattern"
git grep "pattern" -- "*.py"