cicd-pipeline
БесплатноБез исполняемых скриптовНе проверенGenerate and optimize CI/CD pipelines for GitLab CI and CircleCI. Use when a user asks to set up GitLab CI, create a CircleCI pipeline, build a CI pipeline…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
CI/CD Pipeline (GitLab CI & CircleCI)
Overview
Generate production-ready CI/CD pipeline configurations for automated testing, building, and deploying applications on GitLab CI and CircleCI. This skill creates well-structured workflows with proper caching, matrix testing, environment separation, and deployment strategies. For GitHub Actions pipelines, use the github-actions skill.
Instructions
When a user asks to create or improve a CI/CD pipeline, follow these steps:
Step 1: Analyze the project
Detect the project type and requirements:
# Determine language and framework
ls package.json pyproject.toml Gemfile go.mod Cargo.toml pom.xml build.gradle 2>/dev/null
# Check for existing CI config
ls .gitlab-ci.yml .circleci/config.yml 2>/dev/null
# Detect test commands
cat package.json | grep -A5 '"scripts"' 2>/dev/null
cat Makefile 2>/dev/null | grep -E "^test|^lint|^build"
Identify:
- Language/runtime: Node.js, Python, Go, Rust, Java
- Package manager: npm, pnpm, yarn, pip, poetry
- Test framework: Jest, Pytest, Go test, etc.
- Build output: Docker image, static site, binary, package
- Deploy target: AWS, Docker registry, npm registry, SSH server
Step 2: Choose the CI/CD platform
Default to GitLab CI if the repo is on GitLab. Use CircleCI if specified or if the project already has a .circleci/ directory.
Step 3: Generate the pipeline configuration
GitLab CI: Node.js example:
# .gitlab-ci.yml
stages:
- lint
- test
- build
- deploy
variables:
NODE_VERSION: "22"
npm_config_cache: "$CI_PROJECT_DIR/.npm"
.node-job:
image: node:${NODE_VERSION}
cache:
key:
files:
- package-lock.json
paths:
- .npm/
before_script:
- npm ci
lint:
extends: .node-job
stage: lint
script:
- npm run lint
test:
extends: .node-job
stage: test
script:
- npm test -- --coverage
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
artifacts:
when: always
reports:
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
build:
extends: .node-job
stage: build
script:
- npm run build
artifacts:
paths:
- dist/
expire_in: 1 week
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Use rules: for conditions. only/except are deprecated GitLab keywords. Without a workflow:rules block, a push with an open merge request can start two pipelines (branch and MR); add workflow: rules if you see duplicates. The Cobertura file is produced by Jest's coverageReporters: ['text', 'cobertura'].
GitLab CI: Docker build and deploy:
build-image:
stage: build
image: docker:29-cli
services:
- docker:29-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
- docker build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
deploy:
stage: deploy
image: alpine:3.22
before_script:
- apk add --no-cache openssh-client
- eval "$(ssh-agent -s)"
- echo "$SSH_PRIVATE_KEY" | ssh-add -
- mkdir -p ~/.ssh && echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
script:
- ssh "$DEPLOY_USER@$DEPLOY_HOST" "docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA && IMAGE_TAG=$CI_COMMIT_SHA docker compose up -d"
environment: production
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
SSH_KNOWN_HOSTS holds the output of ssh-keyscan taken once and checked by a human; do not disable host key checking with StrictHostKeyChecking=no. The server must have logged in to the registry too, or use a deploy token.
CircleCI: Node.js example:
# .circleci/config.yml
version: 2.1
orbs:
node: circleci/node@7
jobs:
lint-and-test:
docker:
- image: cimg/node:22.23
steps:
- checkout
- node/install-packages
- run: npm run lint
- run: npm test -- --coverage --reporters=default --reporters=jest-junit
environment:
JEST_JUNIT_OUTPUT_DIR: test-results
- store_test_results:
path: test-results
- store_artifacts:
path: coverage
build:
docker:
- image: cimg/node:22.23
steps:
- checkout
- node/install-packages
- run: npm run build
- persist_to_workspace:
root: .
paths: [dist]
deploy:
docker:
- image: cimg/node:22.23
steps:
- checkout
- attach_workspace:
at: .
- run: npx vercel deploy --prod --prebuilt --token "$VERCEL_TOKEN"
workflows:
build-and-deploy:
jobs:
- lint-and-test
- build:
requires: [lint-and-test]
- deploy:
requires: [build]
filters:
branches:
only: main
jest-junit mu
Установить cicd-pipeline в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл cicd-pipeline?
Generate and optimize CI/CD pipelines for GitLab CI and CircleCI. Use when a user asks to set up GitLab CI, create a CircleCI pipeline, build a CI pipeline for GitLab, automate deployments with CircleCI, add test automation to GitLab, or configure continuous integration on non-GitHub platforms. For GitHub Actions pipelines, use the github-actions skill instead.
Как установить скилл cicd-pipeline?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cicd-pipeline запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic