rtk-ai/rtk

Feature request: rtk wrapper for az afd (Front Door — high frequency, modest per-call savings)

Open

#1,594 opened on Apr 29, 2026

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Rust (2,914 forks)batch import
area:clieffort-mediumenhancementhelp wantedpriority:low

Repository metrics

Stars
 (48,085 stars)
PR merge metrics
 (Avg merge 11d 1h) (45 merged PRs in 30d)

Description

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 afd origin 161 10,915 67
(other az afd) 88 4,108 46
Total az afd 249 15,023 60

Different profile from the other az subcommand groups — the per-call output is already small (60 tokens avg), but the call volume is high (249 calls) because debugging Front Door is iterative (origin show → route show → check WAF → check origin again).

The main bloat per-call is the extendedProperties / kind / systemData / etag metadata that appears on every Front Door resource. Removing those alone saves ~30% on small responses.

Suggested wrapper behavior:

  • Drop extendedProperties, kind, systemData, etag, provisioningState: Succeeded from all afd shows
  • For az afd origin show/list: collapse privateLinkResource block to a one-line privateLinkType:targetId summary unless -o json requested
  • For az afd route show: emit name | hostnames[] | originGroup | rulesets[] summary by default

Lower-priority caveat: the generic ARM JSON pruner (filed separately as #1590) would cover most of the per-call savings here as a fallback. Reasonable to defer this issue and revisit once the pruner is in place — by my estimate the pruner alone would close ~70% of the per-call bloat for az afd.

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.

Contributor guide