Modern QA2026Skill Token Breakdown: The Same Test via the Playwright CLI — tiles
Log inJoin
54 / 168 · 01 Agent Skills for Browser Automation · Token Budget Analysis: Real Numbers← prev⊞ allnext →☰ Read as one page

8.4Skill Token Breakdown: The Same Test via the Playwright CLI

Skill Loading Cost (Once)

Component Tokens
SKILL.md injection (from playwright-cli install --skills) ~1,000, once
Skill description in tool list ~50 per turn

The Same 20-Step Login Test via CLI

Step 0:  SKILL.md loaded                              → ~1,000 tokens (once)

Step 1:  Bash("playwright-cli open $URL")             → ~60 tokens
Step 2:  Bash("playwright-cli snapshot")              → ~40 (returns a file path)
Step 3:  Agent reads login-form snapshot YAML         → ~1,500 tokens (small page)
Step 4:  Bash("playwright-cli fill e3 'user@t.com'")  → ~60
Step 5:  Bash("playwright-cli fill e4 '********'")    → ~60
Step 6:  Bash("playwright-cli click e5")              → ~55
Step 7:  Bash("playwright-cli snapshot")              → ~40
Step 8:  Agent reads dashboard snapshot YAML          → ~4,000 tokens (bigger page)
Step 9:  Bash("playwright-cli goto $URL/profile")     → ~60
Step 10: Bash("playwright-cli click e12")             → ~55   (ref from snapshot)
Step 11: Bash("playwright-cli fill e14 '555-0100'")   → ~60
Step 12: Bash("playwright-cli click e15")             → ~55
Step 13: Bash("playwright-cli snapshot")              → ~40
Step 14: Agent reads confirmation snapshot YAML       → ~2,000 tokens
Step 15: Bash("playwright-cli screenshot")            → ~50   (returns a file path,
                                                               image NOT loaded)
Steps 16-20: verification + close                     → ~300

Skill description (per turn): 50 × 20 =                ~1,000 tokens
Skill initial load:                                    ~1,000 tokens
Commands + responses:                                  ~1,000 tokens
Snapshot reads (3 of them, on demand):                 ~7,500 tokens
────────────────────────────────────────────────────
TOTAL (browser-specific):                              ~10,500 tokens

Note what the agent did not pay for: seventeen of the twenty steps returned a ref confirmation or a file path costing dozens of tokens. The agent read page state exactly three times — when it actually needed refs or verification — instead of having eight accessibility trees streamed at it whether it wanted them or not.

The Honest Caveat

Per-step arithmetic like the above can suggest ratios of 20-30x or more, and early CLI-skill advocacy (this course's own earlier editions included) leaned on such estimates. Resist the temptation. In real end-to-end tasks the CLI agent still reads snapshots on demand, still reasons in tokens, and still occasionally loads a screenshot — which is why Microsoft's measured full-task numbers come out at ~4x (27k vs 114k), stretching toward ~10x on long sessions where MCP's per-turn schema tax compounds. Quote the measured number; explain the mechanism; don't inflate.