agentleFS
jamal-gmljamal-gml/anthropica/skills/ship-ci-cd/SKILL.md

ship-ci-cd

Skill0 starsChanged 13 days agoMITView on GitHub

Design CI/CD pipelines on any platform (stages, build once and promote, environment gates, rolling/blue-green/canary/flags, expand-contract migrations, rollback vs roll-forward, monorepos, speed, OIDC). Use when planning or reviewing a pipeline or deploy process, choosing a deployment strategy, or ordering migrations with deploys. Not for workflow YAML (use `ship-github-actions`).

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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. Very specific:

    Monorepos: run only affected projects (path filters or build-graph tools), but keep one always-reporting status for required checks.

    line 44
  2. Very specific:

    Read references/deployment-strategies.md when configuring canary steps, analysis thresholds, blue-green cutover or flag rollout.

    line 64
  3. Distinctive:

    Ask before: changing pipelines that deploy to production, triggering any deploy, editing environment protection, secrets, variables or …

    line 67
  4. Distinctive:

    Never remove or weaken a gate, required check or approval to unblock a release.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

CI/CD Pipeline Design

Design a pipeline that gives fast feedback, deploys one verified artifact through gated environments, and can always go back.

Procedure

  1. Inventory: CI config files (.github/workflows, .gitlab-ci.yml, Jenkinsfile, azure-pipelines.yml, .circleci/, buildspec.yml), branch model, environments, deploy targets, artifact registries, who approves production.
  2. Map current flow as stages with inputs/outputs: trigger -> build -> test -> scan -> package -> publish -> deploy(env) -> verify. Note where artifacts are rebuilt, where secrets enter, and manual steps.
  3. Measure: median and p90 duration per stage, failure and flake rate, lead time commit -> production, deploy frequency, change failure rate, time to restore (DORA). Use the platform's run history.
  4. Design the target using the Rules below. Choose a deployment strategy (table) and migration ordering per service.
  5. Plan gates per environment (table). Decide rollback mechanism before the first deploy.
  6. Implement incrementally behind the existing pipeline: add stages, run in parallel, switch over, then delete old paths. Platform specifics: ship-github-actions, build-iac, build-containers.
  7. Verify with a dry run to a non-production environment and a rehearsed rollback.

Stage order

StageContentsTarget timeFails fast on
Validateformat, lint, type check, config/IaC validate, commit/PR title lint< 2 minstyle, syntax
Buildcompile, bundle, container image; record digest/checksum< 5 minbuild errors
Testunit (parallel), then integration with real deps in containers< 10 minregressions
ScanSAST, dependency audit, secret scan, image scan, IaC policy, licenceparallel with Testknown vulns above threshold
Package and publishpush immutable artifact once; SBOM and provenance (secure-supply-chain)< 3 minregistry/auth
Deploy non-prodsame artifact to dev/staging; run migrations per plan-deploy errors
Verifysmoke tests, e2e on critical paths, synthetic checks< 10 minbroken flows
Promote to prodgate, deploy with strategy, automated health analysis-SLO breach -> rollback

Total PR feedback target: under 10-15 minutes. Deploy pipeline commit -> production: under an hour excluding approval waits.

Rules

  • Build once, promote the same artifact. Identify it by digest or checksum, never by a mutable tag. Rebuilding per environment invalidates testing. Environment differences come from runtime config/secrets, not build flags.
  • Config separate from artifact: per-environment config in a config store or deploy manifests; secrets from a secret manager at runtime.
  • Secrets: OIDC/workload identity from CI to cloud, short-lived; no long-lived keys in CI variables. Scope prod credentials to the prod deploy job/environment only. Never print them.
  • Pipeline as code, reviewed like application code; reusable templates for shared stages.
  • Gates are automated by default; manual approval only for production (or regulated changes), by someone other than the author.
  • Main is always deployable: trunk-based or short-lived branches, unfinished work behind feature flags.
  • Every deploy is recorded (version, SHA, environment, who, when) and every production deploy has a tested rollback path.
  • Migrations decouple from code deploys via expand/contract; never ship a destructive schema change in the same release as the code that stops using it. Read references/database-migrations.md for any schema change.
  • Rollback vs roll-forward: roll back (redeploy previous artifact, flip flag, shift traffic) when users are impacted and the previous version is compatible with current data. Roll forward only when the fix is small, tested and faster than rollback, or rollback is unsafe (data already migrated irreversibly).
  • Deploy freezes and change windows come from the team's policy; encode them as gates, not memory.
  • Monorepos: run only affected projects (path filters or build-graph tools), but keep one always-reporting status for required checks. Read references/pipeline-speed.md for monorepos and slow pipelines.
  • Flaky tests are bugs: quarantine with an owner and deadline, never auto-retry silently forever.

Environment gates

EnvironmentTriggerGate to enterExit evidence
Preview/ephemeralPRCI greenreviewer sign-off
Dev/integrationmerge to mainCI greensmoke pass
Staging/pre-prodauto after dev, or release candidatesmoke on dev, migrations appliede2e + perf baseline pass
Productiontag or manual promote of a staged versionapproval, readiness (ship-readiness), no freeze, error budget availablehealth analysis pass for bake time

Deployment strategy

StrategyUse whenNeedsRollback
Rollingstateless services, backward-compatible change, low riskhealth checks, maxUnavailable/maxSurgeroll back deployment (minutes)
Blue-greenneed instant switch and full pre-prod verification on prod infra2x capacity, traffic switch (LB/DNS), shared-DB compatibilityswitch back (seconds)
Canaryhigh traffic, risky change, good metricstraffic splitting, automated analysis on error/latency SLIsshift traffic to 0%
Feature flagdecouple deploy from release, gradual exposure by user/segment, kill switchflag service, flag cleanup disciplineflip flag (seconds)
Recreatedev/test, or app cannot run two versions at oncedowntime windowredeploy previous

Read references/deployment-strategies.md when configuring canary steps, analysis thresholds, blue-green cutover or flag rollout.

Safety gates

  • Ask before: changing pipelines that deploy to production, triggering any deploy, editing environment protection, secrets, variables or approvers, running migrations against shared environments.
  • Never remove or weaken a gate, required check or approval to unblock a release; escalate instead.
  • Production deploys require the user's explicit approval after stating version, SHA, environment and rollback plan.

Output

Current: <stages, durations, gaps, rebuilds, manual steps>
Target pipeline: <stage list with tools and parallelism>
Artifact: <type, identifier (digest/checksum), registry>
Environments and gates: <table>
Deployment strategy: <per service, with reason>
Migrations: <expand/contract plan or "none">
Rollback: <mechanism, time to restore, last rehearsed>
Secrets: <names only, delivery method (OIDC/secret store)>
Metrics to track: <lead time, deploy freq, change failure rate, MTTR, CI p90>
Changes required: <ordered list, each reversible>

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.