# Gitlab Api

> GitLab REST API — проекты, MR, issues, pipelines, файлы репозитория

- **Type:** Skill
- **Install:** `agentstack add skill-frontier-ai-next-mgarlbot-gitlab-api`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [frontier-ai-next](https://agentstack.voostack.com/s/frontier-ai-next)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [frontier-ai-next](https://github.com/frontier-ai-next)
- **Source:** https://github.com/frontier-ai-next/mgarlbot/tree/main/skills/gitlab_api

## Install

```sh
agentstack add skill-frontier-ai-next-mgarlbot-gitlab-api
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## GitLab REST API (`gitlab_api` tool)

Токен и URL GitLab уже в настройках бота (`GITLAB_API_TOKEN`, `GITLAB_API_URL`). **Не** передавай токен в аргументах и **не** выводи его в ответ.

### Когда использовать

- «покажи MR / issues / pipeline в проекте X»
- «создай issue / merge request»
- «прочитай `.gitlab-ci.yml` из репо»
- «найди проекты / поиск по GitLab»

Для **редактирования `.gitlab-ci.yml` локально** — скилл `gitlab_pages_ci` + `shell`.
Для **чтения/создания через API** — только `gitlab_api`.

### `project_id`

Числовой ID **или** path: `group/subgroup/project` (как в URL GitLab).

### Типовые вызовы

**Список проектов (где я member):**
```json
{"action": "list_projects", "params": {"membership": true, "simple": true, "per_page": 20}}
```

**Проект по path:**
```json
{"action": "get_project", "project_id": "frontierai/teams/mag/dmas/gmas"}
```

**Merge requests (открытые):**
```json
{"action": "list_merge_requests", "project_id": "group/project", "params": {"state": "opened", "per_page": 10}}
```

**Создать MR:**
```json
{
  "action": "create_merge_request",
  "project_id": "group/project",
  "params": {
    "source_branch": "feature/foo",
    "target_branch": "main",
    "title": "feat: foo",
    "description": "…"
  }
}
```

**Issues / pipeline / файл:**
```json
{"action": "list_issues", "project_id": "group/project", "params": {"state": "opened"}}
{"action": "list_pipelines", "project_id": "group/project", "params": {"ref": "main", "per_page": 5}}
{"action": "get_file", "project_id": "group/project", "params": {"file_path": "README.md", "ref": "main"}}
{"action": "list_tree", "project_id": "group/project", "params": {"path": "", "ref": "main", "per_page": 50}}
```

**Поиск:**
```json
{"action": "search", "params": {"scope": "projects", "search": "mgarlbot"}}
```

**Расширенный запрос** (если нужного action нет):
```json
{
  "action": "api_request",
  "params": {
    "method": "GET",
    "path": "/projects/123/members",
    "query": {"per_page": 20}
  }
}
```

### Правила

- Сначала `list_projects` / `get_project`, если не уверен в `project_id`.
- Не создавай MR/issue без явного запроса пользователя.
- После create — кратко: URL, IID, статус.
- Ошибка 401 → попроси проверить токен в ⚙ Настройки → GitLab.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [frontier-ai-next](https://github.com/frontier-ai-next)
- **Source:** [frontier-ai-next/mgarlbot](https://github.com/frontier-ai-next/mgarlbot)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-frontier-ai-next-mgarlbot-gitlab-api
- Seller: https://agentstack.voostack.com/s/frontier-ai-next
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
