dirien/yet-another-agent-harness / .claude/skills/flux-cli
flux-cli
FlaggedBootstraps Flux CD on Kubernetes clusters, creates and manages GitOps sources (Git/Helm/OCI/Bucket), configures kustomizations and Helm releases, reconciles resources, sets up image automation and alerting, and pushes OCI artifacts. Use this skill whenever the user mentions the flux CLI, flux bootstrap, flux create source, flux create kustomization, flux create helmrelease, flux reconcile, flux get, Flux CD, GitOps with Flux, or asks about managing Kubernetes deployments via GitOps. Also trigger when users ask about creating Git/Helm/OCI/Bucket sources, building or diffing kustomizations, pushing OCI artifacts, setting up image automation, creating Flux alerts/receivers, or bootstrapping Flux on GitHub/GitLab/Gitea/Bitbucket. Even if the user just says "flux" in a Kubernetes context, this skill applies.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.2 KB |
| references/artifacts-and-images.md | markdown | 6.1 KB |
| references/bootstrap.md | markdown | 5.6 KB |
| references/helmreleases.md | markdown | 4.0 KB |
| references/kustomizations.md | markdown | 5.5 KB |
| references/sources.md | markdown | 6.0 KB |
references/kustomizations.md
View on GitHub# Kustomization Commands
Kustomizations tell Flux how to deploy manifests from a source onto the cluster.
---
## flux create kustomization
```bash
flux create kustomization <name> [flags]
```
### Flags
| Flag | Default | Description |
|------|---------|-------------|
| `--source` | — | Source reference: `[<kind>/]<name>.<namespace>` (required). Kind is `GitRepository`, `OCIRepository`, or `Bucket` |
| `--path` | `./` | Path within the source to the kustomization.yaml or manifests directory |
| `--prune` | `false` | Enable garbage collection — delete objects removed from source |
| `--depends-on` | — | Dependencies that must be ready first: `<name>` or `<namespace>/<name>` (repeatable) |
| `--target-namespace` | — | Override namespace for all reconciled objects |
| `--service-account` | — | Service account for impersonation during reconciliation |
| `--decryption-provider` | — | Decryption provider: `sops` |
| `--decryption-secret` | — | Secret with OpenPGP or age keys for SOPS |
| `--health-check` | — | Workloads for health assessment: `<kind>/<name>.<namespace>` (repeatable) |
| `--health-check-timeout` | `2m` | Timeout for health checks |
| `--wait` | `false` | Enable health checking of applied resources |
| `--retry-interval` | — | Retry interval for failed reconciliation |
| `--kubeconfig-secret-ref` | — | Secret with kubeconfig for remote cluster |
| `--interval` | `1m` | Reconciliation interval |
| `--export` | — | Output YAML instead of applying |
| `--label` | — | Labels as `key=value` (repeatable) |
### Examples
```bash
# Basic deployment from a GitRepository
flux create kustomization my-app \
--source=GitRepository/my-app \
--path=./deploy/production \
--prune=true \
--interval=5m
# With SOPS decryption
flux create kustomization my-app \
--source=GitRepository/my-app \
--path=./deploy \
--prune=true \
--decryption-provider=sops \
--decryption-secret=sops-age
# With dependencies
flux create kustomization my-app \
--source=GitRepository/my-app \
--path=./deploy \
--prune=true \
--depends-on=infrastructure
# Health checks
flux create kustomization my-app \
--source=GitRepository/my-app \
--path=./deploy \
--prune=true \
--health-check="Deployment/my-app.default" \
--health-check-timeout=3m
# Target a remote cluster
flux create kustomization my-app \
--source=GitRepository/my-app \
--path=./deploy \
--kubeconfig-secret-ref=staging-kubeconfig
# Export YAML
flux create kustomization my-app \
--source=GitRepository/my-app \
--path=./deploy \
--prune=true \
--export > kustomization.yaml
```
---
## flux build kustomization
Build a Kustomization locally and output the resulting multi-doc YAML.
```bash
flux build kustomization <name> --path=<local-path> [flags]
```
### Flags
| Flag | Description |
|------|-------------|
| `--path` | Path to local manifests directory (required) |
| `--kustomization-file` | Path to a local Flux Kustomization YAML file |
| `--dry-run` | Run without cluster connection (variable substitutions from Secrets/ConfigMaps are skipped) |
| `-r, --recursive` | Recursively build nested Kustomizations |
| `--local-sources` | Map local paths to source references: `Kind/namespace/name=path` |
| `--ignore-paths` | Exclude files using .gitignore patterns |
| `--strict-substitute` | Fail if vars without defaults are missing |
### How it works
1. Fetches the specified Kustomization from the cluster (unless `--dry-run`)
2. Uses it to render the local kustomization.yaml
3. Outputs the resulting manifests to stdout
### Examples
```bash
# Basic build
flux build kustomization my-app --path=./deploy
# Dry run (no cluster needed)
flux build kustomization my-app \
--path=./deploy \
--kustomization-file=./flux/my-app.yaml \
--dry-run
# Recursive with local sources
flux build kustomization my-app \
--path=./deploy \
--recursive \
--local-sources GitRepository/flux-system/my-repo=./
# Exclude files
flux build kustomization my-app \
--path=./deploy \
--ignore-paths="/tests/**,*.test.yaml"
```
---
## flux diff kustomization
Build locally, perform a server-side dry-run, and print the diff against the cluster.
```bash
flux diff kustomization <name> --path=<local-path> [flags]
```
### Exit Codes
| Code | Meaning |
|------|---------|
| `0` | No differences |
| `1` | Differences found |
| `>1` | Error occurred |
### Flags
Same as `flux build kustomization`, plus:
| Flag | Default | Description |
|------|---------|-------------|
| `--progress-bar` | `true` | Show progress bar |
### Examples
```bash
# Basic diff
flux diff kustomization my-app --path=./deploy
# Use in CI (exit code 1 = changes detected)
if ! flux diff kustomization my-app --path=./deploy; then
echo "Changes detected, review required"
fi
# With local Kustomization file
flux diff kustomization my-app \
--path=./deploy \
--kustomization-file=./flux/my-app.yaml
# Recursive
flux diff kustomization my-app \
--path=./deploy \
--recursive \
--local-sources GitRepository/flux-system/my-repo=./
```
---
## Managing Kustomizations
```bash
# List
flux get kustomizations [-A] [-w] [--no-header]
# Filter
flux get kustomizations --status-selector ready=false
flux get kustomizations -l app=frontend
# Force reconciliation
flux reconcile kustomization <name>
# Suspend/resume
flux suspend kustomization <name>
flux suspend kustomization --all
flux resume kustomization <name>
# Export
flux export kustomization <name>
flux export kustomization --all > all-ks.yaml
# Delete
flux delete kustomization <name>
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |