Skip to main content
skill CX Codex

circleci — Claude Code skill: what it does, how to install

Generates and tunes CircleCI pipelines in .circleci/config.yml. Useful for automating builds, tests, caching, and deployments across environments.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill circleci -a claude-code
Open on GitHub

What circleci does

This skill creates CircleCI version 2.1 pipeline configurations inside .circleci/config.yml. It defines Docker, Linux machine, and macOS executors tailored to project requirements. Guidance covers build steps, container creation through setup_remote_docker, and integrations with orbs such as AWS CLI, Kubernetes, and Slack.

Pipeline performance rules are built into the examples. The skill details multi-key caching using package-lock.json checksums, workspace sharing between jobs, and parallel test execution with circleci tests split. Workflows can be structured with branch filters, cron schedules, or manual hold steps requiring approval.

A repository-linked CircleCI account and an active project in the CircleCI dashboard are necessary before any pipeline can execute.

What it helps with

  • create a .circleci/config.yml pipeline from scratch
  • configure dependency caching with checksum fallbacks
  • split test suites across parallel runners by timing
  • insert manual approval gates into deployment workflows
  • integrate orbs for AWS, Docker, or Kubernetes

Example prompts for the agent

  • Write a .circleci/config.yml for a Node.js app with npm caching and build workspaces
  • Configure a CircleCI workflow with 4 parallel test runners using timing data
  • Add a manual approval step before deploying to production in CircleCI

How to install circleci

1Skills CLI (Vercel)

npx skills add BagelHole/DevOps-Security-Agent-Skills --skill circleci -a claude-code

2Manually: put the files in place

~/.claude/skills/circleci/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/circleci/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about circleci

How to install circleci in Claude Code?

Run npx skills add BagelHole/DevOps-Security-Agent-Skills --skill circleci -a claude-code.

What does the circleci skill do?

It generates CircleCI 2.1 configuration files, setting up executors, dependency caching, parallel test splitting, and workflow steps.

What prerequisites are required for CircleCI pipelines?

You need a CircleCI account connected to the repository, an activated project in the dashboard, and a working understanding of YAML.

Source text

SKILL.md · MIT
---
name: circleci
description: Configure CircleCI workflows and orbs for continuous integration and deployment. Create config.yml pipelines, use orbs for reusable configurations, and optimize build performance. Use when working with CircleCI for CI/CD automation.
license: MIT
metadata:
  author: devops-skills
  version: "1.0"
---

# CircleCI

Build, test, and deploy applications using CircleCI's cloud-native CI/CD platform.

## When to Use This Skill

Use this skill when:
- Setting up CI/CD pipelines with CircleCI
- Using orbs for reusable configuration
- Optimizing build times with caching and parallelism
- Configuring CircleCI workflows and approvals
- Managing CircleCI contexts and secrets

## Prerequisites

- CircleCI account connected to repository
- Project enabled in CircleCI dashboard
- Basic YAML understanding

## Configuration File

Create `.circleci/config.yml`:

```yaml
version: 2.1

orbs:
  node: circleci/[email protected]
  docker: circleci/[email protected]

executors:
  default:
    docker:
      - image: cimg/node:20.10
    working_directory: ~/project

jobs:
  build:
    executor: default
    steps:
      - checkout
      - node/install-packages:
          pkg-manager: npm
      - run:
          name: Build application
          command: npm run build
      - persist_to_workspace:
          root: .
          paths:
            - dist

  test:
    executor: default
    steps:
      - checkout
      - node/install-packages:
          pkg-manager: npm
      - run:
          name: Run tests
          command: npm test

  deploy:
    executor: default
    steps:
      - checkout
      - attach_workspace:
          at: .
      - run:
          name: Deploy
          command: ./deploy.sh

workflows:
  build-test-deploy:
    jobs:
      - build
      - test:
          requires:
            - build
      - deploy:
          requires:
            - test
          filters:
            branches:
              only: main
```

## Executors

### Docker Executor

