glab-token — скилл для Claude Code: управление токенами GitLab
Скилл glab-token для Claude Code управляет токенами доступа GitLab: создаёт их, отзывает и меняет. Агент подключает его при запросах о PAT или API-токенах.
MIT 120 установок ★ 51 обновлён 2026-10-20
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-token -a claude-codeЧто делает glab-token
glab-token помогает создавать, просматривать, отзывать и ротировать токены пользователя, проекта или группы GitLab через glab token. Ротация текущего токена требует явного одобрения: старый секрет перестаёт работать сразу, а новый не сохраняется автоматически в конфигурации glab и не заменяет переменные окружения. После команды секрет нужно перенести в одобренное хранилище и обновить зависимые клиенты.
Для самостоятельной ротации GitLab должен быть версии 17.9 или новее, а токен — иметь право на этот endpoint. Перед действием скилл предлагает проверить хост, пользователя и клиентов, которые используют секрет. Потерянный или неопределённый результат нельзя исправлять слепым повтором команды: сначала нужно выяснить состояние учётных данных. Для работы нужен GitLab CLI glab.
Какие задачи решает
- создать токен пользователя, проекта или группы
- отозвать токен по имени или ID
- посмотреть список доступных токенов
- ротировать текущий токен после одобрения
Примеры запросов агенту
- Создай токен доступа для проекта с именем
deploy-bot. - Покажи токены группы и отзови токен
old-ci. - Подготовь ротацию текущего токена GitLab и объясни, какие клиенты затронет смена.
Как установить glab-token
1Через Skills CLI (Vercel)
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-token -a claude-code2Вручную: положить файлы
~/.claude/skills/glab-token/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/glab-token/
1Через Skills CLI (Vercel)
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-token -a codex2Вручную: положить файлы
.agents/skills/glab-token/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-token -a cursor2Вручную: положить файлы
.cursor/skills/glab-token/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install vince-winkintel/gitlab-cli-skills glab-token2Вручную: положить файлы
.github/skills/glab-token/SKILL.md1Через Skills CLI (Vercel)
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-token -a gemini-cli2Командой платформы
gemini skills install https://github.com/vince-winkintel/gitlab-cli-skills --path glab-tokenВручную: положить файлы
.devin/skills/glab-token/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add vince-winkintel/gitlab-cli-skills --skill glab-token -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о glab-token
Как установить glab-token в Claude Code?
Выполни npx skills add vince-winkintel/gitlab-cli-skills --skill glab-token -a claude-code. Файл скилла находится по пути ~/.claude/skills/glab-token/SKILL.md.
Что делает glab-token?
Скилл управляет токенами пользователя, проекта и группы GitLab: создаёт, показывает, отзывает и ротирует их. Ротация текущего токена требует явного одобрения.
Что нужно для работы glab-token?
Нужен GitLab CLI glab и доступ к GitLab. Самостоятельная ротация требует GitLab версии 17.9 или новее и токена с правом использовать соответствующий endpoint.
Исходный текст
SKILL.md · MIT
---
name: glab-token
description: Manage GitLab personal, project, and group access tokens, including explicitly approved self-rotation. Use when creating tokens, revoking access, or managing API authentication. Triggers on token, access token, PAT, personal access token, API token.
---
# glab token
> Capture key `685c1cbd7`: checksum-verified macOS arm64 binary, source commit `685c1cbd74c882e0c93d7011657adde811582ed7`; archive SHA-256 `e77f5756c3c8d9ffeaef0bf234533f395680ab9f128a75cec4c1bd7a1049788c`. Only fences marked `685c1cbd7` use this capture. Normalization removes trailing spaces/tabs only; indentation, blank lines, wrapping, truncation, and product spelling (including `Gitlab`) are preserved. Other fences retain their individual prior provenance.
## Rotate the current credential
`glab token rotate --self` (alias `rot`) rotates the access token currently authenticating the selected host. It requires GitLab 17.9 or later and a token allowed to use the self-rotation endpoint. Confirm the host, visible actor, credential source, and every client sharing that token before approving rotation. The old secret stops working immediately; this is an operational credential write, not an authentication test.
Do not pass a token name/ID, `--user`, or `--group` with `--self`. Without `--self`, a token name/ID is required. Repository context can select the host; outside a checkout, the default host applies. Use an explicit trusted host context rather than assuming the current token belongs to the intended instance.
`--duration` defaults to `30d` (maximum `365d`; hours must be multiples of 24), and `--expires-at YYYY-MM-DD` is mutually exclusive with it. Expiry is at midnight UTC on the selected date. Default text output is the new secret; JSON output includes it too. Arrange a secure output destination before the approved command, disable shell tracing, and keep both forms out of logs and chat. The command does not persist the new token into glab's config/keyring or replace environment variables: update the approved credential store and dependent clients yourself. If output is lost or the result is uncertain, inspect/recover the credential state rather than blindly retrying rotation.
```bash
# Credential-free discovery only
glab token rotate --help
# After approval, capture the secret directly into the approved secure store:
# glab token rotate --self --duration 30d
```
## Overview
<!-- help-capture: 685c1cbd7:49ae17d452aa -->
```text
Create, list, revoke, and rotate access tokens for your user
account, a project, or a group.
USAGE
glab token [command] [--flags]
COMMANDS
create <name> [--flags] Creates user, group, or project access tokens.
list [--flags] List user, group, or project access tokens.
revoke <token-name|token-id> [--flags] Revoke user, group, or project access tokens.
rotate [<token-name|token-id>] [--flags] Rotate user, group, or project access tokens.
FLAGS
-h --help Show help for this command.
-R --repo Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.
```
## Quick start
```bash
glab token --help
```
## Subcommands
See [references/commands.md](references/commands.md) for full `--help` output.
© vince-winkintel · MIT · vince-winkintel/gitlab-cli-skills