Installation
Supported Tools
| Tool | Link |
|---|---|
| Claude Code | code.claude.com/docs/en/skills |
| Cursor | cursor.com/docs/context/skills |
| VS Code Copilot | code.visualstudio.com/docs/copilot/customization/agent-skills |
| Gemini CLI | geminicli.com/docs/cli/skills |
How It Works
An Agent Skill is a directory containing aSKILL.md manifest and reference documents. The manifest declares metadata, core instructions, and an index of guides. Reference documents contain topic-specific guidance the agent reads on demand.
Progressive Disclosure
Skills use a three-stage loading model to minimize context window usage:| Stage | What Loads | Token Cost |
|---|---|---|
| Idle | Skill name and one-line description | ~50 tokens |
| Activated | SKILL.md manifest with core principles and guide index | ~500 tokens |
| Reference pull | Individual guide files, loaded selectively per task | ~200-800 tokens per guide |
debugging.md and flaky-tests.md rather than every guide in the skill.
This differs from loading full documentation into a system prompt (30,000+ tokens upfront regardless of relevance) or RAG retrieval (variable quality, no opinionated guidance).
Core Principles
TheSKILL.md manifest in the core skill defines ten principles applied to all generated code:
- Prefer accessible selectors (
getByRole,getByLabel) over CSS/XPath - Never use hard timeouts. Wait on conditions
- Use web-first assertions that auto-retry
- Isolate every test. No shared state
- Centralize URLs via
baseURL - Retries:
2in CI,0locally - Traces:
'on-first-retry' - Share state via fixtures, not module globals
- One behavior per test
- Mock external dependencies only. Never mock your own app
Coverage
Core
Locators, locator strategy, assertions and waiting, fixtures and hooks, forms and validation, drag and drop, file operations, test data management, test organization, authentication flows, OAuth and SSO, API testing, CRUD testing, network mocking, and when-to-mock decision framework.Framework Recipes
React, Next.js (App Router and Pages Router), Vue, Angular. Framework-specific selectors, routing, SSR/hydration patterns.Visual and Accessibility
Visual regression withtoHaveScreenshot(), axe-core integration, keyboard navigation, WCAG compliance.
Debugging
Trace viewer, UI mode, error index, flaky test diagnosis, common pitfalls, error and edge case handling.Advanced
WebSockets, Service Workers, PWAs, Canvas/WebGL, Electron, browser extensions, iframes, Shadow DOM, i18n, multi-user collaboration, security testing, performance testing.CI/CD
| Provider | Coverage |
|---|---|
| GitHub Actions | Workflow configuration, artifact upload, sharding with matrix strategy |
| GitLab CI | Pipeline stages, browser caching, parallel jobs |
| CircleCI | Orb usage, test splitting, resource classes |
| Azure DevOps | YAML pipelines, hosted agent configuration |
| Jenkins | Declarative pipelines, Playwright in Docker |
| Docker | Official Playwright image, dependency caching, multi-stage builds |
| Cross-cutting | Test sharding (--shard=N/M), reporting aggregation, code coverage collection |
Page Object Model
POM implementation patterns with a decision guide for choosing between POMs, fixtures, and helper functions. Includes trade-off analysis.Migration
API mapping tables and incremental migration strategies:- Cypress to Playwright:
cy.get()topage.locator(),cy.intercept()topage.route() - Selenium/WebDriver to Playwright: driver setup, element interaction, and wait strategy translation
Playwright CLI
Browser commands, request mocking, script execution, session and storage management,codegen for test generation, tracing, screenshots, video recording, and device emulation.
Example Prompts
The skill activates based on task inference. These prompts demonstrate what triggers the agent to load relevant guides:| Prompt | Guides Loaded |
|---|---|
| ”Write Playwright tests for a multi-step form wizard with validation” | Locator strategy, form validation, test organization |
| ”Optimize our CI pipeline time with test sharding” | CI/CD, sharding, matrix-based parallel execution |
| ”This checkout test passes locally but times out in CI” | Debugging, flaky test diagnosis, CI environment differences |
| ”Test the real-time collaboration feature in our app” | Multi-user testing, WebSocket, SSE interception |
| ”Migrate our Cypress login tests to Playwright” | Migration mapping tables, authentication patterns |
| ”Add visual regression tests for dashboard components” | Visual testing, toHaveScreenshot(), CI artifact handling |
Related
GitHub Repository
Full source and all guides. MIT licensed.
Agent Skills Specification
The open standard defining how skills, manifests, and progressive disclosure work.
TestDino MCP
Connect AI assistants to your test data.