agentleFS
AnthonyPoschenAnthonyPoschen/agent-skills/skills/flux-kustomize-layout/SKILL.md

flux-kustomize-layout

Skill2 starsChanged 3 months agoMITView on GitHub

Set up or review FluxCD and Kustomize repository layouts. Use when the user asks for a FluxCD repo layout, Kubernetes GitOps structure, kustomization scaffold, base/overlay setup, or dev/prod environment overlays.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create predictable FluxCD-friendly Kustomize layouts with one shared base and explicit dev/prod overlays.

    line 13
  2. Distinctive:

    Always scaffold this structure unless the user explicitly asks otherwise:

    line 19
  3. Very specific:

    Put shared Kubernetes manifests in kustomization/base/.

    line 34
  4. Distinctive:

    Put environment-specific patches, generators, images, labels, or namespace settings in the matching overlay folder.

    line 37
  5. Distinctive:

    Keep base manifests environment-neutral unless the user asks for a different environment model.

    line 39
  6. Very specific:

    Use lowercase file names with clear resource names, such as deployment.yaml, service.yaml, configmap.yaml, and ingress.yaml.

    line 43
  7. Distinctive:

    Do not put application manifests directly in overlay folders when they should be shared through base.

    line 45
  8. Very specific:

    Create missing directories and kustomization.yaml files in the required layout.

    line 72
  9. Distinctive:

    Add all shared manifests to the base resources list.

    line 75
  10. Very specific:

    Add ../../base to each overlay resources list.

    line 76
  11. Distinctive:

    Put dev/prod differences in overlays as patches or Kustomize fields.

    line 77
  12. Very specific:

    If Flux Kustomization custom resources are requested, keep them separate from Kustomize kustomization.yaml files and name the distinction …

    line 78

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

Flux Kustomize Layout

Goal

Create predictable FluxCD-friendly Kustomize layouts with one shared base and explicit dev/prod overlays. Keep the repository structure boring, discoverable, and easy for CI or Flux reconciliation to validate.

Required Layout

Always scaffold this structure unless the user explicitly asks otherwise:

kustomization/
  base/
    kustomization.yaml
  overlays/
    dev/
      kustomization.yaml
    prod/
      kustomization.yaml

Rules

  • Put shared Kubernetes manifests in kustomization/base/.
  • Include every base manifest from kustomization/base/kustomization.yaml.
  • Make dev and prod overlays include ../../base.
  • Put environment-specific patches, generators, images, labels, or namespace settings in the matching overlay folder.
  • Keep base manifests environment-neutral unless the user asks for a different environment model.
  • Prefer apiVersion: kustomize.config.k8s.io/v1beta1 and kind: Kustomization for Kustomize files.
  • Use lowercase file names with clear resource names, such as deployment.yaml, service.yaml, configmap.yaml, and ingress.yaml.
  • Do not put application manifests directly in overlay folders when they should be shared through base.

Minimal Files

Base kustomization.yaml:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - deployment.yaml
  - service.yaml

Overlay kustomization.yaml:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - ../../base

Workflow

  1. Inspect existing Kubernetes, Kustomize, or Flux files before editing.
  2. Create missing directories and kustomization.yaml files in the required layout.
  3. Move shared manifests into kustomization/base/ when safe.
  4. Add all shared manifests to the base resources list.
  5. Add ../../base to each overlay resources list.
  6. Put dev/prod differences in overlays as patches or Kustomize fields.
  7. If Flux Kustomization custom resources are requested, keep them separate from Kustomize kustomization.yaml files and name the distinction clearly.
  8. Validate with kustomize build or kubectl kustomize when available; otherwise report that validation was not run.

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.