Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: playwright-cli
description: Automate browser interactions, test web pages and work with Playwright tests.
allowed-tools: Bash(playwright-cli:*) Bash(npx:*) Bash(npm:*)
allowed-tools: Bash(playwright-cli:*) Bash(npx playwright:*) Bash(npx --no-install playwright:*)
---

# Browser Automation with playwright-cli
Expand Down Expand Up @@ -399,6 +399,8 @@ playwright-cli kill-all

## Installation

Package installation and custom `npm` scripts may require separate approval.

If global `playwright-cli` command is not available, try a local version via `npx playwright cli`:

```bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: playwright-trace
description: Inspect Playwright trace files from the command line — list actions, view requests, console, errors, snapshots and screenshots.
allowed-tools: Bash(npx:*)
allowed-tools: Bash(npx playwright trace:*)
---

# Playwright Trace CLI
Expand Down
4 changes: 4 additions & 0 deletions tests/mcp/cli-misc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ test('install workspace w/skills', async ({ cli }, testInfo) => {

const skillFile = testInfo.outputPath('.claude', 'skills', 'playwright-cli', 'SKILL.md');
expect(fs.existsSync(skillFile)).toBe(true);
const skillContents = fs.readFileSync(skillFile, 'utf-8');
expect(skillContents.match(/^allowed-tools: .*/gm)).toEqual([
'allowed-tools: Bash(playwright-cli:*) Bash(npx playwright:*) Bash(npx --no-install playwright:*)',
]);

const referencesDir = testInfo.outputPath('.claude', 'skills', 'playwright-cli', 'references');
const references = await fs.promises.readdir(referencesDir);
Expand Down
3 changes: 3 additions & 0 deletions tests/mcp/init-agents.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ test('init-skills installs all skills', async ({ }) => {
for (const skill of ['playwright-cli', 'playwright-component-testing', 'playwright-trace'])
expect(fs.existsSync(path.join(baseDir, '.claude', 'skills', skill, 'SKILL.md'))).toBe(true);
expect(fs.existsSync(path.join(baseDir, '.claude', 'skills', 'playwright-cli', 'references', 'tracing.md'))).toBe(true);

const traceSkill = fs.readFileSync(path.join(baseDir, '.claude', 'skills', 'playwright-trace', 'SKILL.md'), 'utf-8');
expect(traceSkill.match(/^allowed-tools: .*/gm)).toEqual(['allowed-tools: Bash(npx playwright trace:*)']);
});

test('init-skills installs into .agents with --loop agents', async ({ }) => {
Expand Down
Loading