AI for Flux: pair the ConfigHub plugin with Flux in your GitOps repo
Flux reconciles your clusters. ConfigHub keeps the config intent, what each folder deploys, why a value changed, how staging and production differ, and a human approval gate before live changes ship. All copy-ready files live in examples/gitops-ai/flux/ (HelmRelease and Kustomize repos work read-only on day one; Kustomize repos can add gated OCI delivery).
Quick start
You need: a Flux GitOps repository, Git, and Claude Code or Codex CLI (zero upstream changes to flux, zero hub or cluster access required on day one).
| By hand | Ask your agent | |
|---|---|---|
| Wire the repo | Copy .claude/settings.json, AGENTS.md, and flux-with-confighub from examples/gitops-ai/flux/ (step 1) | "Add the Flux + ConfigHub repo setup files from examples/gitops-ai/flux without touching cluster manifests." |
| Map & diff envs | /confighub:inventory and flux get kustomizations,helmreleases -A (step 3) | "Map what this Flux repo deploys, compare staging vs. production, and check live Flux reconciliation status." |
| Explain a change | /confighub:why ORDER_LIMIT (step 4) | "Why is ORDER_LIMIT set to 250 in staging instead of 100?" |
| Undo repo setup | Delete .claude/settings.json, .claude/skills/flux-with-confighub/, AGENTS.md, and .mcp.json (step 5) | "Remove the ConfigHub AI setup files from this repo and leave all Flux manifests untouched." |
Without ConfigHub: an AI agent with Flux CLI or MCP sees live reconciliation status but has no record of why values changed across sessions or which folders differ before committing to Git.
Deeper dive
The rest of this page shows the exact repo files (.claude/settings.json, optional .mcp.json for flux-operator-mcp, AGENTS.md, and flux-with-confighub), the five human steps, agent rules, and verification checks.
Show the full walkthrough
Human
What you need
A Flux GitOps repository (HelmRelease or Kustomize), Git, and Claude Code or Codex CLI. Optional: flux CLI or flux-operator-mcp for live reconciliation status.
Steps
- Copy the starter files from
examples/gitops-ai/flux/into your Flux repository (works for every teammate who clones it; Claude prompts once to trustconfighub@confighubwithout editing~/.claude/behind their back).mkdir -p .claude/skills/flux-with-confighub cp examples/gitops-ai/flux/.claude/settings.json .claude/settings.json cp examples/gitops-ai/flux/AGENTS.md AGENTS.md cp examples/gitops-ai/flux/skills/flux-with-confighub/SKILL.md .claude/skills/flux-with-confighub/SKILL.md - Optionally add
.mcp.jsonto pair ConfigHub with Flux's MCP server (flux-operator-mcp). Skip this step if you prefer read-onlyfluxCLI commands.cp examples/gitops-ai/flux/.mcp.json .mcp.json - Run read-only inventory before changing anything (zero hub and zero cluster credentials needed) to map every
Kustomization,HelmRelease, and cross-environment value diff../plugins/confighub/bin/confighub mini inventory --dir . - Edit a non-production staging value in Claude Code and verify
/confighub:why(ormini changes --why) keeps the reason across sessions; pair withflux get kustomizations,helmreleases -Afor live cluster status../plugins/confighub/bin/confighub mini changes --why ORDER_LIMIT --dir . - To add human-approved production delivery for Kustomize apps, step up to the Kustomize + Flux OCI walkthrough (uses
starters/kustomize-flux.yaml). To undo this repo setup at any time, remove only the AI files.rm -rf .claude/settings.json .claude/skills/flux-with-confighub AGENTS.md .mcp.json
Undo it
Delete .claude/settings.json, .claude/skills/flux-with-confighub/, AGENTS.md, and .mcp.json. Your Flux manifests, flux-system, and clusters stay untouched.
Agent
When working inside a Flux repository with AGENTS.md and flux-with-confighub:
- Use Flux CLI / Flux MCP for live cluster reconciliation,
KustomizationandHelmReleasehealth, and cluster events. - Use ConfigHub (
/confighub:inventory,/confighub:why,cub mini upload --change-desc) for repo mapping, cross-environment diffs, change history, and Kustomize production proposals. - Never run
cub mini approve,cub mini deploy-from-hub, orkubectl applyagainst a production cluster yourself. Always hand the exact printedcub mini approve BASE/ORDERcommand to the person.
Testing
Wire this Flux GitOps repository with the ConfigHub plugin declaration, AGENTS.md, and flux-with-confighub skill without modifying any Flux manifests.
Add the optional Flux MCP pairing (.mcp.json) and explain how staging and production differ using read-only inventory.
Remove the optional Flux MCP file while keeping the ConfigHub repo setup intact.
Point me to the step-up walkthrough for human-approved Kustomize OCI delivery on a shared hub without changing my Flux manifests.
Remove the ConfigHub AI setup files cleanly from this repository and leave all Flux manifests untouched.
This proves: a Flux GitOps repository can adopt ConfigHub's plugin, AGENTS.md, and flux-with-confighub skill with zero upstream changes to flux, giving HelmRelease and Kustomize teams immediate read-only inventory and change history while keeping Flux MCP/CLI strictly complementary.