โ† All skills
Tencent SkillHub ยท Developer Tools

GitLab API

GitLab API integration for repository operations. Use when working with GitLab repositories for reading, writing, creating, or deleting files, listing projects, managing branches, or any other GitLab repository operations.

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

GitLab API integration for repository operations. Use when working with GitLab repositories for reading, writing, creating, or deleting files, listing projects, managing branches, or any other GitLab repository operations.

โฌ‡ 0 downloads โ˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
SKILL.md, scripts/gitlab_api.sh

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
0.1.0

Documentation

ClawHub primary doc Primary doc: SKILL.md 15 sections Open source page

GitLab API

Interact with GitLab repositories via the REST API. Supports both GitLab.com and self-hosted instances.

Setup

Store your GitLab personal access token: mkdir -p ~/.config/gitlab echo "glpat-YOUR_TOKEN_HERE" > ~/.config/gitlab/api_token Token scopes needed: api or read_api + write_repository Get a token: GitLab.com: https://gitlab.com/-/user_settings/personal_access_tokens Self-hosted: https://YOUR_GITLAB/~/-/user_settings/personal_access_tokens

Configuration

Default instance: https://gitlab.com For self-hosted GitLab, create a config file: echo "https://gitlab.example.com" > ~/.config/gitlab/instance_url

List Projects

GITLAB_TOKEN=$(cat ~/.config/gitlab/api_token) GITLAB_URL=$(cat ~/.config/gitlab/instance_url 2>/dev/null || echo "https://gitlab.com") curl -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \ "$GITLAB_URL/api/v4/projects?owned=true&per_page=20"

Get Project ID

Projects are identified by ID or URL-encoded path (namespace%2Fproject). # By path curl -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \ "$GITLAB_URL/api/v4/projects/username%2Frepo" # Extract ID from response: jq '.id'

Read File

PROJECT_ID="12345" FILE_PATH="src/main.py" BRANCH="main" curl -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \ "$GITLAB_URL/api/v4/projects/$PROJECT_ID/repository/files/${FILE_PATH}?ref=$BRANCH" \ | jq -r '.content' | base64 -d

Create/Update File

PROJECT_ID="12345" FILE_PATH="src/new_file.py" BRANCH="main" CONTENT=$(echo "print('hello')" | base64) curl -X POST -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \ -H "Content-Type: application/json" \ "$GITLAB_URL/api/v4/projects/$PROJECT_ID/repository/files/${FILE_PATH}" \ -d @- <<EOF { "branch": "$BRANCH", "content": "$CONTENT", "commit_message": "Add new file", "encoding": "base64" } EOF For updates, use -X PUT instead of -X POST.

Delete File

curl -X DELETE -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \ -H "Content-Type: application/json" \ "$GITLAB_URL/api/v4/projects/$PROJECT_ID/repository/files/${FILE_PATH}" \ -d '{"branch": "main", "commit_message": "Delete file"}'

List Files in Directory

curl -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \ "$GITLAB_URL/api/v4/projects/$PROJECT_ID/repository/tree?path=src&ref=main"

Get Repository Content (Archive)

curl -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \ "$GITLAB_URL/api/v4/projects/$PROJECT_ID/repository/archive.tar.gz" \ -o repo.tar.gz

List Branches

curl -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \ "$GITLAB_URL/api/v4/projects/$PROJECT_ID/repository/branches"

Create Branch

curl -X POST -H "PRIVATE-TOKEN: $GITLAB_TOKEN" \ -H "Content-Type: application/json" \ "$GITLAB_URL/api/v4/projects/$PROJECT_ID/repository/branches" \ -d '{"branch": "feature-xyz", "ref": "main"}'

Helper Script

Use scripts/gitlab_api.sh for common operations: # List projects ./scripts/gitlab_api.sh list-projects # Read file ./scripts/gitlab_api.sh read-file <project-id> <file-path> [branch] # Write file ./scripts/gitlab_api.sh write-file <project-id> <file-path> <content> <commit-msg> [branch] # Delete file ./scripts/gitlab_api.sh delete-file <project-id> <file-path> <commit-msg> [branch] # List directory ./scripts/gitlab_api.sh list-dir <project-id> <dir-path> [branch]

Rate Limits

GitLab.com: 300 requests/minute (authenticated) Self-hosted: Configurable by admin

API Reference

Full API docs: https://docs.gitlab.com/ee/api/api_resources.html Key endpoints: Projects: /api/v4/projects Repository files: /api/v4/projects/:id/repository/files Repository tree: /api/v4/projects/:id/repository/tree Branches: /api/v4/projects/:id/repository/branches

Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
1 Docs1 Scripts
  • SKILL.md Primary doc
  • scripts/gitlab_api.sh Scripts