agentleFS
G1JoshiG1Joshi/Agent-Skills/skills/devops/circleci/SKILL.md

circleci

Skill15 starsChanged 42 days agoMITView on GitHub

Expert CircleCI assistance covering config.yml, orbs, docker executors, workflows, caching, and parallelism. Use when automating continuous integration and deployment pipelines on CircleCI.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use CircleCI cache keys:

    line 142
  2. Very specific:

    Use cimg/* official convenience images optimized for caching and performance.

    line 175
  3. Very specific:

    Use resource classes larger than needed (xlarge).

    line 181

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CircleCI

CircleCI is a continuous integration and delivery platform emphasizing pipeline parallelism, reusable configuration Orbs, and deterministic build environments.

When to Use

  • High-Velocity Cloud CI/CD Pipelines: Automating builds, tests, and deployments with Docker, Machine, and macOS executors.
  • Reusable Pipeline Architecture with Orbs: Sharing validated workflows using certified CircleCI Orbs (AWS, Slack, Docker).
  • Test Splitting & Parallelism: Accelerating slow test suites across dozens of concurrent execution containers.
  • Complex Multi-Stage Workflows: Approval gates, scheduled nightlies, and matrix build pipelines.

Quick Start

# .circleci/config.yml
version: 2.1
orbs:
  node: circleci/node@5.1
jobs:
  build:
    executor: node/default
    steps:
      - checkout
      - node/install-packages:
          pkg-manager: npm
      - run: npm run test

workflows:
  build-and-test:
    jobs:
      - build

Core Concepts

Multi-Job Workflow with Caching & Docker Executor

Fast build and test pipeline with dependency caching:

version: 2.1

orbs:
  node: circleci/node@6.0.0
  slack: circleci/slack@4.13.0

executors:
  app-executor:
    docker:
      - image: cimg/node:22.0.0
    resource_class: medium

jobs:
  build-and-test:
    executor: app-executor
    steps:
      - checkout
      - restore_cache:
          keys:
            - v1-deps-{{ checksum "package-lock.json" }}
            - v1-deps-
      - run:
          name: Install Dependencies
          command: npm ci
      - save_cache:
          key: v1-deps-{{ checksum "package-lock.json" }}
          paths:
            - ~/.npm
      - run:
          name: Execute Static Analysis & Tests
          command: |
            npm run lint
            npm test -- --coverage
      - store_test_results:
          path: junit.xml
      - store_artifacts:
          path: coverage

workflows:
  build-test-deploy:
    jobs:
      - build-and-test
      - hold-for-approval:
          type: approval
          requires:
            - build-and-test
          filters:
            branches:
              only: main

Test Splitting by Timing for Concurrent Runners

Distributing tests across parallel containers based on historical execution duration:

jobs:
  parallel-tests:
    parallelism: 4 # Run across 4 parallel containers
    docker:
      - image: cimg/python:3.12
    steps:
      - checkout
      - run:
          name: Run Split Tests
          command: |
            TEST_FILES=$(circleci tests glob "tests/**/*.py" | circleci tests split --split-by=timings)
            pytest $TEST_FILES --junitxml=test-results/junit.xml
      - store_test_results:
          path: test-results

OIDC Authentication with Cloud Providers

Authenticating to AWS/GCP without permanent secrets:

jobs:
  deploy-aws:
    docker:
      - image: cimg/aws:2026.01
    steps:
      - run:
          name: Assume AWS Role via OIDC
          command: |
            # CircleCI OpenID Connect token exchange
            echo "Authenticating via $CIRCLE_OIDC_TOKEN"

Common Patterns

Caching Dependencies and Docker Layer Caching

Problem: Installing npm/cargo dependencies from scratch on every commit inflates CI build duration.

Solution: Use CircleCI cache keys:

version: 2.1

jobs:
  build_and_test:
    docker:
      - image: cimg/node:20.10
    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:
            - ~/.npm
      - run: npm test

workflows:
  build:
    jobs:
      - build_and_test

Best Practices

Do:

  • Leverage CircleCI test splitting (circleci tests split --split-by=timings) to minimize CI pipeline wall-clock time.
  • Use cimg/* official convenience images optimized for caching and performance.
  • Authenticate to cloud platforms (AWS, GCP, Azure) via OIDC tokens instead of static credentials.
  • Store test results with store_test_results to view flaky test analytics and trends.

Don't:

  • Use resource classes larger than needed (xlarge); right-size containers to optimize credits.
  • Store unencrypted credentials in repository config files; use Project Environment Variables or Contexts.
  • Re-run entire workflows on minor test failures; use 'Rerun failed tests' functionality.

Troubleshooting

ErrorCauseSolution
CircleCI config error: Schema validation failedYAML syntax error or invalid orb/step parameter in .circleci/config.yml.Validate locally with circleci config validate.
Job exceeded memory limit and was killedBuild task exceeded RAM limit of selected resource class.Upgrade resource class: resource_class: medium+ or large.
Cannot find environment variableContext or project environment variable not linked to job.Link context under workflows.jobs.context in config.yml.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.