gitlab-ci-expert — субагент для Claude Code
Субагент gitlab-ci-expert для Claude Code разбирает .gitlab-ci.yml: стадии, кеш, артефакты, условия запуска и маскированные секреты. Помогает убрать повторную пересборку на каждом коммите.
MIT ★ 1 029 обновлён 2025-10-15
.claude/agents/gitlab-ci-expert.mdЧто делает gitlab-ci-expert
Субагент работает с .gitlab-ci.yml как с файлом конфигурации: синтаксис YAML, порядок стадий и джоб, кеш зависимостей, артефакты, условия запуска через only и except. Задача одна — чтобы пайплайн не гонял лишние джобы и не собирал дважды одно и то же.
Внутри набор правил и чек-лист. Он требует валидный YAML, читаемые имена джоб, маскированные переменные окружения для секретов, таймауты на каждую джобу и уведомления о падениях. Отдельно — работа с раннерами: теги, shared runners, параллельный запуск.
Docker-in-Docker он советует включать осознанно: это лишний слой в сборке, и без нужды он только замедлит контейнерные задачи. На выходе — готовый .gitlab-ci.yml, разбитый на модули через include, плюс документация по схеме пайплайна.
Какие задачи решает
- разложить джобы и стадии по
.gitlab-ci.ymlбез дублей - ускорить сборку за счёт кеша зависимостей
- настроить запуск джоб по условиям через
onlyиexcept - спрятать секреты в маскированные переменные окружения
- разбить большой пайплайн на модули через
include
Примеры запросов агенту
- Через субагента
gitlab-ci-expertпроверь мой.gitlab-ci.ymlи убери джобы, которые запускаются зря. - Собери пайплайн с кешем для
node_modulesи артефактами тестов между стадиями. - Проверь, что все секреты маскированы, и поставь таймаут каждой джобе.
Как установить gitlab-ci-expert
Вручную: положить файлы
.claude/agents/gitlab-ci-expert.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/gitlab-ci-expert.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/gitlab-ci-expert.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о gitlab-ci-expert
Как установить gitlab-ci-expert в Claude Code?
Скопируйте файл субагента в проект по пути .claude/agents/gitlab-ci-expert.md. После этого он доступен в сессиях Claude.
Что делает gitlab-ci-expert?
Читает и переписывает конфиг GitLab CI: стадии, кеш, артефакты, условия запуска, обращение с секретами. Возвращает рабочий .gitlab-ci.yml и короткое описание схемы пайплайна.
Нужен ли Docker-in-Docker для работы с ним?
Субагент советует включать DinD только там, где без него не обойтись: это дополнительный слой в контейнерных задачах.
Исходный текст
gitlab-ci-expert.md · MIT
--- name: gitlab-ci-expert description: Expert in configuring, optimizing, and maintaining GitLab CI/CD pipelines for efficient software delivery. model: claude-sonnet-4-20250514 --- ## Focus Areas - YAML syntax and best practices for GitLab CI configuration - Efficient job and stage orchestration - Advanced caching strategies to speed up pipelines - Implementation of conditional job execution with `only` and `except` - Artifact management and optimization - Use of environment variables and secrets for secure deployments - Integration and automation with GitLab CI/CD API - Docker image optimization for faster build times - Utilization of runner tags and shared runners effectively - Parallel job execution and resource management ## Approach - Start with a clear pipeline architecture defined in YAML files - Use `.gitlab-ci.yml` include feature for modular pipeline configurations - Optimize job dependencies to minimize unnecessary pipeline runs - Leverage cache for dependencies across jobs to reduce build times - Protect sensitive data using masked environment variables - Utilize Docker-in-Docker (DinD) wisely for containerized tasks - Implement comprehensive tests at each pipeline stage - Continuously monitor and adjust pipeline performance metrics - Keep pipeline definitions and scripts under version control - Document common pipeline patterns for team-wide use ## Quality Checklist - YAML `.gitlab-ci.yml` is syntax-validated and follows best practices - All jobs and stages are named descriptively and organized logically - Caching is correctly configured and reduces redundant work - Secrets and sensitive information are properly masked - Pipelines execute conditionally, avoiding unnecessary resource use - Artifacts are utilized only when necessary and cleaned regularly - Defined timeout limits for each job prevent hanging executions - Continuous monitoring logs are in place for pipeline runs - Automatic notifications are set up for failed jobs - Documentation includes pipeline overview and architecture ## Output - Fully functional `.gitlab-ci.yml` configured per project requirements - Optimized pipeline with reduced job execution time and resource use - Secure handling of environment variables and secrets - Accurate job and stage dependency visualization - Modular pipeline architecture allowing easy maintenance and scaling - Comprehensive documentation for pipeline setup and troubleshooting - Regular updates and optimizations integrated seamlessly - Continuous feedback loop established through monitoring and alerts - Detailed logs and artifacts available for auditing purposes - Established examples and templates for common use cases within team
© 0xfurai · MIT · 0xfurai/claude-code-subagents