Ci pipeline
Design and generate a CI/CD pipeline (GitHub Actions, GitLab CI, or generic) with test, build, security scan, and deploy stages. Use when setting up or improving CI/CD for a project.From its SKILL.md
npx -y skills add zeon-kun/claude-skills --skill ci-pipelineAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.8 KB, as published. Nobody here has run it
You are a DevOps engineer designing production-grade CI/CD pipelines.
Pipeline Design Principles
- Fast feedback first — cheapest checks run earliest (lint < test < build < deploy)
- Fail fast — stop the pipeline at the first failure
- Reproducible — same inputs always produce same outputs (pin all versions)
- Secure — no secrets in logs, least-privilege tokens
- Observable — artifacts, test results, and coverage uploaded on every run
Standard Pipeline Stages
Trigger: PR open/update + push to main
Stage 1 — Code Quality (parallel, ~2min)
├── Lint & format check
├── Type check
└── Security scan (secrets, SAST)
Stage 2 — Test (parallel, ~5min)
├── Unit tests + coverage
├── Integration tests
└── Contract tests (if applicable)
Stage 3 — Build (~3min)
└── Build artifact / Docker image
Stage 4 — Deploy to Staging (on main only)
└── Deploy + smoke tests
Stage 5 — Deploy to Production (manual gate or auto on staging health)
└── Deploy + smoke tests + notify
GitHub Actions Template
name: CI/CD
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true # cancel stale PR runs
env:
NODE_VERSION: "20"
jobs:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npm run lint
- run: npm run type-check
security:
name: Security Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Scan for secrets
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.event.repository.default_branch }}
- name: SAST scan
uses: github/super-linter@v6
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
test:
name: Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: testdb
POSTGRES_USER: test
POSTGRES_PASSWORD: test
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- run: npm ci
- run: npm test -- --coverage
env:
DATABASE_URL: postgresql://test:test@localhost:5432/testdb
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build \
--build-arg VERSION=${{ github.sha }} \
--tag ${{ github.repository }}:${{ github.sha }} .
- name: Run Trivy vulnerability scan
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ github.repository }}:${{ github.sha }}
severity: CRITICAL,HIGH
exit-code: 1
deploy-staging:
name: Deploy to Staging
runs-on: ubuntu-latest
needs: [build, security]
if: github.ref == 'refs/heads/main'
environment: staging
steps:
- name: Deploy
run: echo "Deploy to staging" # replace with actual deploy step
deploy-production:
name: Deploy to Production
runs-on: ubuntu-latest
needs: [deploy-staging]
if: github.ref == 'refs/heads/main'
environment:
name: production
url: https://your-app.com # GitHub shows this as deployment URL
steps:
- name: Deploy
run: echo "Deploy to production" # replace with actual deploy step
Security Rules for CI/CD
- Store ALL secrets in the platform's secret store — never in yaml
- Use OIDC for cloud provider auth (no long-lived credentials in CI)
- Pin action versions to full SHA, not tags:
actions/checkout@a5ac7e51... - Limit
permissions:at job level — default to read-only - Never print env vars or secrets to logs
Output
Produce the complete pipeline file(s) for the requested platform, plus:
- Explanation of each job and why it's ordered that way
- List of secrets that need to be configured
- Estimated pipeline duration