Feature request: rtk wrapper for az afd (Front Door — high frequency, modest per-call savings)
#1594 aperta il 29 apr 2026
Metriche repository
- Star
- (48.085 star)
- Metriche merge PR
- (Merge medio 11g 1h) (45 PR mergiate in 30 g)
Descrizione
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: Succeededfrom all afd shows - For
az afd origin show/list: collapseprivateLinkResourceblock to a one-lineprivateLinkType:targetIdsummary unless-o jsonrequested - For
az afd route show: emitname | 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.