npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iflow-mcp/verdexhq-verdex-mcp

v0.1.6

Published

Enhanced browser automation with DOM intelligence

Downloads

59

Readme

npm version License Playwright MCP


Verdex helps AI coding assistants write robust Playwright tests. It combines:

  • MCP tools for token-efficient DOM exploration (100-1K tokens vs 10K+ dumps)
  • Cursor rules & Claude skills that teach LLMs modern Playwright patterns and the Container → Content → Role methodology
  • Multi-role browser isolation for testing authenticated flows in parallel

AI assistants don't know how to write good Playwright tests or efficiently explore page structure. Verdex gives them both the tools and the knowledge.


The Difference

Without Verdex — AI generates brittle selectors:

await page.getByRole('button', { name: 'Add to Cart' }).nth(8).click(); // 💀 Breaks on reorder
await page.locator('.btn-primary').first().click(); // 💀 Breaks on CSS change

With Verdex — AI generates stable selectors:

await page
  .getByTestId('product-card')
  .filter({ hasText: 'iPhone 15 Pro' })
  .getByRole('button', { name: 'Add to Cart' })
  .click(); // ✅ Survives any DOM restructuring

Verdex vs Playwright MCP

| | Playwright MCP | Verdex | |---|---|---| | Purpose | General browser automation | E2E test authoring | | AI Guidance | None — raw browser tools | Built-in rules teach stable patterns | | Selector Quality | .nth(), CSS classes, deep chains | Container → Content → Role | | Multi-User Testing | Manual context management | Isolated roles with pre-loaded auth | | Test Maintenance | Tests break on DOM changes | Tests survive refactors |

Playwright MCP gives AI a browser. Verdex teaches AI to write tests like a senior QA engineer.


Quick Start

1. Add MCP Server

{
  "mcpServers": {
    "verdex": {
      "command": "npx",
      "args": ["@verdex/mcp@latest"]
    }
  }
}

2. Add AI Instructions

For Cursor:

mkdir -p .cursor/rules
cp node_modules/@verdex/mcp/.cursor/rules/*.mdc .cursor/rules/

For Claude: Use skills from node_modules/@verdex/mcp/.claude/skills/verdex-playwright-complete/

3. Write Tests

User: "Write a test that adds an iPhone to the cart"

AI (with Verdex):
  → Navigates to page, takes snapshot
  → Uses resolve_container to find stable test IDs
  → Uses inspect_pattern to find unique content
  → Generates container-scoped, role-based selector
  → Writes test following Playwright best practices

👉 Try the 60-second demo — See the full workflow in action


The Workflow: Explore → Select → Test

Phase 1: Explore

Use browser tools to understand the app:

browser_initialize()
browser_navigate("https://shop.example.com")
browser_click("e5")  // Click using ref from snapshot
browser_snapshot()   // See what changed

Phase 2: Select

Build stable selectors with progressive DOM exploration:

resolve_container("e25")    // Find containers with test IDs
inspect_pattern("e25", 2)   // Analyze sibling structure  
extract_anchors("e25", 1)   // Mine deep content if needed

Phase 3: Test

Write idiomatic Playwright tests:

test('should add product to cart', async ({ page }) => {
  await page.goto('/products');
  
  await page
    .getByTestId('product-card')
    .filter({ hasText: 'iPhone 15 Pro' })
    .getByRole('button', { name: 'Add to Cart' })
    .click();
  
  await expect(page.getByText('Item added')).toBeVisible();
});

Tools Reference

Browser Tools

| Tool | Purpose | |------|---------| | browser_initialize | Start browser session | | browser_navigate | Navigate to URL, capture snapshot | | browser_snapshot | Get accessibility tree with refs | | browser_click | Click element by ref | | browser_type | Type into input by ref | | wait_for_browser | Wait for dynamic content | | browser_close | Clean shutdown |

DOM Exploration Tools

| Tool | Purpose | |------|---------| | resolve_container | Find container hierarchy with stable anchors | | inspect_pattern | Analyze siblings at specific ancestor level | | extract_anchors | Deep scan for headings, labels, unique text |

Multi-Role Tools

| Tool | Purpose | |------|---------| | select_role | Switch between authenticated contexts | | list_current_roles | View all configured roles | | get_current_role | Check active auth context |


Multi-Role Configuration

Test different user roles in isolated browser contexts:

{
  "mcpServers": {
    "verdex": {
      "command": "npx",
      "args": [
        "@verdex/mcp@latest",
        "--role", "admin", "/path/to/admin-auth.json", "https://admin.example.com",
        "--role", "user", "/path/to/user-auth.json", "https://app.example.com"
      ]
    }
  }
}

Uses Playwright's storageState format for auth files.


AI Instructions

The rules and skills are essential — they teach AI the patterns that make selectors stable.

What They Teach

| Guide | Purpose | |-------|---------| | Workflow Discovery | Interactive exploration, mapping user journeys | | Selector Writing | Container → Content → Role pattern | | Playwright Patterns | Idiomatic test structure, assertions, auth | | Setup Analysis | Understanding existing test codebases | | Audit Reports | Generating test health assessments |

Installation

Cursor Rules (.cursor/rules/):

cp node_modules/@verdex/mcp/.cursor/rules/*.mdc .cursor/rules/

Claude Skills (.claude/skills/):

  • Works automatically with Claude Code and Claude Agent SDK
  • For Claude.ai: ZIP and upload via Settings > Features

Resources


Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Areas we'd love help with:

  • Token efficiency benchmarks
  • Additional browser actions (drag-and-drop, hover)
  • Cross-origin iframe handling
  • More examples and tutorials

License

Apache 2.0 — see LICENSE


Tools + Knowledge = Tests That Don't Break

⭐ Star on GitHub · 📦 npm · 💬 Discussions