agentleFS
cloudfleetaicloudfleetai/cloudfleet-plugin-claude/skills/query-cluster/SKILL.md

query-cluster

Skill0 starsChanged 10 days agoApache-2.0View on GitHub

This skill should be used when the user wants to check pods, services, deployments, nodes, or any Kubernetes resources on a Cloudfleet cluster.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check for kubectl with command -v kubectl.

    line 12
  2. Very specific:

    If the user specifies a --profile, pass it to all cloudfleet CLI commands.

    line 17
  3. Very specific:

    If the user did not name a cluster, run cloudfleet clusters list (with --profile if specified) and ask the user which cluster to query.

    line 26
  4. Distinctive:

    If kubectl is installed, get an isolated kubeconfig:

    line 30
  5. Very specific:

    Use the clusters_query tool with the cluster ID and Kubernetes API path:

    line 54
  6. Distinctive:

    When using MCP, prefer narrowing queries with namespace, label selectors, or pagination to avoid large responses.

    line 67

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

Query Cluster

Query Kubernetes resources on a Cloudfleet cluster.

Check for kubectl with command -v kubectl. Use kubectl when it is installed, and the read-only Cloudfleet MCP server when it is not.

Important Notes

  • kubectl is a separate tool from the Cloudfleet CLI — there is no cloudfleet kubectl command.
  • If the user specifies a --profile, pass it to all cloudfleet CLI commands.
  • Pass -o json to cloudfleet commands. The default auto already emits JSON when piped, but a per-profile default or CLOUDFLEET_OUTPUT_FORMAT can override it to table.
  • Narrow large results with -q (JMESPath), e.g. cloudfleet clusters list -q "[].{id:id,name:name,status:status}".
  • The kubeconfig context name format is {cluster-id}/{profile-name} (e.g., 0bd317f4-.../textcortex). Do NOT guess — run kubectl config get-contexts if unsure.

Execution Steps

1. Determine cluster

If the user did not name a cluster, run cloudfleet clusters list (with --profile if specified) and ask the user which cluster to query.

2. Determine access method and configure

If kubectl is installed, get an isolated kubeconfig:

KUBECONFIG="${TMPDIR:-/tmp}"; KUBECONFIG="${KUBECONFIG%/}/cloudfleet-$(id -u)/$CLUSTER_ID.kubeconfig"
mkdir -p "${KUBECONFIG%/*}" && chmod 700 "${KUBECONFIG%/*}"
[ -f "$KUBECONFIG" ] || (umask 077 && cloudfleet clusters kubeconfig "$CLUSTER_ID" --kubeconfig "$KUBECONFIG" >&2)
echo "$KUBECONFIG"

The directory is per-user and private, so other local users cannot read or replace the file. Add --profile to the cloudfleet command if the user named one. Shell variables do not survive between commands, so pass the printed path to later commands.

Always use kubectl --kubeconfig $KUBECONFIG — never bare kubectl, as the user's active context may point to a different cluster.

If kubectl is not installed, use the Cloudfleet MCP clusters_query tool. Note: MCP provides read-only (GET) access only — no create, update, delete, exec, logs, or port-forward operations. MCP only works with the default CLI profile — if the user has a non-default profile, prefer kubectl with --profile.

3. Execute query

With kubectl:

kubectl --kubeconfig $KUBECONFIG get <resource> [-n <namespace>] [-o wide]

With MCP (read-only fallback): Use the clusters_query tool with the cluster ID and Kubernetes API path:

User requestAPI path
"show pods" / "list pods"/api/v1/pods or /api/v1/namespaces/{ns}/pods
"show deployments"/apis/apps/v1/deployments
"show services"/api/v1/services
"show nodes"/api/v1/nodes
"show events"/api/v1/events
"show namespaces"/api/v1/namespaces
"show ingresses"/apis/networking.k8s.io/v1/ingresses
"show fleets"Use cloudfleet clusters fleets list <cluster-id> (not via K8s API)

When using MCP, prefer narrowing queries with namespace, label selectors, or pagination to avoid large responses.

4. Present results

Format the response in a readable way — tables for list results, structured details for single resources. Highlight any issues (unhealthy pods, pending resources, error events).

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.