Live · Updated daily
Tue · July 28 2026 · Vol.001
The daily record of applied AI
Independent · No paywall · Human-reviewed
Subscribe
Built With AI /Claude Teaches Itself Playwright, Skips
// Built With AI

Claude Teaches Itself Playwright, Skips the Middleman

A developer built a leaner Playwright skill for Claude Code to avoid token limit headaches, trading full context for speed.
LDLatentDaily Desk Jul 23, 2026 2 min read

Here’s a new take on browser automation: teach the AI to write the code, not just watch you do it. Developer lackeyjb got fed up with the official Playwright MCP (Model Context Protocol) server devouring Claude’s 200K token context window. Their solution? A new “Playwright Skill” that’s just 314 lines of instructions.

Less Context, More Action

Instead of sending the entire accessibility tree snapshot on every interaction—the main culprit behind the token bloat—this skill has Claude generate and execute Playwright code directly. It returns a screenshot and console output. That’s the whole loop. The full Playwright API docs only load if Claude needs to reference them. It’s a classic case of trading exhaustive context for focused action.

“I got tired of playwright-mcp eating through Claude’s 200K token limit, so I built this using the new Claude Skills system. Built it with Claude Code itself.”

The Trade-Offs Are the Point

On Hacker News, the reaction was a mix of validation and caution. User wahnfrieden essentially said, “I told you so,” commenting, “Why not just ask the agent to use Playwright via CLI? That’s what I do and it works fine… Yes most MCP shouldn’t be used.” But kylemh raised a valid counterpoint: “but how would claude then look at devtools for the playwright window to see console output?” The skill’s approach is inherently less perceptive; it only sees what the code it runs tells it to see.

Security was another immediate concern. AftHurrahWinch pointed out a critical difference: “MCPs are deterministic, SKILLS.md isn’t. Also run.js can run arbitrarily generated Node.js code. It is a trivial vector for command injection.” This isn’t a tool for a production pipeline. It’s for local development, a sentiment echoed by syntax-sherlock: “Think of it like scriptable manual testing: Claude spits out the Playwright code faster than you would, but it’s not CI-level coverage.”

Built to Get Out of the Way

The appeal is its simplicity. It turns Claude into a incredibly fast pair programmer for writing browser scripts, not a heavy-duty testing framework. For the developer who just wants to ask, “Hey, does this button work now?” without spinning up a complex MCP server, it’s a clever hack. It acknowledges that sometimes, the smartest AI tool is the one that knows when to stop being so clever and just run the code.

Source: HackerNews