agentleFS
yalishevantyalishevant/kotlin-backend-agent-skills/.agents/skills/ci-cd-containerization-advisor/SKILL.md

ci-cd-containerization-advisor

Skill15 starsChanged 9 months agoMITView on GitHub

Design reproducible build, image, and deployment pipelines for Kotlin plus Spring applications, including CI verification, layered containers, rollout safety, and deployment-time migration coordination. Use when creating or improving Dockerfiles, CI workflows, image hardening, Kubernetes manifests, release gates, or deployment strategies for Spring Boot services, especially where build reproducibility and operational safety matter.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    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:

    Treat CI, container images, and rollout strategy as one delivery system, not disconnected YAML and Dockerfile fragments.

    line 13
  2. Distinctive:

    Keep CI stages explicit:

    line 26
  3. Distinctive:

    Prefer multi-stage builds or buildpacks that produce minimal, reproducible runtime images.

    line 38
  4. Distinctive:

    Keep image layers stable so dependency and application changes cache efficiently.

    line 44
  5. Distinctive:

    Use rolling, canary, or blue-green strategies based on blast radius and compatibility constraints.

    line 52
  6. Distinctive:

    Prefer configuration injection that is explicit and auditable.

    line 53
  7. Distinctive:

    Read-only root filesystems, writable temp directories, and filesystem permissions are runtime design choices, not just hardening checkboxes.

    line 70
  8. Distinctive:

    Prefer one clean deployment path over several partially maintained ones.

    line 79
  9. Distinctive:

    Prefer one debug-friendly escape hatch in operations even if production images are hardened and minimal.

    line 81
  10. Distinctive:

    Treat supply-chain metadata as something operators may depend on later for incident response, not only for compliance.

    line 82
  11. Distinctive:

    If the service needs graceful drain or long request handling, prove shutdown behavior under rollout in tests or staging, not only by …

    line 83
  12. Distinctive:

    If zero-downtime matters, force deployment and migration strategy to prove backward compatibility, not just assume it.

    line 84
  13. Distinctive:

    Do not use floating production image tags.

    line 100
  14. Distinctive:

    Do not run as root without a strong reason.

    line 101
  15. Distinctive:

    Do not assume the same Docker or CPU environment locally and in CI unless proven.

    line 102
  16. Distinctive:

    Do not couple schema migration execution to app boot casually.

    line 103
  17. Distinctive:

    Do not optimize image size at the expense of runtime correctness or operability.

    line 104

≈ “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 Containerization Advisor

Source mapping: Tier 3 specialized skill derived from Kotlin_Spring_Developer_Pipeline.md (SK-23).

Mission

Turn a codebase into a repeatable artifact and a safe deployment process. Treat CI, container images, and rollout strategy as one delivery system, not disconnected YAML and Dockerfile fragments.

Read First

  • Build files, wrapper config, and artifact packaging approach.
  • Current CI workflow definitions and caching strategy.
  • Dockerfiles or buildpack usage.
  • Deployment manifests, Helm charts, or platform-specific deployment descriptors.
  • Runtime assumptions: JDK version, JVM options, health probes, config injection, migration process.

Build Pipeline Rules

  • Make the wrapper and toolchain the source of truth for build reproducibility.
  • Keep CI stages explicit:
    • dependency resolution
    • compile
    • tests
    • packaging
    • security or policy checks
    • publish
  • Cache deliberately, but never in a way that hides reproducibility issues.
  • Publish immutable versioned artifacts; avoid "mystery latest" promotion paths.

Container Rules

  • Prefer multi-stage builds or buildpacks that produce minimal, reproducible runtime images.
  • Run as non-root.
  • Pin base image families deliberately and know their tradeoffs:
    • glibc vs musl
    • distroless vs debug-friendly
    • JRE vs full JDK
  • Keep image layers stable so dependency and application changes cache efficiently.
  • Separate build-time secrets from runtime secrets.
  • Align container memory and CPU assumptions with JVM container-awareness and runtime limits.

Deployment Rules

  • Define readiness, liveness, and startup probes that reflect real application behavior.
  • Coordinate schema migrations with rollout order deliberately.
  • Use rolling, canary, or blue-green strategies based on blast radius and compatibility constraints.
  • Prefer configuration injection that is explicit and auditable.
  • Record image version, git revision, and effective configuration linkage in the deployed artifact or metadata.

Advanced Delivery Traps

  • Alpine or musl-based images can break native dependencies, DNS behavior, or performance assumptions. Smaller is not always safer.
  • A fast CI cache can hide missing lockfiles, flaky dependency resolution, or undeclared build inputs.
  • Running migrations inside app startup may work locally and deadlock rollout safety in production.
  • Layered jars help build speed, but only if the Dockerfile or buildpack order preserves dependency-cache reuse.
  • Distroless images improve hardening but reduce debugging options. Know the operator tradeoff.
  • Health probes that are too eager can create crash loops during cold startup or migration windows.
  • Resource requests and limits interact with JVM heap sizing, GC, and startup time. Container configuration is part of application performance.
  • Supply-chain controls such as SBOM, vulnerability scanning, signature, and provenance are part of delivery quality for serious systems.

Runtime Delivery Nuances

  • PID 1 signal handling, graceful shutdown, and preStop hooks determine whether rolling deploys drain traffic cleanly or drop requests.
  • Read-only root filesystems, writable temp directories, and filesystem permissions are runtime design choices, not just hardening checkboxes.
  • Digest-pinned base images improve reproducibility but require deliberate patching strategy to avoid silent drift or stale images.
  • Hermetic or near-hermetic builds reduce "works only in CI" surprises by making network, timestamp, and undeclared tool dependencies visible.
  • Remote build cache can be a speed win or a correctness trap depending on how well task inputs are modeled.
  • Preview or ephemeral environments can catch config and migration issues early, but only if they use realistic secrets, networking, and backing services.

Expert Heuristics

  • Make local, CI, and production use the same major JDK and Gradle assumptions whenever possible.
  • Prefer one clean deployment path over several partially maintained ones.
  • Design deployment gates around rollback confidence and blast radius, not only around green unit tests.
  • Prefer one debug-friendly escape hatch in operations even if production images are hardened and minimal.
  • Treat supply-chain metadata as something operators may depend on later for incident response, not only for compliance.
  • If the service needs graceful drain or long request handling, prove shutdown behavior under rollout in tests or staging, not only by configuration reading.
  • If zero-downtime matters, force deployment and migration strategy to prove backward compatibility, not just assume it.
  • Design the pipeline so that a failed deploy is cheap to stop and cheap to roll back.

Output Contract

Return these sections:

  • Artifact strategy: how the service is built and packaged.
  • CI plan: stages, caches, gates, and artifact publication.
  • Container plan: image build strategy, hardening, and runtime assumptions.
  • Deployment plan: probe design, rollout strategy, config injection, and migration coordination.
  • Operational risks: what could go wrong during build or deploy.
  • Verification: the checks that prove the pipeline is reproducible and the rollout is safe.

Guardrails

  • Do not use floating production image tags.
  • Do not run as root without a strong reason.
  • Do not assume the same Docker or CPU environment locally and in CI unless proven.
  • Do not couple schema migration execution to app boot casually.
  • Do not optimize image size at the expense of runtime correctness or operability.

Quality Bar

A good run of this skill gives the team a build and deployment path that is repeatable, observable, and rollback-aware. A bad run outputs a fashionable Dockerfile and CI YAML that still leave runtime drift and deployment risk unresolved.

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.