/ai-dev-extensions:aks-kubectlfrom ai-dev-extensions
Use when running kubectl commands against an AKS cluster - enforces az aks command invoke for private cluster access, requires --file for complex commands, and persists cluster identity in memory
Ships in ai-dev-extensions. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
All kubectl commands MUST be executed through az aks command invoke because the target AKS cluster is private and not directly reachable. This skill intercepts any attempt to run kubectl directly and transforms it into the correct az aks command invoke call.
kubectl will silently fail or timeout on a private cluster. Every kubectl command MUST go through az aks command invoke.
# BAD - will timeout on private cluster
kubectl get pods
kubectl apply -f deployment.yaml
kubectl logs deploy/my-app
# GOOD - routed through Azure control plane
az aks command invoke -g <RG> -n <CLUSTER> -c "kubectl get pods"
The --resource-group and --name parameters identify the target cluster.
First use (no memory found): Ask the user:
"I need your AKS cluster details to run kubectl commands. What is the resource-group and cluster name?"
Then store in persistent memory (memory/aks_cluster.md, type: reference).
Subsequent uses: Read from memory. Never ask again unless the user explicitly provides new values.
If the user provides new values: Update the memory file.
A command is simple if it has:
|)&&, ||, ;)$(...) or backticks)Simple commands go directly in --command:
# List pods
az aks command invoke -g <RG> -n <CLUSTER> -c "kubectl get pods -n default"
# Pod logs
az aks command invoke -g <RG> -n <CLUSTER> -c "kubectl logs deploy/my-app -n prod"
# Describe a service
az aks command invoke -g <RG> -n <CLUSTER> -c "kubectl describe svc my-service -n prod"
# Delete a pod
az aks command invoke -g <RG> -n <CLUSTER> -c "kubectl delete pod my-pod -n default"
A command is complex if it contains ANY of:
|)&&, ||, ;)$(...) or backticks)Complex commands MUST be written to a temporary script file and sent via --file:
Important: --file uploads the file to the command pod's working directory, so --command must reference the filename only (not the local path).
# Step 1: Write the script locally
cat > /tmp/aks-cmd.sh << 'EOF'
kubectl get pods -A -o json | jq -r '.items[] | select(.status.phase != "Running") | "\(.metadata.namespace)/\(.metadata.name) \(.status.phase)"'
EOF
# Step 2: Send it via --file, reference by filename in --command
az aks command invoke -g <RG> -n <CLUSTER> \
-c "bash aks-cmd.sh" \
-f /tmp/aks-cmd.sh
Another example with chaining:
cat > /tmp/aks-cmd.sh << 'EOF'
kubectl get nodes -o wide && kubectl get pods -A --field-selector=status.phase!=Running
EOF
az aks command invoke -g <RG> -n <CLUSTER> \
-c "bash aks-cmd.sh" \
-f /tmp/aks-cmd.sh
When a kubectl command references a local file (manifest, configmap, secret YAML), use --file to upload it:
# Apply a single manifest
az aks command invoke -g <RG> -n <CLUSTER> \
-c "kubectl apply -f deployment.yaml" \
-f deployment.yaml
# Apply multiple files — send the whole directory
az aks command invoke -g <RG> -n <CLUSTER> \
-c "kubectl apply -f ." \
-f .
Important: The file referenced in --command must match what is sent via --file. The file is uploaded to the command pod's working directory.
When a complex command also needs local files, send both the script AND the files. Use . to send the current directory which includes everything:
cat > /tmp/apply-and-check.sh << 'EOF'
kubectl apply -f deployment.yaml && kubectl rollout status deployment/my-app -n prod
EOF
cp /tmp/apply-and-check.sh .
az aks command invoke -g <RG> -n <CLUSTER> \
-c "bash apply-and-check.sh" \
-f .
| Pattern | Problem |
|---|---|
kubectl get pods | Direct kubectl — will timeout on private cluster |
az aks command invoke -c "kubectl get pods -o json | jq '.items[]'" | Complex command inline — quoting issues, shell escaping breaks |
Forgetting --file when command references a local file | File not found on the command pod |
| Hardcoding resource-group/name instead of reading from memory | Breaks portability across sessions |
# Simple command pattern
az aks command invoke -g <RG> -n <CLUSTER> -c "<kubectl command>"
# Complex command pattern (file — reference by filename, not local path)
cat > /tmp/aks-cmd.sh << 'EOF'
<complex command here>
EOF
az aks command invoke -g <RG> -n <CLUSTER> -c "bash aks-cmd.sh" -f /tmp/aks-cmd.sh
# Apply local manifest pattern
az aks command invoke -g <RG> -n <CLUSTER> -c "kubectl apply -f <file>" -f <file>
What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/docs-englishUse when writing or editing documentation, code comments, docstrings, README files, CHANGELOG entries, PR descriptions, commit messages, or any committed textual artifact - enforces English as the sole language regardless of the language used in the conversation/git-commitUse when creating git commits - enforces Conventional Commits specification for semantic versioning compatibility/github-actionsUse when reviewing, writing, or modifying GitHub Actions workflows or referencing any GitHub Action - enforces version pinning by commit SHA, latest version verification, and version commenting/github-complete-prUse when a GitHub pull request has just been merged or closed - switches back to the repository default branch, syncs it, and deletes the now-obsolete feature branch both locally and on the remote if it still exists/github-create-update-prUse when creating or updating GitHub pull requests - enforces Conventional Commits naming convention on PR titles for semantic versioning and squash-merge compatibility, and verifies that CI workflows (if any) complete successfully before handing the PR back to the user/github-resolve-prUse when the user asks to review, analyze, address, or resolve comments pushed on a GitHub pull request - fetches all unresolved review threads, judges each comment on its merits, applies a fix when the comment is valid, always replies to every thread (fix summary or rationale for not fixing), and resolves every thread after the reply is posted — whether the comment was fixed or declined with rationalenpx claudepluginhub using-system/ai-dev-extensions --plugin ai-dev-extensions