```yaml
executors:
  node:
    docker:
      - image: cimg/node:20.10
      - image: cimg/postgres:15.0
        environment:
          POSTGRES_USER: test
          POSTGRES_DB: testdb
    working_directory: ~/app
```

### Machine Executor

```yaml
executors:
  linux-machine:
    machine:
      image: ubuntu-2204:current
    resource_class: large
```

### macOS Executor

```yaml
executors:
  macos:
    macos:
      xcode: "15.0.0"
    resource_class: macos.m1.medium.gen1
```

## Caching

### Dependency Caching

```yaml
jobs:
  build:
    steps:
      - checkout
      - restore_cache:
          keys:
            - v1-deps-{{ checksum "package-lock.json" }}
            - v1-deps-
      - run: npm ci
      - save_cache:
          key: v1-deps-{{ checksum "package-lock.json" }}
          paths:
            - node_modules
```

### Multi-Key Caching

```yaml
- restore_cache:
    keys:
      - v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
      - v1-{{ .Branch }}-
      - v1-main-
      - v1-
```

## Workspaces

### Persist Data

```yaml
jobs:
  build:
    steps:
      - checkout
      - run: npm run build
      - persist_to_workspace:
          root: .
          paths:
            - dist
            - node_modules

  deploy:
    steps:
      - attach_workspace:
          at: ~/project
      - run: ./deploy.sh
```

## Parallelism

### Test Splitting

```yaml
jobs:
  test:
    parallelism: 4
    steps:
      - checkout
      - run:
          name: Run tests
          command: |
            TESTFILES=$(circleci tests glob "test/**/*.test.js" | circleci tests split --split-by=timings)
            npm test -- $TESTFILES
      - store_test_results:
          path: test-results
```

## Workflows

### Sequential Jobs

```yaml
workflows:
  pipeline:
    jobs:
      - build
      - test:
          requires:
            - build
      - deploy:
          requires:
            - test
```

### Parallel Jobs

```yaml
workflows:
  pipeline:
    jobs:
      - build
      - test-unit:
          requires:
            - build
      - test-integration:
          requires:
            - build
      - deploy:
          requires:
            - test-unit
            - test-integration
```

### Manual Approval

```yaml
workflows:
  deploy-prod:
    jobs:
      - build
      - test
      - hold:
          type: approval
          requires:
            - test
      - deploy-production:
          requires:
            - hold
```

### Scheduled Workflows

```yaml
workflows:
  nightly:
    triggers:
      - schedule:
          cron: "0 2 * * *"
          filters:
            branches:
              only:
                - main
    jobs:
      - build
      - test
```

### Branch Filtering

```yaml
workflows:
  build-deploy:
    jobs:
      - build:
          filters:
            branches:
              only:
                - main
                - /feature-.*/
      - deploy:
          filters:
            branches:
              only: main
            tags:
              only: /^v.*/
```

## Orbs

### Using Orbs

```yaml
version: 2.1

orbs:
  aws-cli: circleci/[email protected]
  kubernetes: circleci/[email protected]

jobs:
  deploy:
    executor: aws-cli/default
    steps:
      - aws-cli/setup:
          aws_access_key_id: AWS_ACCESS_KEY_ID
          aws_secret_access_key: AWS_SECRET_ACCESS_KEY
      - kubernetes/install-kubectl
      - run: kubectl apply -f k8s/
```

### Common Orbs

```yaml
orbs:
  node: circleci/[email protected]              # Node.js
  docker: circleci/[email protected]          # Docker builds
  aws-cli: circleci/[email protected]        # AWS CLI
  aws-ecr: circleci/[email protected]        # ECR push
  aws-ecs: circleci/[email protected]        # ECS deploy
  gcp-cli: circleci/[email protected]        # GCP CLI
  kubernetes: circleci/[email protected]  # K8s deploy
  slack: circleci/[email protected]           # Notifications
```

## Docker Builds

