rtk-ai/rtk

Feature request: rtk wrapper for az aks (command invoke + get-credentials)

Open

#1,592 opened on 2026年4月29日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Rust (2,914 forks)batch import
area:clieffort-mediumenhancementhelp wantedpriority:medium

Repository metrics

Stars
 (48,085 stars)
PR merge metrics
 (平均マージ 11d 1h) (30d で 45 merged PRs)

説明

Real-world numbers from 30 days of Claude Code transcripts (686 sessions scanned, paired Bash tool_use → tool_result by tool_use_id):

Subcommand Calls Est. tokens Avg/call
az aks command (invoke) 61 18,668 306
az aks get-credentials 81 16,072 198
(other az aks) 51 3,530 69
Total az aks 193 38,270 198

Two surprise findings vs my prior assumptions:

  1. az aks command invoke is the largest bloat source — it streams full kubectl/helm output through, but the wrapper layer adds JSON envelope metadata (exitCode, properties.logs, properties.provisioningState) that's redundant when stdout already carries the result.
  2. az aks get-credentials returns a multi-line warning prelude ("Merged 'X' as current context...", deprecation notices about kubelogin auth) on every call — ~200 tokens of noise per invocation, 81 invocations = ~16K tokens of pure preamble.

Suggested wrapper behavior:

  • For az aks command invoke: strip the JSON envelope, emit only properties.logs to stdout (or pass-through with --rtk-raw)
  • For az aks get-credentials: strip preamble, emit only the final Merged ... as current context line
  • For az aks show: drop addonProfiles[] entries with enabled: false, drop agentPoolProfiles[].tags if empty

A generic ARM JSON pruner (filed separately as #1590) would cover ~30% of az aks show savings as a fallback. Happy to defer the show-side trimming until that lands.

Methodology note: numbers come from scanning ~/.claude/projects/**/*.jsonl transcripts, pairing Bash tool_use blocks with their tool_result by tool_use_id, stripping any rtk prefix to count like-for-like, and estimating tokens at 4 chars/token.

コントリビューターガイド