agentleFS
stephen-tataristephen-tatari/claude-skills/argocd-ops/SKILL.md

argocd-ops

Skill0 starsChanged 10 months agoMITView on GitHub

Operate existing ArgoCD applications via the argocd CLI — check sync status, refresh or hard-refresh apps, look up Application names from ApplicationSets, toggle auto-sync and self-heal, and log into ArgoCD via SSO. Use this skill whenever the user mentions ArgoCD sync status, ArgoCD app refresh, ArgoCD login, disabling or enabling auto-sync or self-heal, looking up ArgoCD applications, or checking if a deploy has synced. This is for day-to-day ArgoCD operations, not for installing ArgoCD, writing ApplicationSet manifests, configuring RBAC, or setting up notifications.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 18
  2. Distinctive:

    Ensure these tools are available:

    line 28
  3. Distinctive:

    Ask the user for:

    line 38
  4. Distinctive:

    Check current sync and health status:

    line 59
  5. Distinctive:

    Wait for sync to complete:

    line 70
  6. Distinctive:

    Create a Job from an existing CronJob and watch its logs:

    line 132

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

ArgoCD Operations Skill

Manage ArgoCD applications via CLI for common deployment and debugging tasks.

When to Use

Use this skill when:

  • Verifying sync status after deploying changes
  • Looking up Application names from ApplicationSets
  • Refreshing an app to re-evaluate state
  • Toggling auto-sync or self-heal settings
  • Manually triggering a Job from a CronJob and watching logs

Prerequisites

Ensure these tools are available:

  • argocd - ArgoCD CLI
  • kubectl - configured with cluster contexts
  • jq - for JSON parsing

Workflow

Step 1: Gather Information

Ask the user for:

  1. Cluster - Which cluster to connect to (e.g., test, staging, prod, apps, ops)
  2. Operation - What they want to do (sync check, refresh, toggle settings, run job)

Step 2: Login to ArgoCD

Login via SSO:

# Determine server
ARGOCD_SERVER="argocd.<cluster>.tatari.dev"

# Login via SSO
argocd login "$ARGOCD_SERVER" --sso --grpc-web

Step 3: Perform Operations

Verify Sync Status

Check current sync and health status:

argocd app get <app-name> -o json | jq '{
  name: .metadata.name,
  syncStatus: .status.sync.status,
  healthStatus: .status.health.status,
  revision: .status.sync.revision
}'

Wait for sync to complete:

argocd app wait <app-name> --sync --timeout 300

Lookup App from ApplicationSet

Find the Application name generated by an ApplicationSet:

argocd app list -o json | jq -r --arg appset "<appset-name>" \
  '.[] | select(.metadata.ownerReferences[]?.name == $appset) | .metadata.name'

Refresh / Hard Refresh

Soft refresh (re-read git, compare):

argocd app get <app-name> --refresh

Hard refresh (invalidate cache, force manifest regeneration):

argocd app get <app-name> --hard-refresh

Toggle Auto-Sync

Enable auto-sync:

argocd app set <app-name> --sync-policy automated

Disable auto-sync:

argocd app set <app-name> --sync-policy manual

Toggle Self-Heal

Enable self-heal:

argocd app set <app-name> --self-heal

Disable self-heal (requires patch since no direct flag exists):

argocd app patch <app-name> --type merge \
  --patch '{"spec":{"syncPolicy":{"automated":{"selfHeal":false}}}}'

Note: Disabling auto-sync entirely (--sync-policy manual) also stops self-heal behavior.

Trigger Job from CronJob

Create a Job from an existing CronJob and watch its logs:

# Create job with timestamp suffix
JOB_NAME="<cronjob-name>-manual-$(date +%s)"
kubectl --context <cluster> create job "$JOB_NAME" \
  --from=cronjob/<cronjob-name> -n <namespace>

# Wait for pod to start
kubectl --context <cluster> wait --for=condition=Ready pod \
  -l job-name="$JOB_NAME" -n <namespace> --timeout=120s

# Stream logs until completion
kubectl --context <cluster> logs -f -l job-name="$JOB_NAME" -n <namespace>

# Check final status
kubectl --context <cluster> get job "$JOB_NAME" -n <namespace> \
  -o jsonpath='{.status.conditions[0].type}'

Troubleshooting

Login fails

# Verify cluster context exists
kubectl config get-contexts | grep <cluster>

# Ensure a browser is available for the SSO flow
# If running headless or over SSH, SSO login will not work

App not found

# List all apps
argocd app list

# Check if app exists via kubectl
kubectl --context <cluster> get applications -n argocd

Self-heal won't disable

The --self-heal flag only enables, it cannot disable. Use the patch command:

argocd app patch <app-name> --type merge \
  --patch '{"spec":{"syncPolicy":{"automated":{"selfHeal":false}}}}'

Job pod not starting

# Check job status
kubectl --context <cluster> describe job <job-name> -n <namespace>

# Check for pending pods
kubectl --context <cluster> get pods -l job-name=<job-name> -n <namespace>

# Check events
kubectl --context <cluster> get events -n <namespace> --sort-by='.lastTimestamp' | tail -20

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.