agentleFS
DataKnifeAIDataKnifeAI/agent-skills/skills/rancher-cli/SKILL.md

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
  1. Very specific:

    Run rancher kubectl … to execute kubectl against the cluster associated with the current Rancher context.

    line 16
  2. Very specific:

    After login, select a project with rancher context switch before most operations.

    line 23
  3. Distinctive:

    Treat API bearer tokens like passwords.

    line 53

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 with ps, or use subcommands such as clusters, projects, namespaces, nodes, machines.

Prerequisites

  • rancher binary 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 switch before most operations; config is stored (e.g. ~/.ranchcli2.json per 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 inspect for Kubernetes or Rancher resources (see command help for options and resource IDs).

Core commands (orienting)

AreaExamples
Sessionrancher login, rancher token (kubeconfig token; see --help)
Contextrancher context switch
Clusters / projectsrancher clusters, rancher projects (see --help for subcommands)
Workloadsrancher ps, rancher namespaces
kubectlrancher kubectl get pods, rancher kubectl describe …
Nodes / SSHrancher nodes, rancher ssh (see --help)
Otherrancher 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 installed rancher version)

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.

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.