بنقرة واحدة
lint
Analyze GitOps repo structure for ordering issues, broken references, missing dependencies, and anti-patterns
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Analyze GitOps repo structure for ordering issues, broken references, missing dependencies, and anti-patterns
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | lint |
| description | Analyze GitOps repo structure for ordering issues, broken references, missing dependencies, and anti-patterns |
| argument-hint | [namespace or app] - Optional scope, defaults to full scan |
MISSION: Scan the repository for structural issues, broken references, missing Flux dependencies, and anti-patterns.
SCOPE: $ARGUMENTS
If no arguments provided, scan all of kubernetes/apps/.
Every file listed in kustomization.yaml must exist:
# Find resources listed but missing
for f in kubernetes/apps/**/**/kustomization.yaml; do
dir=$(dirname $f)
yq '.resources[]' $f | while read r; do
[ ! -f "$dir/$r" ] && echo "MISSING: $dir/$r (referenced in $f)"
done
done
Every YAML file must start with # yaml-language-server: $schema=...:
find kubernetes/ -name "*.yaml" | xargs grep -rL "yaml-language-server" | grep -v kustomization
Check for violations of repo conventions:
| Anti-pattern | Check |
|---|---|
kind: Ingress | Should use HTTPRoute |
chart.spec.sourceRef inline | Should use chartRef + OCIRepository |
image.tag: latest | Must pin with digest |
Missing securityContext | All containers need hardening |
readOnlyRootFilesystem: false without justification | Flag for review |
metadata.namespace in app resources | Breaks targetNamespace inheritance |
strategy: RollingUpdate with RWO PVC | Must use Recreate |
postBuild.substituteFrom for secrets | Timing race with ExternalSecrets |
# Check for Ingress resources
grep -r "kind: Ingress" kubernetes/apps/ --include="*.yaml" -l
# Check for inline chart sourceRef
grep -r "chart.spec.sourceRef" kubernetes/apps/ --include="*.yaml" -l
# Check for latest tags
grep -r "tag: latest" kubernetes/apps/ --include="*.yaml" -l
# Check for RollingUpdate with existingClaim
grep -rB5 "existingClaim" kubernetes/apps/ --include="*.yaml" | grep -B5 "RollingUpdate"
Apps that use ExternalSecrets must depend on external-secrets-stores:
# Find HRs with ExternalSecret but missing dependsOn
for ks in kubernetes/apps/**/ks.yaml; do
app_dir=$(dirname $ks)/app
if ls $app_dir/externalsecret.yaml 2>/dev/null; then
if ! grep -q "external-secrets-stores" $ks; then
echo "MISSING dependsOn: $ks"
fi
fi
done
Apps that use CNPG databases should depend on cloudnative-pg:
grep -rl "postgres-init\|INIT_POSTGRES" kubernetes/apps/ --include="*.yaml" | while read f; do
ks=$(find $(dirname $(dirname $f)) -name "ks.yaml" | head -1)
grep -q "cloudnative-pg" $ks 2>/dev/null || echo "MISSING CNPG dep: $ks"
done
Files in app/ not referenced in kustomization.yaml:
for dir in kubernetes/apps/*/*/app; do
ks="$dir/kustomization.yaml"
[ ! -f "$ks" ] && echo "MISSING kustomization.yaml: $dir" && continue
for f in $dir/*.yaml; do
base=$(basename $f)
[ "$base" = "kustomization.yaml" ] && continue
grep -q "$base" $ks || echo "ORPHANED: $f"
done
done
Every app directory must be referenced in its namespace kustomization.yaml:
for ns_ks in kubernetes/apps/*/kustomization.yaml; do
ns_dir=$(dirname $ns_ks)
for app_ks in $ns_dir/*/ks.yaml; do
app=$(basename $(dirname $app_ks))
grep -q "$app" $ns_ks || echo "NOT IN NAMESPACE KS: $app_ks"
done
done
Report issues grouped by severity:
Enforces staged execution discipline on large tasks: a written stage plan, delegation to named fable agents where the runtime supports it, a failable verification check at each stage, and a skeptical self-review before delivery. Trigger when the user explicitly asks ("do this thoroughly", "be systematic", "deep work mode") OR when the task objectively spans multiple files, multiple sources, or multiple sessions. Do NOT trigger on ordinary multi-step requests that a direct attempt handles fine. For a run pinned to a specific model, use fable-opus, fable-sonnet, or fable-haiku instead. Always-on guardrails (verify-before-flag, warning batching, sed safety) live in the companion execution-guardrails skill.
Run Kopiur S3 backups alongside VolSync NFS, verify over days, then cutover with full restore from S3
Migrate an app's PVC backup from VolSync to Kopiur with zero data loss
Scaffold a new app-template application for this home-ops repository
Systematically investigate cluster issues starting from events, following the Flux pipeline down to pod logs
Safely upgrade an app's image or chart version, checking for breaking changes and updating the HelmRelease