rancher-cli
Skill0 starsChanged 7 months agoApache-2.0View on GitHub
Uses the Rancher CLI (`rancher`) to log into Rancher Server, select a project context, and run cluster/project operations including passthrough `kubectl`. Apply when the user manages Rancher projects, clusters, or workloads through Rancher rather than a raw kubeconfig alone.
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Run rancher kubectl … to execute kubectl against the cluster associated with the current Rancher context.
- Very specific: line 23
After login, select a project with rancher context switch before most operations.
- Distinctive: line 53
Treat API bearer tokens like passwords.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.
Files
Rancher CLI (rancher)
When to use
- Authenticate to a Rancher Server and work in terms of Rancher projects and clusters.
- Switch context to the project/cluster scope before running resource commands.
- Run
rancher kubectl …to execute kubectl against the cluster associated with the current Rancher context. - Inspect Rancher or Kubernetes resources via
inspect, list workloads withps, or use subcommands such asclusters,projects,namespaces,nodes,machines.
Prerequisites
rancherbinary installed (often downloaded from the Rancher UI CLI Downloads or rancher/cli releases). Documentation: Rancher CLI.- Rancher Server URL and a Bearer API token (API keys).
- After login, select a project with
rancher context switchbefore most operations; config is stored (e.g.~/.ranchcli2.jsonper upstream docs).
Patterns
- Help:
rancher --help,rancher <cmd> --help. - Login:
rancher login https://<SERVER_URL> --token <BEARER_TOKEN>. Self-signed certs may prompt to continue. - Context:
rancher context switch— pick the Rancher project (cluster + project) to target. - kubectl:
rancher kubectl get pods(and other kubectl subcommands) once context is valid. - Inspect:
rancher inspectfor Kubernetes or Rancher resources (see command help for options and resource IDs).
Core commands (orienting)
| Area | Examples |
| Session | rancher login, rancher token (kubeconfig token; see --help) |
| Context | rancher context switch |
| Clusters / projects | rancher clusters, rancher projects (see --help for subcommands) |
| Workloads | rancher ps, rancher namespaces |
| kubectl | rancher kubectl get pods, rancher kubectl describe … |
| Nodes / SSH | rancher nodes, rancher ssh (see --help) |
| Other | rancher inspect, rancher settings, rancher wait, rancher up |
Exact subcommands and flags depend on the CLI version; prefer rancher <cmd> --help.
Limitations
- The Rancher CLI cannot install Rancher dashboard apps or feature charts via Helm in the way the UI/charts flow does — see the official docs.
Safety
- Treat API bearer tokens like passwords; do not log or commit them.
- Operations on clusters, nodes, or workloads can be destructive — align with the user’s intent and environment (prod vs non-prod).
References
- Official documentation: Rancher CLI
- Local help:
rancher --help,rancher <cmd> --help(authoritative for your installedrancherversion)
In this repository4 other files it gives its agents.
- coder-cliSkill
- gh-cliSkill
- glab-cliSkill
- kubectl-cliSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

