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

kubectl-cli

Skill0 starsChanged 8 months agoApache-2.0View on GitHub

Uses kubectl to inspect and change Kubernetes clusters: resources, logs, exec, port-forward, rollouts, and apply. Apply when the user works with pods, deployments, services, namespaces, events, or cluster debugging from a shell.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. paulanunes85/three-horizons-accelerator★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

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:

    Namespace: use -n <namespace> or -A / --all-namespaces when not using default.

    line 23
  2. Distinctive:

    Secrets: avoid printing secret contents in logs.

    line 48
  3. Very specific:

    Production: prefer explicit --context and -n in shared scripts to avoid the wrong cluster or namespace.

    line 50

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

kubectl (kubectl)

When to use

  • List, describe, create, update, or delete API resources (pods, deployments, services, configmaps, secrets, CRDs, etc.).
  • Stream logs, run commands in containers (exec), or port-forward to workloads.
  • Inspect rollouts, scale workloads, or diff/apply manifests.
  • Troubleshoot with events, describe, metrics (top), or debug sessions.

Prerequisites

  • kubectl installed (kubectl version --client). Documentation: kubectl reference.
  • Cluster access: valid kubeconfig (default ~/.kube/config, or KUBECONFIG with one or more files).
  • Context: kubectl config current-context; switch with kubectl config use-context or pass --context per command.
  • Namespace: use -n <namespace> or -A / --all-namespaces when not using default.

Patterns

  • Help: kubectl --help, kubectl <cmd> --help, kubectl explain <resource>[.<fieldPath>].
  • Output: -o wide, -o yaml, -o json, -o jsonpath='...' for scripts; --show-labels when labels matter.
  • Selection: -l key=value, resource/name arguments, -f file or -k dir (kustomize).
  • Dry run: kubectl apply --dry-run=server|client (and kubectl delete/create dry-run flags per command help) before destructive changes.
  • Imperative vs declarative: quick edits with kubectl edit / kubectl patch; repeatable changes with manifests + kubectl apply.

Core commands (orienting)

AreaExamples
Discoverykubectl api-resources, kubectl get ns, kubectl get pods -n <ns>
Inspectkubectl describe <type> <name> -n <ns>, kubectl get all -n <ns>
Logskubectl logs <pod> -n <ns>, kubectl logs -f ..., kubectl logs <pod> -c <container>
Execkubectl exec -it <pod> -n <ns> -- <cmd>
Port forwardkubectl port-forward svc/<name> <local>:<remote> -n <ns>
Applykubectl apply -f manifest.yaml, kubectl apply -k overlays/prod
Rolloutkubectl rollout status deployment/<name> -n <ns>, kubectl rollout undo ...
Clusterkubectl cluster-info, kubectl top nodes, kubectl top pods -n <ns>

Safety

  • Secrets: avoid printing secret contents in logs; redact tokens in command output shared with users.
  • Destructive: delete, drain, replace --force, and some apply/patch operations can disrupt workloads—match intent to the user’s request.
  • Production: prefer explicit --context and -n in shared scripts to avoid the wrong cluster or namespace.

References

  • Official documentation: kubectl reference
  • Local help: kubectl help, kubectl <cmd> --help, kubectl explain <resource> (authoritative for your installed kubectl 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.

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.