# Send GitLab API to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
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

```text
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.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "gitlab-api",
    "name": "GitLab API",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/d1gl3/gitlab-api",
    "canonicalUrl": "https://clawhub.ai/d1gl3/gitlab-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/gitlab-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=gitlab-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/gitlab_api.sh"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "gitlab-api",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-03T17:52:33.571Z",
      "expiresAt": "2026-05-10T17:52:33.571Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=gitlab-api",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=gitlab-api",
        "contentDisposition": "attachment; filename=\"gitlab-api-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "gitlab-api"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/gitlab-api"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/gitlab-api",
    "downloadUrl": "https://openagent3.xyz/downloads/gitlab-api",
    "agentUrl": "https://openagent3.xyz/skills/gitlab-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/gitlab-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/gitlab-api/agent.md"
  }
}
```
## Documentation

### 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
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: d1gl3
- Version: 0.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-03T17:52:33.571Z
- Expires at: 2026-05-10T17:52:33.571Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/gitlab-api)
- [Send to Agent page](https://openagent3.xyz/skills/gitlab-api/agent)
- [JSON manifest](https://openagent3.xyz/skills/gitlab-api/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/gitlab-api/agent.md)
- [Download page](https://openagent3.xyz/downloads/gitlab-api)