gitlab_skill
- Shell
39
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill vm0-ai/vm0-skills --skill gitlab- SKILL.md11.6 KB
Overview
This skill provides direct curl-based access to the GitLab REST API to manage projects, issues, merge requests, pipelines, and users. It uses simple, repeatable curl commands that work with GitLab.com or self-hosted GitLab instances. Examples cover common workflows like creating issues, opening merge requests, checking pipeline status, and listing projects.
How this skill works
The skill issues HTTP requests against https://${GITLAB_HOST}/api/v4 using a personal access token in the PRIVATE-TOKEN header. It exposes patterns for GET, POST, PUT, and DELETE using curl and jq for JSON filtering. Project identifiers may be numeric IDs or URL-encoded paths; many examples show using temporary JSON files for request bodies and bash -c to preserve environment variables when piping.
When to use it
- Automate repository administration tasks via scriptable curl calls.
- Create, update, or close issues programmatically.
- Open, inspect, and merge merge requests from automation or CI scripts.
- Check pipeline and job status or list recent pipelines for a project.
- Create or list projects and search or inspect users.
Best practices
- Set GITLAB_HOST and GITLAB_TOKEN environment variables before running commands.
- Use project IID (internal id) for issue and merge request endpoints within a project.
- URL-encode project path components (replace / with %2F) when not using numeric IDs.
- Handle pagination with per_page and page parameters for large result sets.
- Check merge_status and pipeline status before merging; implement backoff for 429 rate-limit responses.
Example use cases
- Verify authentication and current user with GET /user.
- List projects you belong to and filter by visibility or ownership.
- Create an issue with a JSON payload, then add comments or change state.
- Create and merge a merge request with options like auto-merge when pipeline succeeds or squash commits.
- List pipelines for a project and query jobs for a specific pipeline to inspect failures.
FAQ
A personal access token with the api scope is required for most operations.
How do I reference a project by path?
URL-encode the path (e.g., mygroup/myproject → mygroup%2Fmyproject) or use the numeric project ID.