7.4Decision Matrix: When to Use What
Use Skills (CLI) When:
Your agent has filesystem access — Claude Code, Cursor, CI runners. The disk is the context-overflow valve; this is the whole trick.
Your agent juggles many tasks — writing code, running tests, AND driving a browser. Token budget must be shared. This is Microsoft's explicit positioning for the CLI.
You're in CI/CD — token costs compound across hundreds of test runs. CLI commands are cheap.
You want composability — CLI commands chain with other tools (grep, jq, awk) via pipes, and snapshots are greppable YAML files.
Your tests are procedural — "navigate here, click that, type this, verify that" flows.
# Skills shine here: scripted, ref-driven, fast
playwright-cli open https://app.example.com/login
playwright-cli snapshot # → YAML on disk: textbox "Email" [ref=e3], ...
playwright-cli fill e3 "test@example.com"
playwright-cli fill e4 "secret"
playwright-cli click e5
playwright-cli snapshot # → verify: heading "Dashboard" present
Use MCP When:
The agent is sandboxed without filesystem access — hosted chat surfaces, some web agents. If there's no disk to write snapshots to, inline state is the only option. This is the clearest MCP win, and it's Microsoft's own guidance.
IDE integrations that speak MCP natively — tooling that already plumbs MCP end to end.
Long autonomous sessions with continuous introspection — when the loop genuinely needs page state on every single step, streaming it may be simpler than reading files each time.
Non-developer users — MCP-based assistants allow "click the big blue button" without any tooling setup on the user's machine.
# MCP shines here: no filesystem available
Hosted agent: "Go to our app and check if all form fields have proper labels"
Agent: *receives accessibility tree inline — no disk to read from*
Agent: *reasons about ARIA attributes*
Agent: *reports accessibility violations*
Use Both When:
- Mixed environments — CLI in Claude Code and CI; MCP for the same flows when run from a sandboxed surface.
- Different test types — functional execution via CLI, MCP kept for environments and integrations that require it.
- Development vs CI — either transport during development, CLI in CI (cost optimization).