agentleFS
juandelossantosjuandelossantos/another-agent-skills/skills/ci-cd-and-automation/SKILL.md

ci-cd-and-automation

Skill1 starsChanged 11 days agoMITView on GitHub

Automate CI/CD pipeline setup, quality gates, and deployment. Use when configuring test runners or build pipelines. Do NOT use for one-time manual deployments.

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 62 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every pipeline follows a stage structure.

    line 47
  2. Distinctive:

    Never hardcode secrets in pipeline configuration.

    line 90
  3. Distinctive:

    Every deployment must have a rollback plan defined before execution:

    line 104
  4. Distinctive:

    No rollback plan — a deploy without a rollback is a gamble.

    line 117

“Common” is measured: kept by at least 6 in 10 of the 62 edited versions of this file we could read. “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

CI/CD and Automation

Automated quality gates on every change.

Focused on CI/CD pipeline setup and automation. For the complete end-to-end shipping lifecycle (deploy, monitor, rollback, launch checklist), use fullstack-shipping.

Sources: Google SRE Workbook (sre.google/workbook) — release engineering principles, CI/CD as virtuous cycle, canarying and environment promotion. GitHub Actions documentation (docs.github.com/en/actions) — workflow design, job dependencies, environment protection rules. Google SRE — Testing for Reliability (sre.google/resources) — CI/CD for bug prevention.

Relationship

ci-cd-and-automation (this skill — pipeline automation) fullstack-shipping (end-to-end: deploy + monitoring + rollback + launch)

When to Use

  • Setting up or modifying CI/CD pipelines
  • Configuring automated quality gates
  • Automating build and deployment processes
  • Adding test runners to CI

Output Contract

ArtifactFormatLocationQuality Criteria
CI/CD pipeline configurationYAML/JSON pipeline definition files (CI provider-agnostic).github/workflows/ or equivalentAll stages defined (lint, test, build, deploy, staging, production), quality gates blocking on failure, deployment strategy chosen (blue-green/canary/rolling/recreate) with documented risk level, secrets managed through provider's secure store (never in code), rollback plan defined with detect/decide/execute/verify steps, manual approval gate for production stage, no secrets in version control, pipeline triggers scoped per environment

When NOT to Use

  • Full deployment strategy with monitoring and rollback (use fullstack-shipping)
  • Pre-deployment launch checklist

Pipeline Design

Every pipeline follows a stage structure. Each stage gates progression to the next:

Source → Lint → Test → Build → Deploy (staging) → Smoke → Deploy (production)

Key design rules:

  • Stages run in dependency order (test waits for build)
  • Parallel where possible (lint + test can run concurrently)
  • Each stage has a clear pass/fail condition
  • Failed stages block downstream stages
  • Manual approval gates for production deployment

See guides/PIPELINE-TEMPLATES.md for stage configuration patterns.

Quality Gates

Quality gates are the conditions that must pass before a stage succeeds. Every change goes through these gates before reaching production:

GateWhat It ChecksBlocking?
LintCode style, formatting, anti-patternsYes
Unit testsIndividual function correctnessYes
Integration testsService interaction correctnessYes
BuildCompilation succeedsYes
Security scanVulnerabilities, secrets exposureYes
Performance checkBenchmarks within thresholdWarning

Gates are not suggestions. If a gate fails, the pipeline stops. See guides/QUALITY-GATES.md for configuration patterns.

Deployment Strategies

StrategyHow It WorksBest For
Blue-greenTwo identical environments, switch trafficZero-downtime deploys
CanaryGradual traffic shift (1% → 10% → 100%)Risk reduction
RollingReplace instances one by oneStateless services
RecreateShut down old, start newSimplicity

Choose based on your risk tolerance and infrastructure. Blue-green is safest. Recreate is simplest.

Secret Management

Never hardcode secrets in pipeline configuration. Use your CI provider's secret store:

  • GitHub Actions: repository secrets, environment secrets
  • GitLab CI: CI/CD variables, masked variables
  • Any provider: external secret store (Vault, AWS Secrets Manager)

Rules:

  • Secrets are injected at runtime, never stored in code
  • Masked in logs (automatic in most CI providers)
  • Rotated on a schedule or after compromise
  • Scoped to the environment that needs them

Rollback

Every deployment must have a rollback plan defined before execution:

  1. Detect — monitoring alerts on error rate or latency
  2. Decide — if p95 latency > 500ms for 2 minutes, roll back
  3. Execute — revert to previous version (automated, under 5 minutes)
  4. Verify — confirm rollback succeeded and metrics recovered

The rollback should be tested, not assumed. Run a rollback drill before the first production deploy.

Anti-Patterns

  1. Skip tests in CI — "I'll test later" means never.
  2. Manual deployment to production — every deploy should go through the pipeline.
  3. No rollback plan — a deploy without a rollback is a gamble.
  4. Secrets in code — committing credentials because "it's a private repo."
  5. Pipeline as an afterthought — adding CI after the project is shipped.
  6. Ignoring failed gates — merging despite CI failures.

Verification

  • Pipeline defined with all required stages (lint, test, build, deploy)
  • Quality gates configured and blocking
  • Deployment strategy chosen and documented
  • Secrets managed through CI provider's secure store
  • Rollback plan defined and tested
  • No secrets in version control

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.

Reviews can't be read right now.

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.