agentsclimarketplace

Ci cd pipeline

Skill SID-SURANGE/cursor-team-ops/skills/community/ci-cd-pipeline

Enforcement & release-hygiene layer for Cursor agents β€” blocking git/DB/license guardrails, commit hygiene, and docs-ops.

Install
npx -y skills add SID-SURANGE/cursor-team-ops --skill ci-cd-pipeline

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 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.

What its author says it does

Copied from the file, not written here

Set up or fix a CI/CD pipeline with quality gates β€” lint, type check, tests, build, security audit, and deployment. Triggered by "set up CI", "fix the pipeline", "add GitHub Actions", "ci-cd-pipeline", "automate deployment", "set up quality gates".

SKILL.md

7.5 KB, as published. Nobody here has run it

🚦 Skill: ci-cd-pipeline

Purpose

CI/CD is the enforcement mechanism for every other team standard β€” it catches what humans and agents miss, consistently, on every change. Setting it up once protects the entire team permanently. This skill establishes a quality gate pipeline, feeds failures back into the development loop, and documents deployment strategy.

Trigger phrases

  • "set up CI"
  • "add GitHub Actions"
  • "fix the pipeline"
  • "ci-cd-pipeline"
  • "automate deployment"
  • "set up quality gates"
  • "why is CI failing"
  • "add a quality gate"

The quality gate pipeline

Every change passes these gates before merge β€” in order, no skipping:

PR opened
    β”‚
    β–Ό
 Lint  β†’  Type check  β†’  Unit tests  β†’  Build  β†’  Security audit
    β”‚
    β–Ό (all pass)
 Integration tests  β†’  E2E (if applicable)
    β”‚
    β–Ό (all pass)
 Ready for review  β†’  Merge  β†’  Deploy to staging  β†’  Deploy to production

Shift left: a bug caught in lint costs minutes; the same bug caught in production costs hours. Move checks as early as possible.


Steps

1. Read the project first

Before writing any pipeline config:

  • Identify the package manager (npm, pnpm, yarn, pip, cargo, etc.)
  • Find the test command, lint command, build command from package.json / Makefile / pyproject.toml
  • Check if a CI config already exists (.github/workflows/, .gitlab-ci.yml, Jenkinsfile)
  • If one exists, read it fully before modifying

2. Create the CI workflow

GitHub Actions β€” Node.js (adapt language as needed)

# .github/workflows/ci.yml
name: CI

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
          cache: 'npm'
      - run: npm ci
      - run: npm run lint

  typecheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
          cache: 'npm'
      - run: npm ci
      - run: npx tsc --noEmit

  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
          cache: 'npm'
      - run: npm ci
      - run: npm test -- --coverage

  build:
    runs-on: ubuntu-latest
    needs: [lint, typecheck, test]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
          cache: 'npm'
      - run: npm ci
      - run: npm run build

  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
          cache: 'npm'
      - run: npm ci
      - run: npm audit --audit-level=high

3. Configure branch protection

After the workflow is live, enforce it via branch protection rules:

Settings β†’ Branches β†’ main β†’ Branch protection rule:
  βœ… Require status checks to pass before merging
       Add: lint, typecheck, test, build, security
  βœ… Require branches to be up to date before merging
  βœ… Do not allow force pushes
  βœ… Require at least 1 approving review

4. Feeding CI failures back to the agent

When CI fails, copy the full failure output and pass it back:

"The CI pipeline failed with this error:
[paste full error output β€” do not truncate]
Fix the issue and verify locally before pushing."
Failure typeWhat the agent should do
Lint errorRun npm run lint --fix, review unfixable errors, commit
Type errorRead the error location, fix the type, do not use any
Test failureFollow systematic-debugging skill
Build errorCheck config, dependencies, and env vars
Audit findingnpm audit fix; for manual fixes, read the advisory first

5. Deployment strategy

Choose based on project risk:

Low-risk (internal tools, early stage):

merge to main β†’ auto-deploy to production β†’ monitor for 15 min

Standard (most projects):

merge to main β†’ auto-deploy to staging β†’ manual promotion to production

High-risk (regulated, high traffic):

merge to main β†’ staging β†’ canary (5% traffic) β†’ full production

Rollback workflow:

# .github/workflows/rollback.yml
name: Rollback
on:
  workflow_dispatch:
    inputs:
      version:
        description: 'Version/SHA to roll back to'
        required: true
jobs:
  rollback:
    runs-on: ubuntu-latest
    steps:
      - name: Rollback
        run: echo "Deploy version ${{ inputs.version }} here"
        # Replace with your actual deployment command

6. Environment and secrets hygiene

.env.example     β†’ committed (template, no real values)
.env             β†’ NOT committed (local dev only, in .gitignore)
.env.test        β†’ committed (test config, no real secrets)
CI secrets       β†’ stored in GitHub Secrets (Settings β†’ Secrets)
Production       β†’ stored in deployment platform vault

Never share secrets between CI and production. Use separate values.


Pipeline optimisation (when CI exceeds 10 min)

Apply in this order:

FixImpact
Cache dependencies (actions/cache or setup-node cache)High
Run lint, typecheck, test in parallel jobsHigh
Use path filters β€” skip E2E for docs-only PRsMedium
Shard test suite across matrix runnersMedium
Move slow tests to a nightly scheduleLow

Common rationalisations and rebuttals

RationalisationReality
"CI is too slow to run on every PR"Optimise the pipeline β€” don't remove the gate. A 5-min pipeline prevents hours of debugging.
"This change is trivial, CI will pass"Trivial changes cause broken builds. The pipeline is fast for trivial changes.
"The test is flaky, just re-run it"Flaky tests mask real bugs. Fix the flakiness β€” don't re-run and hope.
"We'll add CI after launch"Projects without CI accumulate broken states that get harder to fix under pressure. Set it up on day one.
"I disabled the failing check temporarily"Temporarily disabled checks become permanently ignored. Fix the check or fix the code.

Output

A working .github/workflows/ci.yml (or equivalent for your CI platform) with all quality gates active, plus branch protection settings documented. Deployment strategy documented in AGENTS.md or docs/deployment.md.

Guardrails

  • Never disable a failing check to make CI green β€” fix the code or fix the check.
  • Never store secrets in workflow files β€” use the secrets manager.
  • Never set up CI for only one branch and call it done β€” protect main with branch rules too.
  • If the project already has CI, read it fully before modifying β€” don't add duplicate jobs.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.