```yaml
version: 2.1

orbs:
  docker: circleci/[email protected]

jobs:
  build-and-push:
    executor: docker/docker
    steps:
      - setup_remote_docker:
          version: 20.10.24
      - checkout
      - docker/check
      - docker/build:
          image: myorg/myapp
          tag: $CIRCLE_SHA1
      - docker/push:
          image: myorg/myapp
          tag: $CIRCLE_SHA1
```

## Environment Variables

### Project Variables

Set in CircleCI Project Settings > Environment Variables

### Contexts

```yaml
workflows:
  deploy:
    jobs:
      - deploy-staging:
          context: staging-secrets
      - deploy-production:
          context: production-secrets
```

### Using Variables

```yaml
jobs:
  deploy:
    steps:
      - run:
          name: Deploy
          command: |
            aws s3 sync dist/ s3://$S3_BUCKET
          environment:
            AWS_DEFAULT_REGION: us-east-1
```

## Artifacts and Test Results

```yaml
jobs:
  test:
    steps:
      - run:
          name: Run tests
          command: npm test -- --coverage
      - store_test_results:
          path: test-results
      - store_artifacts:
          path: coverage
          destination: coverage-report
```

## Resource Classes

```yaml
jobs:
  build:
    docker:
      - image: cimg/node:20.10
    resource_class: large  # 4 vCPU, 8GB RAM
    steps:
      - checkout
      - run: npm run build

# Available classes:
# small: 1 vCPU, 2GB RAM
# medium: 2 vCPU, 4GB RAM (default)
# large: 4 vCPU, 8GB RAM
# xlarge: 8 vCPU, 16GB RAM
```

## Common Issues

### Issue: Cache Not Restoring
**Problem**: Cache misses on every build
**Solution**: Verify cache key format, ensure checksum file hasn't changed

### Issue: Workspace Attach Fails
**Problem**: Cannot find persisted workspace
**Solution**: Ensure persist_to_workspace job completed, check paths

### Issue: Docker Layer Caching
**Problem**: Docker builds are slow
**Solution**: Enable Docker Layer Caching in project settings (paid feature)

## Best Practices

- Use orbs for common tasks
- Implement aggressive caching strategies
- Use workspaces for sharing data between jobs
- Split tests with parallelism for faster builds
- Use contexts for environment-specific secrets
- Define reusable executors
- Store test results for insights

## Related Skills

- [github-actions](../github-actions/) - GitHub CI/CD
- [docker-management](../../containers/docker-management/) - Container builds
- [aws-ecs-fargate](../../../infrastructure/cloud-aws/aws-ecs-fargate/) - ECS deployments

© devops-skills · MIT · BagelHole/DevOps-Security-Agent-Skills

Similar skills

Everything for DevOps and infrastructure →

From the same set127

ai-pipeline-orchestration A skill that helps the agent build pipelines for data ingestion, model training, batch inference and RAG indexing on Prefect, Airflow or Dagster. CX Codex +1 325installs rag-infrastructure A skill for building RAG infrastructure: document ingestion, embeddings, vector stores, hybrid search and grounded LLM answers. CX Codex +1 325installs cdn-setup Configures CloudFront and Cloudflare CDNs for static asset delivery, caching rules, and cache invalidation. Useful when deploying web apps and edge routing. CX Codex +1 324installs azure-devops A skill that lets your agent write and fix Azure DevOps YAML pipelines: build, test, deploy to Azure. Useful when CI/CD lives in Azure Pipelines. CX Codex +1 325installs gcp-audit-logs A skill that walks you through Cloud Audit Logs in GCP: turning on data access logs, exporting them to BigQuery, and querying suspicious events. CX Codex +1 324installs platform-engineering A skill for building an internal developer platform: Backstage portal, Crossplane self-service infrastructure and golden paths. Useful when teams drown in manual environment setup. CX Codex +1 322installs aws-lambda Build and deploy AWS Lambda serverless functions, attach triggers, configure layers, and manage canary releases through the AWS CLI. CX Codex +1 321installs ebpf-observability Guides the agent in configuring kernel-level tracing and network flows. Useful for deep debugging and security monitoring with Cilium and Tetragon without code changes. CX Codex +1 320installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor