ci-cd-and-automation
What it does
This system automates the setup of processes that check your code. It ensures only quality code reaches the final product by testing everything first.
When to use it
- βWhen starting a new project and setting up its checks.
- βWhen you want to add or change automatic tests.
- βTo configure how the code will be released for use.
Skill link
https://github.com/addyosmani/agent-skills/blob/main/skills/ci-cd-and-automation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βSet up an automated testing pipeline for my project.β
5 new skills a week. 1 minute to read.
How it works
It works by defining a series of checks (like code, functionality, and security tests) that the code must pass before being considered ready. If something fails, the system alerts you to fix it.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
CI/CD and Automation
Overview
Automate quality gates so that no change reaches production without passing tests, lint, type checking, and build. CI/CD is the enforcement mechanism for every other skill β it catches what humans and agents miss, and it does so consistently on every single change.
Shift Left: Catch problems as early in the pipeline as possible. A bug caught in linting costs minutes; the same bug caught in production costs hours. Move checks upstream β static analysis before tests, tests before staging, staging before production.
Faster is Safer: Smaller batches and more frequent releases reduce risk, not increase it. A deployment with 3 changes is easier to debug than one with 30. Frequent releases build confidence in the release process itself.
When to Use
- Setting up a new project's CI pipeline
- Adding or modifying automated checks
- Configuring deployment pipelines
- When a change should trigger automated verification
- Debugging CI failures
The Quality Gate Pipeline
Every change goes through these gates before merge:
Pull Request Opened
β
βΌ
βββββββββββββββββββ
β LINT CHECK β eslint, prettier
β β pass β
β TYPE CHECK β tsc --noEmit
β β pass β
β UNIT TESTS β jest/vitest
β β pass β
β BUILD β npm run build
β β pass β
β INTEGRATION β API/DB tests
β β pass β
β E2E (optional) β Playwright/Cypress
β β pass β
β SECURITY AUDIT β npm audit
β β pass β
β BUNDLE SIZE β bundlesize check
βββββββββββββββββββ
β
βΌ
Ready for review
No gate can be skipped. If lint fails, fix lint β don't disable the rule. If a test fails, fix the code β don't skip the test.
GitHub Actions Configuration
Basic CI Pipeline
# .github/workflows/ci.yml
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type check
run: npx tsc --noEmit
- name: Test
run: npm test -- --coverage
- name: Build
run: npm run build
- name: Security audit
run: npm audit --audit-level=high
With Database Integration Tests
integration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: testdb
POSTGRES_USER: ci_user
POSTGRES_PASSWORD: ${{ secrets.CI_DB_PASSWORD }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- name: Run migrations
run: npx prisma migrate deploy
env:
DATABASE_URL: postgresql://ci_user:${{ secrets.CI_DB_PASSWORD }}@localhost:5432/testdb
- name: Integration tests
run: npm run test:integration
env:
DATABASE_URL: postgresql://ci_user:${{ secrets.CI_DB_PASSWORD }}@localhost:5432/testdb
Note: Even for CI-only test databases, use GitHub Secrets for credentials rather than hardcoding values. This builds good habits and prevents accidental reuse of test credentials in other contexts.
E2E Tests
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps chromium
- name: Build
run: npm run build
- name: Run E2E tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
path: playwright-report/
Feeding CI Failures Back to Agents
The power of CI with AI agents is the feedback loop. When CI fails:
CI fails
β
βΌ
Copy the failure output
β
βΌ
Feed it to the agent:
"The CI pipeline failed with this error:
[paste specific error]
β¦
FAQ
What are 'quality gates'?
They are quality barriers. Each 'gate' is a check that the code must pass to move forward, such as code or functionality tests.
Why is 'faster safer'?
Releasing small changes frequently is safer. It's easier to find and fix a problem in a small update than in a large one, reducing risks.
What is 'Shift Left'?
It means finding problems as early as possible in the process. Fixing an error early costs less time and effort than fixing it when the product is already finished or in use.
Details
Original description by the author
Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.
repo: addyosmani/agent-skills
Popularity
- GitHub stars
- 107k
- Ranking position
- #763
- License
- MIT
- Updated
- 10/13/2026
Comments
- β¦
More skills from this repository
api-and-interface-design
107kHelps create well-defined APIs and interfaces. It's useful when designing how different parts of software will communicate.
browser-testing-with-devtools
107kHelps your agent test code directly in real browsers. It's useful for checking how something works in the environment where it will be used, finding errors and performance issues.
code-review-and-quality
107kPerforms detailed code reviews on multiple fronts. It's useful before merging new changes to ensure quality and prevent future problems.
code-simplification
107kSimplifies code to make it easier to understand and maintain. It's useful when code works but is too complex, helping to improve clarity.
Similar skills
knowledge-automation
394kHelps your agent set up a recurring job that brings new content into your Knowledge vault on a schedule, then checks that the job runs.
knowledge-source-ingest
394kHelps your agent keep a Knowledge vault current with new items from chat channels, feeds, or mailboxes, without re-adding what it already has.
benchmark
280kHelps your agent measure code speed and performance. It's useful for ensuring things are fast and finding slowness issues.