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.
In this repository9 other files it gives its agents.
- best-practicesSkill
- cfcr-overviewSkill
- cfke-overviewSkill
- cluster-infoSkill
- cluster-setupSkill
- contactSkill
- debug-clusterSkill
- setupSkill
- terraformSkill
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
- Very specific: line 12
Check for kubectl with command -v kubectl.
- Very specific: line 17
If the user specifies a --profile, pass it to all cloudfleet CLI commands.
- Very specific: line 26
If the user did not name a cluster, run cloudfleet clusters list (with --profile if specified) and ask the user which cluster to query.
- Distinctive: line 30
If kubectl is installed, get an isolated kubeconfig:
- Very specific: line 54
Use the clusters_query tool with the cluster ID and Kubernetes API path:
- Distinctive: line 67
When using MCP, prefer narrowing queries with namespace, label selectors, or pagination to avoid large responses.
≈ “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.
Files
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
kubectlis a separate tool from the Cloudfleet CLI — there is nocloudfleet kubectlcommand.- If the user specifies a
--profile, pass it to allcloudfleetCLI commands. - Pass
-o jsontocloudfleetcommands. The defaultautoalready emits JSON when piped, but a per-profile default orCLOUDFLEET_OUTPUT_FORMATcan override it totable. - 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 — runkubectl config get-contextsif 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 request | API 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).
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
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.

