Token导航 LogoToken导航TokenDH.com
运维和基础设施敏感数据github未标认证来源可访问许可证需确认审计通过

argocd-cli-guideargocd CLI 指南

Agent Skill

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

总安装

465

周安装

19

GitHub Stars

2

下载量

150
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/wenerme/ai --skill argocd-cli-guide

简介

argocd-cli-guide 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 作为 Kubernetes 专家,提供 ArgoCD CLI 命令模式,强调上下文切换以避免认证错误。
  • 支持多 ArgoCD 服务器管理,提供 app get、sync、rollout 等常用操作速查。
  • 安装命令为 npx skills add https://github.com/wenerme/ai --skill argocd-cli-guide。
  • 操作前必须切换上下文或使用 per-command 标志,防止 token 绑定冲突。

SKILL.md

ArgoCD CLI Guide

You are an expert Kubernetes operator. Use these command patterns when interacting with the argocd CLI.

0. Context Management (MUST READ FIRST)

CRITICAL RULE: When working with multiple ArgoCD servers, you MUST switch context before running any command. Failing to do so causes auth errors — tokens are bound to the server in the current context.

# List all configured contexts (shows current context with *)
argocd context

# Switch context before operating on a different server
argocd context <SERVER_ADDRESS>

# Or use per-command flags (no context switch needed)
argocd app get <APP> --argocd-context <SERVER_ADDRESS>
argocd app get <APP> --server <SERVER_ADDRESS>

Multi-server pattern:

argocd context argocd.example.com
argocd app sync argocd/my-app
argocd context argocd.other.com
argocd app sync argocd/other-app

Login:

argocd login <SERVER_ADDRESS> --grpc-web --sso

Per-server settings like grpc-web can be persisted in ~/.config/argocd/config so you don't need to pass flags every time. See references/argocd-config.md for config details.

1. Information Retrieval

When asked to check an application's status, always start here.

# High-level status (health + sync)
argocd app get <APP_NAME>

# JSON output for scripting
argocd app get <APP_NAME> -o json

# Show parameters and last operation details
argocd app get <APP_NAME> --show-params --show-operation

# Get a specific resource's live manifest
argocd app get-resource <APP_NAME> --kind <KIND> --resource-name <NAME> -o json

# List all applications
argocd app list

Application Logs:

# All pods in the app
argocd app logs <APP_NAME>

# Stream logs in real-time
argocd app logs <APP_NAME> -f

# Last N lines
argocd app logs <APP_NAME> --tail 100

# Filter by resource kind/name/namespace
argocd app logs <APP_NAME> --kind Deployment --name <RESOURCE_NAME>

2. Safe Inspection (Diffing)

CRITICAL GUARDRAIL: ALWAYS run a diff before performing a manual sync to understand what will change.

argocd app diff <APP_NAME>

If the diff shows unexpected massive deletions, STOP and ask the user for confirmation.

Reading diffs: If the diff only shows image tag changes, this is typically from CI/CD auto-updates and is safe to sync.

3. Sync & Deployment

# Standard sync
argocd app sync <APP_NAME>

# Async sync (don't wait for completion — good for batch)
argocd app sync <APP_NAME> --async

# Dry-run (preview without applying)
argocd app sync <APP_NAME> --dry-run

# Sync specific resource only (GROUP:KIND:NAME format)
argocd app sync <APP_NAME> --resource :Service:my-service
argocd app sync <APP_NAME> --resource argoproj.io:Rollout:my-rollout
# With namespace
argocd app sync <APP_NAME> --resource argoproj.io:Rollout:my-namespace/my-rollout

# Force sync with prune (USE WITH CAUTION — only when user explicitly asks)
argocd app sync <APP_NAME> --prune --force

4. Rollback & History

# View deployment history
argocd app history <APP_NAME>

# Rollback to a specific revision
argocd app rollback <APP_NAME> <HISTORY_ID>

5. Resource Actions (Rollouts, Restarts)

# List available actions for an app
argocd app actions list <APP_NAME>

# Promote a Rollout (e.g., canary → full)
argocd app actions run <APP_NAME> promote-full --kind Rollout --resource-name <NAME>

# Restart a Deployment
argocd app actions run <APP_NAME> restart --kind Deployment --resource-name <NAME>

Argo Rollouts workflow: When an app uses Argo Rollouts, sync triggers a canary deployment (partial traffic). You MUST run promote-full after sync to complete the full rollout. Typical flow:

  1. argocd app diff <APP> — check what changed
  2. argocd app sync <APP> — triggers canary
  3. Verify canary is healthy
  4. argocd app actions run <APP> promote-full --kind Rollout --resource-name <NAME> — full rollout

6. Troubleshooting

SymptomCauseFix
Unauthenticated / token expiredAuth token expiredargocd relogin or argocd login <SERVER> --grpc-web --sso
Perpetual diff on HPAMetrics field orderingEnsure HPA metrics order: memory first, cpu second (matches K8s API server return order)
Diff shows only image tag changesCI/CD auto-updated imageExpected behavior, safe to sync

Best Practices

  1. Context First: MUST argocd context <server> before operating on a different server.
  2. Read Before Write: Always app get + app diff before any app sync or app rollback.
  3. GitOps Awareness: ArgoCD reconciles from Git. Manual kubectl changes will be overwritten on next sync. Prefer Git commits + ArgoCD sync.
  4. Async for Batch: Use --async when syncing multiple apps to avoid blocking.
  5. Targeted Sync: Use --resource to sync only the changed resource instead of the entire app.
  6. Rollout Awareness: After syncing an app with Argo Rollouts, remember to promote-full to complete the rollout.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.91%
按下载量换算54

Claude

28.39%
按下载量换算43

Cursor

18.98%
按下载量换算28

Gemini CLI

10.27%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills