
playwright-skill
github.com/lackeyjb/playwright-skill →Let Claude drive a browser — without burning your entire context window
WHAT IT SOLVES
playwright-MCP dumps Playwright's full API surface as tools — great, but it eats context tokens for breakfast. This Skill flips the model: teach Claude the pattern, let it write and run its own scripts
WHY IT'S INTERESTING
Teach the model to fish, don't hand it every fish-shaped tool
The MCP approach registers every Playwright method as a tool call, so Claude has to parse the full API description every turn — massive token overhead. playwright-skill takes a fundamentally different path: give Claude a lightweight instruction set (a 'Skill'), and let it write its own Playwright scripts, execute them, and read the results. Way less context, way more autonomy
2.7k stars — the pain point is real
2,700+ stars and 189 forks for a Claude Code Skill — that tells you developers are genuinely hurting from context overhead on the MCP path. This follows the Agent Skills spec properly. Claude writes, executes, and iterates on scripts — not a toy demo, something you'd actually slot into a dev workflow
「Less context than playwright-MCP」
TECH GUESS
TypeScript, built on the Playwright library, packaged as a Claude Code Agent Skill
DEEP DIVE
Teach a Model to Fish
playwright-MCP exposes every Playwright API method as a separate tool call, forcing Claude to load the entire API description into context each time. playwright-skill flips this: it gives Claude a lightweight SKILLS.md guide and lets it write, execute, and evaluate Playwright scripts on its own.
This is a fundamental architectural difference. MCP is "handing the model a fish" — one tool definition per method, burning context just to register them. The Skill approach is "teaching the model to fish" — tell it what Playwright can do and how to write it, then let the model handle everything autonomously. Context usage drops sharply; autonomy actually increases.
A single Claude Code Skill pulling 189 points, 45 comments, and 2.7k stars on HN signals real pain. User wild_egg captured the sentiment: "This was on my TODO list for the week, thanks for sharing! Now I just need to make a skill for using Jira and I can go back to the MCP-free life." When developers are actively trying to eliminate MCP from their workflow, something is broken in the current tooling paradigm.
The Real Use Case: Scriptable Manual Testing
Author syntax-sherlock was upfront: "this isn't meant to replace your real tests it's more for quick 'does my new feature work?' checks during local dev. Think of it like scriptable manual testing: Claude spits out the Playwright code faster than you would, but it's not CI-level coverage."
This is explicitly a dev-environment tool. You finish a feature branch, ask Claude to run Playwright against the happy path, get results in seconds instead of clicking through manually. Screenshots stay local in /tmp, but console output and page content do get sent to Anthropic. It follows the Agent Skills spec, so Claude's generated scripts can be tested, validated, and iterated — not a one-off toy but something embeddable in real workflows.
The Security Debate Is Worth Having
AftHurrahWinch raised a pointed concern: "run.js can run arbitrarily generated Node.js code. It is a trivial vector for command injection. This might be sufficient for an independent contractor or student. It shouldn't be used in a production agent."
Fair criticism. The Skill model fundamentally means the LLM generates arbitrary Node.js and executes it — security depends entirely on your execution sandbox. The author's response was honest: this is for dev environments, not production agents.
The "MCPs are deterministic, SKILLS.md isn't" thread got genuinely interesting. AftHurrahWinch argued MCP as a standard API provides deterministic execution while LLM-generated code doesn't. Others pushed back: when an LLM is choosing which MCP tool to call and interpreting results, the overall system behavior is non-deterministic regardless. Dragonwriter noted that "SKILLS.md relies on a deterministic code execution environment" — the code itself runs deterministically once generated. This debate is really about declarative APIs vs. generated code as abstraction layers, and there's no clean winner.
Who Should Use This (and Who Shouldn't)
Good fit: Frontend/full-stack devs doing quick local UI validation; anyone who finds MCP context overhead excessive and just wants Claude to run a Playwright script; indie developers or students doing rapid prototyping.
Bad fit: Production CI/CD pipelines requiring deterministic execution; teams handling sensitive data where sending page content to Anthropic is a non-starter; debugging scenarios that need full DevTools access — user kylemh nailed this: "how would claude then look at devwright window to see console output?" MCP still has real advantages for certain debugging workflows.
A Signal About Tooling Fatigue
playwright-skill's explosion to 2.7k stars isn't just about one tool. It reflects developer fatigue with over-engineered AI toolchains. The MCP ecosystem is expanding rapidly, with every tool registering dozens of method definitions, and context windows getting gobbled up in the process. The Skills spec offers a lighter path: instead of exposing every capability as an API call, teach the model to write code.
Wahnfrieden's HN comment cuts to the core: "Why not just ask the agent to use Playwright via CLI? ... Yes most MCP shouldn't be used." Sometimes the simplest approach wins. Not every browser interaction needs a dedicated tool definition — sometimes a model that knows how to write a script is enough. The 2.7k stars suggest a lot of developers are ready to agree.
Discussion (0)
- No comments yet — be the first.


