Token导航 LogoToken导航

Agent Skill · 开发

gitops-knowledge(吉托普知识)

gitops-knowledge 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

gitops-knowledge 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 8,410。

总安装 3,175周安装 131GitHub Stars 119下载 1,038核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gitops-knowledge(吉托普知识)
来源仓库:https://github.com/fluxcd/agent-skills
仓库路径:skills/gitops-knowledge
安装命令:
npx skills add https://github.com/fluxcd/agent-skills --skill gitops-knowledge
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/fluxcd/agent-skills --skill gitops-knowledge

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

gitops-knowledge 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合围绕仓库状态和变更进行整理。适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境中的开发任务。

通过 npx skills add 命令从指定 GitHub 仓库安装并使用。安装前需确认权限范围、维护状态及是否触发联网或文件操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/gitops-knowledge

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/fluxcd/agent-skills --skill gitops-knowledge;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

gitops-knowledge 怎么安装?

在终端执行 npx skills add https://github.com/fluxcd/agent-skills --skill gitops-knowledge。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gitops-knowledge 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

gitops-knowledge 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

gitops-knowledge 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

gitops-knowledge 用的人多吗?

公开数据是累计安装 3,175 次,近一周安装 131 次,下载 1,038 次,GitHub 119 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

gitops-knowledge 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
gitops-knowledge

吉托普知识 · 本页

3,175119需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Flux CD Knowledge Base

You are an expert on Flux CD, the GitOps toolkit for Kubernetes. Use this knowledge base to answer questions accurately, generate correct YAML manifests, and explain Flux concepts.

Rules:

  • Always use the exact apiVersion/kind combinations from the CRD table below. Never invent API versions.
  • Before generating YAML for any CRD, read its OpenAPI schema from assets/schemas/ to verify field names, types, and enum values.
  • When a question requires detail beyond this file, load the relevant reference file from references/.
  • Prefer Flux Operator (FluxInstance) for cluster setup. Do not reference flux bootstrap or legacy gotk-* files.

What is Flux

Flux is a set of Kubernetes controllers that implement GitOps — the practice of using Git (or OCI registries) as the source of truth for declarative infrastructure and applications. Flux continuously reconciles the desired state stored in sources with the actual state of the cluster.

Flux Operator manages the Flux installation declaratively through a FluxInstance custom resource. It handles installation, configuration, upgrades, and lifecycle of all Flux controllers. Only one FluxInstance named flux can exist per cluster.

How resources relate:

Sources (Git, OCI, Helm, Bucket)
  │
  ▼ produce artifacts
Artifacts (tarballs, Helm charts, OCI layers)
  │
  ▼ consumed by
Appliers (Kustomization, HelmRelease)
  │
  ▼ create/update
Managed Resources (Deployments, Services, ConfigMaps, ...)
  │
  ▼ status reported to
Notifications (Provider + Alert → Slack, Teams, GitHub, ...)

ResourceSet orchestration flow:

ResourceSetInputProvider (GitHub PRs, OCI tags, ...)
  │
  ▼ exports inputs
ResourceSet (template + input matrix)
  │
  ▼ generates per-input
Namespaces, Sources, Kustomizations, HelmReleases, RBAC, ...

Two delivery models:

  • Git-based: Flux watches Git repositories and applies changes on commit.
  • Gitless (OCI-based): Git → CI pushes OCI artifacts → Flux pulls from registry. OCI artifacts are immutable, signed, and don't require Git credentials on clusters.

Controllers and CRDs

KindapiVersionControllerPurpose
FluxInstancefluxcd.controlplane.io/v1flux-operatorManages Flux installation lifecycle
FluxReportfluxcd.controlplane.io/v1flux-operatorRead-only observed state of Flux
ResourceSetfluxcd.controlplane.io/v1flux-operatorTemplate resources from input matrix
ResourceSetInputProviderfluxcd.controlplane.io/v1flux-operatorFetch inputs from external services
GitRepositorysource.toolkit.fluxcd.io/v1source-controllerFetch from Git repositories
OCIRepositorysource.toolkit.fluxcd.io/v1source-controllerFetch OCI artifacts from registries
HelmRepositorysource.toolkit.fluxcd.io/v1source-controllerIndex Helm chart repositories
HelmChartsource.toolkit.fluxcd.io/v1source-controllerFetch and package Helm charts
Bucketsource.toolkit.fluxcd.io/v1source-controllerFetch from S3-compatible storage
ExternalArtifactsource.toolkit.fluxcd.io/v1(external)Generic artifact storage for 3rd-party controllers
ArtifactGeneratorsource.extensions.fluxcd.io/v1beta1source-controllerCompose/decompose artifacts from multiple sources
Kustomizationkustomize.toolkit.fluxcd.io/v1kustomize-controllerBuild and apply Kustomize overlays or plain YAML
HelmReleasehelm.toolkit.fluxcd.io/v2helm-controllerInstall and manage Helm releases
Providernotification.toolkit.fluxcd.io/v1beta3notification-controllerExternal notification provider config
Alertnotification.toolkit.fluxcd.io/v1beta3notification-controllerRoute events to notification providers
Receivernotification.toolkit.fluxcd.io/v1notification-controllerWebhook receiver for incoming events
ImageRepositoryimage.toolkit.fluxcd.io/v1image-reflector-controllerScan container image registries
ImagePolicyimage.toolkit.fluxcd.io/v1image-reflector-controllerSelect image by version policy
ImageUpdateAutomationimage.toolkit.fluxcd.io/v1image-automation-controllerUpdate YAML in Git with new image tags

How Flux Works

Reconciliation Loop

Flux controllers run a continuous reconciliation loop:

  1. Sources poll for changes — source-controller checks Git repos, OCI registries, Helm repos, or S3 buckets at configured intervals and produces versioned artifacts.
  2. Appliers consume artifacts — kustomize-controller and helm-controller detect new artifact revisions, build manifests (Kustomize overlays or Helm templates), and apply them to the cluster using server-side apply.
  3. Drift detection and self-healing — Flux compares the desired state from the source with the live state in the cluster. When drift is detected, Flux corrects it automatically (if enabled).
  4. Notifications report status — notification-controller sends events to external systems (Slack, Teams, GitHub commit status, etc.) based on Alert rules.

Dependency Ordering

Use dependsOn to control reconciliation order. For example, install CRDs before CRs, or infrastructure before applications:

spec:
  dependsOn:
    - name: infra-controllers  # wait for this Kustomization to be Ready

ResourceSets support richer dependencies with readyExpr (CEL expressions) and can depend on any type of resource:

spec:
  dependsOn:
    - apiVersion: fluxcd.controlplane.io/v1
      kind: ResourceSet
      name: policies
      ready: true
      readyExpr: "status.conditions.filter(e, e.type == 'Ready').all(e, e.status == 'True')"

Reactivity with Watch Labels

By default, Flux controllers poll sources at the configured interval. To react immediately when a dependency changes, add the watch label to the upstream resource:

metadata:
  labels:
    reconcile.fluxcd.io/watch: Enabled

When a ConfigMap or Secret with this label changes, any Kustomization or HelmRelease that references it via postBuild.substituteFrom or valuesFrom will reconcile immediately.

Decision Trees

Which Source Type?

  • Git repo with Kustomize overlays or plain YAML → GitRepository
  • OCI artifact (container image with manifests) → OCIRepository
  • Helm chart from OCI registry → OCIRepository with layerSelector for Helm media type
  • Helm chart from HTTPS Helm repo → HelmRepository (default type)
  • S3/GCS/MinIO bucket → Bucket
  • Monorepo that needs splitting → ArtifactGenerator (creates ExternalArtifact per path)
  • Helm chart + env-specific values from Git → ArtifactGenerator (composes chart with values overlay)

Kustomization vs HelmRelease?

  • Plain YAML or Kustomize overlays → Kustomization
  • Helm chart → HelmRelease
  • Both can deploy to remote clusters via kubeConfig and support dependsOn.

ResourceSet vs Kustomization?

  • One set of manifests, one deployment → Kustomization
  • Same template deployed for N inputs (tenants, components, environments) → ResourceSet
  • ResourceSets generate resources from an input matrix; Kustomizations apply a fixed set of manifests.

How to Set Up GitOps from Scratch

  1. Install Flux Operator (Helm chart or Terraform)
  2. Create a FluxInstance named flux in the flux-system namespace
  3. Configure .spec.sync to point to your Git repo or OCI registry
  4. Organize manifests in the source repo using Kustomize base+overlay pattern
  5. Create Kustomization resources to apply manifests from the source
  6. Add Provider + Alert for notifications

Canonical YAML Patterns

1. GitOps Pipeline (GitRepository + Kustomization)

apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: my-app
  namespace: flux-system
spec:
  interval: 5m
  url: https://github.com/org/my-app.git
  ref:
    branch: main
  secretRef:
    name: git-credentials  # optional, for private repos
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: my-app
  namespace: flux-system
spec:
  interval: 10m
  sourceRef:
    kind: GitRepository
    name: my-app
  path: ./deploy/production
  prune: true
  wait: true
  timeout: 5m

