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

@ardygh/qa-agent

v0.1.6

Published

Reusable QA agent for Cursor and Claude Code: declare test users, environments, and scenarios in YAML, then run them via agent-browser from chat or CI.

Downloads

1,107

Readme

QA Agent

Reusable QA agent for Cursor and Claude Code. Define test users, environments, and scenarios in YAML, then run them via agent-browser from chat or CI.

Installation

# Install into your project (from npm)
npx @ardygh/qa-agent init

# Or install for specific platform only
npx @ardygh/qa-agent init --cursor
npx @ardygh/qa-agent init --claude

# Alternative: install from GitHub
npx github:ardalangh/qa-agent init

This installs:

  • Skills for Cursor/Claude (.cursor/skills/, .claude/skills/)
  • Slash commands (.cursor/commands/, .claude/commands/)
  • Rules for code assistance (.cursor/rules/)
  • Template config files (qa/)

Prerequisite: agent-browser must be installed:

npm i -g agent-browser
agent-browser install  # Downloads Chrome

Quick Start

  1. Define test users in qa/users.yaml:

    users:
      - id: customer-a
        role: customer
        email: [email protected]
        password_env: QA_CUSTOMER_PASSWORD  # Never inline passwords!
  2. Define environments in qa/environments.yaml:

    environments:
      staging:
        baseUrl: https://staging.example.com
        allowedDomains: [staging.example.com]
  3. Create a scenario in qa/scenarios/login.yaml:

    name: login-happy-path
    description: User can log in successfully
       
    requires:
      user_role: customer
       
    steps:
      - open: "{baseUrl}/login"
      - wait: { load: networkidle }
      - find: { label: "Email", action: fill, value: "[email protected]" }
      - find: { label: "Password", action: fill, value: "secret" }
      - find: { role: button, name: "Sign in", action: click }
      - wait: { url: "**/dashboard" }
      - expect: { visible: "[data-testid='user-menu']" }
      - screenshot: logged-in.png
  4. Run it from Cursor/Claude chat:

    /qa-run login --env staging

    Or from the command line:

    npx @ardygh/qa-agent run login --env staging

Slash Commands

| Command | Description | |---------|-------------| | /qa-run <scenario> | Run a scenario | | /qa-list | List scenarios, users, environments | | /qa-new | Create a new scenario interactively | | /qa-explore <env> | Exploratory testing | | /qa-report | View latest run report | | /qa-runs | List past runs | | /qa-trend | Show pass rate trends | | /qa-clean | Remove old run artifacts | | /qa-add-user | Add a test user | | /qa-add-env | Add an environment |

CLI Commands

npx @ardygh/qa-agent run <scenario> [--env <env>] [--user <user>] [--headed]
npx @ardygh/qa-agent list [--scenarios|--users|--envs]
npx @ardygh/qa-agent runs [--last N] [--failed] [--scenario X]
npx @ardygh/qa-agent trend [--days 30] [--scenario X]
npx @ardygh/qa-agent report [run-id]
npx @ardygh/qa-agent clean [--keep-last N] [--older-than 30d]
npx @ardygh/qa-agent doctor
npx @ardygh/qa-agent update

Scenario YAML Reference

Step Types

Navigation:

- open: "{baseUrl}/path"
- back: true
- forward: true
- reload: true

Wait:

- wait: { load: networkidle }
- wait: { url: "**/dashboard" }
- wait: { text: "Welcome" }
- wait: { selector: "#content", state: visible }
- sleep: 2000

Interaction:

- click: "#button"
- fill: { selector: "#email", value: "[email protected]" }
- type: { selector: "#search", value: "query" }
- press: "Enter"
- select: { selector: "#country", value: "US" }
- check: "#agree"
- hover: ".menu"

Semantic Find (recommended):

- find: { label: "Email", action: fill, value: "[email protected]" }
- find: { role: button, name: "Submit", action: click }
- find: { testid: "submit-btn", action: click }
- find: { placeholder: "Search...", action: fill, value: "query" }

Assertions:

- expect: { visible: "#content" }
- expect: { not_visible: ".loading" }
- expect: { url: "**/dashboard" }
- expect: { title_contains: "Dashboard" }
- expect: { text: { selector: "h1", equals: "Welcome" } }
- expect: { count: { selector: ".item", gte: 1 } }

Capture:

- screenshot: filename.png
- screenshot: { path: "full.png", full: true, annotate: true }
- snapshot: true

Run Artifacts

Each run creates a directory in qa/runs/<run-id>/:

  • result.json - Structured pass/fail data
  • report.md - Human-readable report
  • screenshots/ - Per-step screenshots
  • snapshots/ - Accessibility tree snapshots
  • video.webm - Session recording (if enabled)
  • network.har - Network log
  • console.json - Browser console messages

View the summary: qa/runs/SUMMARY.md

Security

  • Never inline passwords in YAML files
  • Use password_env to reference environment variables
  • Use auth_vault for agent-browser auth entries
  • Use state_file for exported sessions (store in qa/.secrets/, which is gitignored)

Configuration Files

| File | Purpose | |------|---------| | qa/users.yaml | Test user definitions | | qa/environments.yaml | Environment configs | | qa/scenarios/*.yaml | Test scenarios | | qa/runs.config.yaml | Retention and notification sinks | | qa/agent-browser.json | Browser settings |

GitHub-Direct Install

You can also install directly from GitHub without npm publish:

npx github:ardalangh/qa-agent init

License

MIT