# argoCTL Agent Skill

Source: https://argoctl-docs.pages.dev/docs/agent-skill

> Teach your AI coding agent to write site files, run argoctl in the right order and fix failures, with a downloadable SKILL.md skill.

The **argoCTL skill** packages what an AI agent needs to operate argoCTL: how to write and validate a site file, the order of the commands, which steps need your confirmation, and how to diagnose failures. It uses the open **Agent Skills** format (a folder with a `SKILL.md` file), supported by Claude Code and other agents that load `SKILL.md` skills. The agent reads the skill's short description up front and loads the rest only when you're working with argoCTL.

[Download the argoCTL skill (argoctl-skill.zip)](https://argoctl-docs.pages.dev/skills/argoctl-skill.zip)

## What it teaches the agent

- **Site-file authoring**: the fields, the validation rules, a complete example, and to loop on `argoctl site validate` until it passes.
- **The command sequence**: validate → preflight → analyse → ironic install → provision → create cluster → verify cluster → deploy inference, with the right `sudo --preserve-env=...` for each.
- **Safety rules**: never write passwords or tokens into files, commands or output; ask before anything that power-cycles servers or wipes disks.
- **Model placement**: replicate, tensor parallel, pipeline parallel, and GPU memory sizing, to pick `deploy inference` flags.
- **Troubleshooting**: how to read an argoctl failure (error, To fix steps, run log) and the common symptoms and fixes for each command.

## What's in the zip

```text
argoctl/
  SKILL.md                         instructions and the command sequence (always loaded first)
  references/
    site.example.yaml              a complete, valid site file
    site-file.md                   every site-file field and validation rule
    commands.md                    every command, its flags, output and troubleshooting
    model-placement.md             layouts, GPU memory and KV-cache sizing
    troubleshooting.md             symptoms, causes and fixes
```

The reference files are generated from these docs when the site is built, so the skill always matches the documentation you're reading.

## Install

### Claude Code

For every project on your machine:

```bash
curl -fsSLO https://docs.argocompute.com/skills/argoctl-skill.zip
mkdir -p ~/.claude/skills
unzip -o argoctl-skill.zip -d ~/.claude/skills/
```

Or for one project only, committed with the project so your team gets it too:

```bash
mkdir -p .claude/skills
unzip -o argoctl-skill.zip -d .claude/skills/
```

Either way you end up with `skills/argoctl/SKILL.md`. Claude Code picks it up in new sessions; ask it something like "write a site file for our three servers" or "why did argoctl provision fail?", or invoke it directly with `/argoctl`.

### Other agents

Agents that support `SKILL.md` skills load them from their own skills directory: unzip the archive there so the `argoctl/` folder sits directly inside it. For agents without skill support, point them at [`/llms.txt`](https://argoctl-docs.pages.dev/llms.txt) or paste the instructions from the [Introduction](https://argoctl-docs.pages.dev/docs) page's **Copy Instructions** button.

### Update

Download the zip again and unzip it over the old copy (`-o` overwrites).

## SKILL.md

````md title="argoctl/SKILL.md"
---
name: argoctl
description: Operate argoCTL, the Argo Compute CLI that installs Ubuntu on bare-metal servers over Redfish, builds a Kubernetes cluster with kubeadm and Cilium, and deploys vLLM inference on GPU nodes. Use when writing or fixing an argoCTL site file (site.yaml), running argoctl commands (site validate, preflight, analyse, ironic install, provision, create cluster, verify cluster, deploy/get/delete inference), choosing how to place a model on GPUs, or troubleshooting a failed argoctl run.
---

# argoCTL

argoCTL is a single static binary, `argoctl`, that runs on a site's management server ("mgmt", Ubuntu 24.04 x86_64). Everything about a site lives in one YAML **site file** (usually `/etc/argoctl/site.yaml`). Full docs: https://docs.argocompute.com/llms.txt (every page is also available as Markdown by adding `.md` to its URL).

## Ground rules

- Run argoctl **on mgmt**. Commands that touch BMCs, Ironic, nodes or the cluster need root: `sudo`.
- **Never** put a password or token in the site file, a command line or your output. The site file names *where* the BMC password is (`bmc.password_env` or `bmc.password_file`). Pass environment variables through sudo with `sudo --preserve-env=ARGOCTL_BMC_PASSWORD ...`.
- **Ask the user before** `argoctl preflight` (power-cycles nodes), `argoctl provision` on nodes that already have an OS, any `--reimage` (wipes disks), `ironic uninstall --purge`, and `delete inference`.
- Every command is idempotent: re-running a successful command reports `nothing to change`; re-running an interrupted one resumes. Prefer re-running over manual repair.
- `--json` prints a machine-readable report on stdout; progress stays on stderr. Exit codes: `0` success, `1` failure, `2` usage error.
- Every run writes a log and prints `Full log: <path>` last. On failure, read the error's numbered **To fix** steps and that log before changing anything.

## The lifecycle

```bash
argoctl version
argoctl site validate /etc/argoctl/site.yaml                                     # 1. check the site file
sudo --preserve-env=ARGOCTL_BMC_PASSWORD argoctl preflight /etc/argoctl/site.yaml # 2. BMCs can boot virtual media
sudo --preserve-env=ARGOCTL_BMC_PASSWORD argoctl analyse /etc/argoctl/site.yaml   # 3. hardware and what models fit
sudo argoctl ironic install /etc/argoctl/site.yaml                               # 4. Ironic on mgmt (Docker)
sudo --preserve-env=ARGOCTL_BMC_PASSWORD argoctl provision /etc/argoctl/site.yaml # 5. Ubuntu on every node
sudo argoctl create cluster /etc/argoctl/site.yaml                               # 6. Kubernetes + Cilium + monitoring + logs + GPU Operator
sudo argoctl verify cluster /etc/argoctl/site.yaml                               # 7. checks only
sudo --preserve-env=HF_TOKEN argoctl deploy inference /etc/argoctl/site.yaml \
  --model Qwen/Qwen3-8B --replicas 2 --hf-token-env HF_TOKEN                     # 8. vLLM via Helm
sudo argoctl get inference /etc/argoctl/site.yaml                                # endpoint and status
```

Test a deployment through its OpenAI-compatible endpoint (printed by `get inference`):

```bash
curl -s http://<endpoint>/v1/models
curl -s http://<endpoint>/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"model":"Qwen/Qwen3-8B","messages":[{"role":"user","content":"Hello"}]}'
```

## Writing a site file

Start from `references/site.example.yaml` and the field list in `references/site-file.md`. Collect from the user: the three networks (BMC `oob`, `provisioning`, optional `frontend`) with CIDRs, gateways and DNS; mgmt's addresses on them; the BMC username and where the password is kept; and per node its BMC URL and the MAC and static IP of each NIC. Then loop on `argoctl site validate <file>` until it exits 0: it reports every problem with `file:line:column` and the fix.

Common validation failures: host bits in a CIDR (`172.16.1.5/24` → `172.16.1.0/24`), an address outside its network or used twice, duplicate MACs, an inline `bmc.password` (use `password_env`/`password_file`), a node with a `frontend` NIC but no `networks.frontend`, and pod/Service ranges overlapping a site network.

## Placing models on GPUs

Run `argoctl analyse` and use its suggested flags. Rule of thumb: **replicate** if the model fits on one GPU; **tensor parallel** within one node (NVLink/NVSwitch) if it doesn't; **pipeline parallel** across nodes only as a last resort, and only with RDMA (InfiniBand or RoCE). Weights ≈ parameters × bytes per parameter (BF16 2, FP8 1, INT4 ≈ 0.5), plus 20–50% for the KV cache. MoE models are sized by total parameters. Details: `references/model-placement.md`.

## Monitoring and alerts

Every cluster has Prometheus, Alertmanager, Grafana and metrics-server in the namespace `monitoring`; the `create cluster` and `verify cluster` reports say how to reach each one and list the alerts firing. Alerts go nowhere until the user adds a receiver: an `AlertmanagerConfig` in their own namespace (credentials in a Secret there). Their own alert rules are `PrometheusRule` objects in their namespaces. Don't edit the stack's own resources in `monitoring`: `create cluster` puts them back. Grafana's admin password is in the Secret `monitoring/grafana-admin`: give the user the command that reads it, never the password itself. Details, PromQL and silences: `references/monitoring.md`.

Logs (every container, every node's journal, the API server's audit log) are kept 7 days in Loki at `http://loki.monitoring.svc:3100`: search them in Grafana (Logs dashboard, or Explore) or with `logcli` through `kubectl -n monitoring port-forward svc/loki 3100:3100`. Log alert rules are ConfigMaps labelled `loki_rule` in `monitoring`, and go to the same Alertmanager. Details and audit-log queries: `references/search-logs.md`.

## When something fails

See `references/troubleshooting.md` (an index by symptom) and the Troubleshooting table of each command in `references/commands.md`. Fix the cause, then re-run the same command.

## Reference files

- `references/site.example.yaml`: a complete, valid site file.
- `references/site-file.md`: every site-file field and validation rule.
- `references/commands.md`: every command's purpose, flags, output, exit codes and troubleshooting table.
- `references/model-placement.md`: replicate, tensor parallel and pipeline parallel; GPU memory and KV-cache sizing.
- `references/troubleshooting.md`: how to read a failure, and symptoms with their fixes.
- `references/monitoring.md`: metrics, PromQL, alerts, receivers, custom rules, silences and Grafana.
- `references/search-logs.md`: searching logs and the audit log, and log alerts.
````