2. Helm from HTTPS Repository

apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
  name: metrics-server
  namespace: kube-system
spec:
  interval: 1h
  url: https://kubernetes-sigs.github.io/metrics-server/
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: metrics-server
  namespace: kube-system
spec:
  interval: 30m
  chart:
    spec:
      chart: metrics-server
      version: "3.x"
      sourceRef:
        kind: HelmRepository
        name: metrics-server
  values:
    args:
      - --kubelet-insecure-tls

3. Helm from OCI Registry (Recommended)

apiVersion: source.toolkit.fluxcd.io/v1
kind: OCIRepository
metadata:
  name: cert-manager-chart
  namespace: cert-manager
spec:
  interval: 1h
  url: oci://quay.io/jetstack/charts/cert-manager
  layerSelector:
    mediaType: "application/vnd.cncf.helm.chart.content.v1.tar+gzip"
    operation: copy
  ref:
    semver: "1.x"
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: cert-manager
  namespace: cert-manager
spec:
  interval: 1h
  chartRef:
    kind: OCIRepository
    name: cert-manager-chart
  install:
    strategy:
      name: RetryOnFailure
      retryInterval: 5m
  upgrade:
    strategy:
      name: RetryOnFailure
      retryInterval: 5m
  values:
    crds:
      enabled: true

4. FluxInstance with OCI Sync (Gitless GitOps)

apiVersion: fluxcd.controlplane.io/v1
kind: FluxInstance
metadata:
  name: flux
  namespace: flux-system
spec:
  distribution:
    version: "2.x"
    registry: "ghcr.io/fluxcd"
  components:
    - source-controller
    - source-watcher
    - kustomize-controller
    - helm-controller
    - notification-controller
  cluster:
    type: kubernetes
    size: medium
    multitenant: true
    tenantDefaultServiceAccount: flux
    networkPolicy: true
  sync:
    kind: OCIRepository
    url: "oci://ghcr.io/my-org/fleet-manifests"
    ref: "latest"
    path: "clusters/production"
    pullSecret: "registry-auth"

5. ResourceSet for Multi-Component Orchestration

apiVersion: fluxcd.controlplane.io/v1
kind: ResourceSet
metadata:
  name: apps
  namespace: flux-system
  annotations:
    fluxcd.controlplane.io/reconcileEvery: "5m"
spec:
  dependsOn:
    - apiVersion: fluxcd.controlplane.io/v1
      kind: ResourceSet
      name: infra
      ready: true
  inputs:
    - tenant: "frontend"
      tag: "latest"
      environment: "production"
    - tenant: "backend"
      tag: "latest"
      environment: "production"
  resources:
    - apiVersion: v1
      kind: Namespace
      metadata:
        name: << inputs.tenant >>
        labels:
          toolkit.fluxcd.io/role: "tenant"
    - apiVersion: v1
      kind: ServiceAccount
      metadata:
        name: flux
        namespace: << inputs.tenant >>
    - apiVersion: rbac.authorization.k8s.io/v1
      kind: RoleBinding
      metadata:
        name: flux
        namespace: << inputs.tenant >>
      roleRef:
        apiGroup: rbac.authorization.k8s.io
        kind: ClusterRole
        name: admin
      subjects:
        - kind: ServiceAccount
          name: flux
          namespace: << inputs.tenant >>
    - apiVersion: source.toolkit.fluxcd.io/v1
      kind: OCIRepository
      metadata:
        name: apps
        namespace: << inputs.tenant >>
      spec:
        interval: 5m
        url: "oci://ghcr.io/my-org/apps/<< inputs.tenant >>"
        ref:
          tag: << inputs.tag >>
    - apiVersion: kustomize.toolkit.fluxcd.io/v1
      kind: Kustomization
      metadata:
        name: apps
        namespace: << inputs.tenant >>
      spec:
        targetNamespace: << inputs.tenant >>
        serviceAccountName: flux
        interval: 30m
        retryInterval: 5m
        wait: true
        timeout: 5m
        sourceRef:
          kind: OCIRepository
          name: apps
        path: "./<< inputs.environment >>"
        prune: true

6. Image Automation

Flux supports two delivery models for updating container images and Helm chart versions. Pick based on whether the team wants Git commits as the audit log for version changes:

  • Git-based — ImageRepository + ImagePolicy + ImageUpdateAutomation scan the registry and commit tag bumps back to Git via $imagepolicy YAML markers. Requires image-reflector-controller and image-automation-controller on the cluster. Load references/image-automation.md.
  • Gitless — ResourceSet + ResourceSetInputProvider (type: OCIArtifactTag) scans the registry and re-renders the ResourceSet directly, upgrading the downstream HelmRelease or Kustomization without touching Git. No bot credentials, no Git poll lag, no extra controllers. Recommended default for Flux Operator deployments. Load references/gitless-image-automation.md.

Gitless is the better fit when the tag lives in Helm values, when tags should differ per cluster in a fleet, or when the team doesn't want a bot writing to the repo. Git-based is the better fit when PR-based approval of version bumps is required or when Git must remain the canonical record of every deployed version.

7. Notifications (Slack, GitHub, Webhooks)

Provider + Alert for outgoing notifications, Receiver for incoming webhooks. Alert and Provider use v1beta3, Receiver uses v1.

For Slack, GitHub commit status, webhook receivers, and all provider types, load references/notifications.md.

Common Mistakes

Wrong template delimiters:

  • ResourceSet uses << inputs.field >> — NOT {{.inputs.field}} or {{inputs.field}}
  • Go templates {{}} are only used in ImageUpdateAutomation .spec.git.commit.messageTemplate

Mutual exclusivity:

  • HelmRelease: spec.chart.spec and spec.chartRef are mutually exclusive
  • FluxInstance: only one per cluster, must be named flux

HelmRelease strategy fields:

  • Install/upgrade strategy is at spec.install.strategy.name and spec.upgrade.strategy.name
  • Always use RetryOnFailure — it retries without rollback or uninstall, avoiding downtime
  • Do not use RemediateOnFailure or spec.install.remediation / spec.upgrade.remediation

OCIRepository for Helm charts:

  • When using OCIRepository to fetch Helm charts from OCI registries, set layerSelector to extract the chart: layerSelector: mediaType: "application/vnd.cncf.helm.chart.content.v1.tar+gzip" operation: copy

Reference Index

Load reference files and OpenAPI schemas based on the question topic. Load at most 1-2 reference files per question. Read schemas for field-level validation when generating YAML.

CRDReferenceSchema
FluxInstancereferences/flux-operator.mdassets/schemas/fluxinstance-fluxcd-v1.json
FluxReportreferences/flux-operator.mdassets/schemas/fluxreport-fluxcd-v1.json
ResourceSetreferences/resourcesets.mdassets/schemas/resourceset-fluxcd-v1.json
ResourceSetInputProviderreferences/resourcesets.mdassets/schemas/resourcesetinputprovider-fluxcd-v1.json
GitRepositoryreferences/sources.mdassets/schemas/gitrepository-source-v1.json
OCIRepositoryreferences/sources.mdassets/schemas/ocirepository-source-v1.json
HelmRepositoryreferences/sources.mdassets/schemas/helmrepository-source-v1.json
HelmChartreferences/sources.mdassets/schemas/helmchart-source-v1.json
Bucketreferences/sources.mdassets/schemas/bucket-source-v1.json
ExternalArtifactreferences/sources.mdassets/schemas/externalartifact-source-v1.json
ArtifactGeneratorreferences/sources.mdassets/schemas/artifactgenerator-source-v1beta1.json
Kustomizationreferences/kustomization.mdassets/schemas/kustomization-kustomize-v1.json
HelmReleasereferences/helmrelease.mdassets/schemas/helmrelease-helm-v2.json
Providerreferences/notifications.mdassets/schemas/provider-notification-v1beta3.json
Alertreferences/notifications.mdassets/schemas/alert-notification-v1beta3.json
Receiverreferences/notifications.mdassets/schemas/receiver-notification-v1.json
ImageRepositoryreferences/image-automation.mdassets/schemas/imagerepository-image-v1.json
ImagePolicyreferences/image-automation.mdassets/schemas/imagepolicy-image-v1.json
ImageUpdateAutomationreferences/image-automation.mdassets/schemas/imageupdateautomation-image-v1.json
TopicReference
Repository structure, monorepo vs multi-repo, OCI-based fleet managementreferences/repo-patterns.md
Best practices, dependency management, remediation, versioningreferences/best-practices.md
Web UI, dashboard, SSO, OIDC, Dex, Keycloak, Entra ID, RBACreferences/web-ui.md
MCP Server, AI assistant integration, in-cluster deploymentreferences/mcp-server.md
Terraform bootstrap of Flux Operatorreferences/terraform-bootstrap.md
Gitless image automation (ResourceSet + OCIArtifactTag)references/gitless-image-automation.md

平台分布

Codex

36.44%
按下载量换算378

Claude

30.85%
按下载量换算320

Cursor

20.72%
按下载量换算215

Gemini CLI

8.43%
按下载量换算88

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills