agentleFS
MathiasPaulenkoMathiasPaulenko/ai-toolkit/skills/wavexis-ci-cd/SKILL.md

WaveXis CI/CD Integration

Skill2 starsChanged 4 months agoMITView on GitHub

Integrate wavexis into CI/CD pipelines. CI assertions, visual regression, screenshots in PRs, deploy gates with CWV budgets, Docker serve mode.

  • Installs packages

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All assertions must pass for exit code 0.

    line 105
  2. Distinctive:

    Run wavexis in serve mode inside Docker to share a browser instance across CI jobs or team members.

    line 264

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

WaveXis CI/CD Integration

Description

Integrate wavexis into CI/CD pipelines — assertion patterns for automated gates, visual regression testing with baselines, batch processing for multiple URLs, Docker serve mode for shared browser instances, and GitHub Actions integration.

When to Invoke

  • Setting up CI/CD pipelines with wavexis
  • Writing CI assertions for automated gates
  • Configuring visual regression testing
  • Processing multiple URLs in batch mode
  • Running wavexis in Docker serve mode
  • Creating deploy gates with CWV/performance budgets
  • Integrating wavexis with GitHub Actions, GitLab CI, or Jenkins

Prerequisites

  • pip install wavexis[cdp]
  • Chrome or Edge installed (or Docker with Chrome image)
  • Basic familiarity with wavexis CLI (see wavexis-cli-automation skill)

CI Assertion Patterns

Overview

The --assert flag enables CI gate behavior: wavexis exits with code 0 on pass and 1 on fail. Assertions use comparison operators to validate page state, content, metrics, or responses.

Assertion operators

OperatorDescriptionExample
==Exact equalitytitle == "Welcome"
!=Inequalityurl != "https://error.example.com"
containsSubstring matchtext contains "Sign In"
!containsSubstring absencetext !contains "Error"
matchesRegex matchurl matches "https://.*\.example\.com"
!matchesRegex non-matchtitle !matches ".*Error.*"
>Greater thanlcp_ms > 0
>=Greater or equallcp_ms >= 2500
<Less thancls < 0.1
<=Less or equalinp_ms <= 200

Assertion examples

Title assertion

wavexis navigate https://example.com \
    --assert 'title == "Example Domain"' \
    --output result.json

URL assertion after redirect

wavexis navigate https://example.com/login \
    --input "#username" "admin" \
    --input "#password" "secret" \
    --click "#submit" \
    --assert 'url matches "https://example\.com/dashboard"' \
    --output result.json

Content assertion

wavexis navigate https://example.com \
    --assert 'text contains "Welcome"' \
    --assert 'text !contains "Error"' \
    --output result.json

CWV budget assertion

wavexis cwv https://example.com \
    --mobile \
    --throttle \
    --assert 'lcp_ms <= 2500' \
    --assert 'cls <= 0.1' \
    --assert 'inp_ms <= 200' \
    --output cwv-results.json

Multiple assertions

wavexis navigate https://example.com \
    --assert 'title == "Example Domain"' \
    --assert 'url matches "https://example\.com"' \
    --assert 'text contains "More information"' \
    --output result.json

All assertions must pass for exit code 0.

Output format

{
  "assert": "title == \"Example Domain\"",
  "result": "Example Domain",
  "status": "PASS"
}
{
  "assert": "title == \"Welcome\"",
  "result": "Example Domain",
  "status": "FAIL"
}

Exit codes

CodeMeaningCI behavior
0All assertions passedPipeline continues
1One or more assertions failedPipeline stops
2Error (navigation timeout, crash)Pipeline stops

Batch Processing

Batch command

Process multiple URLs in a single run:

wavexis batch urls.txt --format markdown --output-dir ./results/

Batch with assertions

wavexis batch urls.txt \
    --assert 'status_code == 200' \
    --assert 'title !matches ".*Error.*"' \
    --output-dir ./results/

Batch with screenshots

wavexis batch urls.txt \
    --screenshot \
    --full-page \
    --output-dir ./screenshots/

Batch with CWV

wavexis batch urls.txt \
    --cwv \
    --mobile \
    --throttle \
    --assert 'lcp_ms <= 2500' \
    --output-dir ./cwv-results/

Batch options

OptionTypeDefaultDescription
--formatstrmarkdownOutput format: markdown, json, html
--output-dirstr./output/Output directory
--screenshotflagoffTake screenshots
--full-pageflagoffFull page screenshots
--cwvflagoffMeasure Core Web Vitals
--assertstrNoneAssertion expression
--delayint0Delay between URLs in seconds
--concurrentint1Concurrent URL processing
--stealthflagoffEnable stealth mode
--timeoutint30000Per-URL timeout in ms

Batch URL file format

# One URL per line
# Lines starting with # are comments
# Blank lines are ignored

https://example.com/page-1
https://example.com/page-2
https://example.com/page-3

Visual Regression Testing

visual-diff command

Compare a page screenshot against a baseline image:

wavexis visual-diff https://example.com \
    --baseline ./baselines/homepage.png \
    --output ./diffs/homepage-diff.png \
    --threshold 0.1

Generating baselines

wavexis screenshot https://example.com \
    --full-page \
    --output ./baselines/homepage.png

Visual diff with assertion

wavexis visual-diff https://example.com \
    --baseline ./baselines/homepage.png \
    --threshold 0.1 \
    --assert 'diff_percentage <= 0.1' \
    --output ./diffs/homepage-diff.png

Visual diff options

OptionTypeDefaultDescription
--baselinestrrequiredPath to baseline image
--outputstrstdoutDiff output path
--thresholdfloat0.1Pixel difference threshold (0-1)
--full-pageflagoffFull page comparison
--viewportstr1920x1080Viewport size
--assertstrNoneAssertion expression
--wait-forstrNoneWait for selector before screenshot

Visual diff output

{
  "diff_percentage": 0.03,
  "pixels_changed": 1245,
  "total_pixels": 41472,
  "status": "PASS"
}

Baseline management

  • Store baselines in git — commit baseline images to the repo.
  • Update baselines intentionally — re-generate after approved UI changes.
  • Use per-viewport baselines — separate baselines for mobile and desktop.
  • Name baselines by page — baselines/homepage-desktop.png, baselines/homepage-mobile.png.

Docker Serve Mode

Overview

Run wavexis in serve mode inside Docker to share a browser instance across CI jobs or team members.

Docker Compose

version: "3.8"
services:
  wavexis:
    image: ghcr.io/mathiaspaulenko/wavexis:latest
    ports:
      - "9222:9222"
    environment:
      - WAVEXIS_PORT=9222
      - WAVEXIS_RATE_LIMIT=10
      - WAVEXIS_MAX_SESSIONS=5
    volumes:
      - ./output:/app/output
    restart: unless-stopped

Using serve mode

# Point wavexis at the serve instance
wavexis --serve http://localhost:9222 navigate https://example.com

# Run assertions against serve instance
wavexis --serve http://localhost:9222 cwv https://example.com \
    --mobile --throttle --assert 'lcp_ms <= 2500'

Serve mode benefits

  • Shared browser pool — reuse browser instances across jobs.
  • Faster CI — no browser launch overhead per job.
  • Resource control — limit concurrent sessions and rate limiting.
  • Team access — shared instance for local development and CI.

GitHub Actions Integration

Basic workflow

name: Wavexis Tests

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

jobs:
  wavexis:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Install wavexis
        run: pip install wavexis[cdp]

      - name: Install Chrome
        run: |
          wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
          sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
          sudo apt-get update && sudo apt-get install -y google-chrome-stable

      - name: Run assertions
        run: |
          wavexis navigate https://staging.example.com \
            --assert 'title == "Welcome"' \
            --assert 'text contains "Sign In"' \
            --output result.json

      - name: Run CWV gate
        run: |
          wavexis cwv https://staging.example.com \
            --mobile --throttle \
            --assert 'lcp_ms <= 2500' \
            --assert 'cls <= 0.1' \
            --assert 'inp_ms <= 200' \
            --output cwv.json

      - name: Run accessibility gate
        run: |
          wavexis axe https://staging.example.com \
            --tags wcag2a,wcag2aa \
            --impact-threshold serious \
            --assert \
            --output axe.json

      - name: Upload results
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: wavexis-results
          path: |
            result.json
            cwv.json
            axe.json

Visual regression workflow

name: Visual Regression

on:
  pull_request:
    branches: [main]

jobs:
  visual:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Install wavexis
        run: pip install wavexis[cdp]

      - name: Install Chrome
        run: |
          wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
          sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
          sudo apt-get update && sudo apt-get install -y google-chrome-stable

      - name: Visual diff
        run: |
          wavexis visual-diff https://staging.example.com \
            --baseline ./baselines/homepage.png \
            --threshold 0.1 \
            --assert 'diff_percentage <= 0.1' \
            --output ./diffs/homepage-diff.png

      - name: Upload diff
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: visual-diff
          path: ./diffs/

Deploy gate workflow

name: Deploy Gate

on:
  push:
    branches: [main]

jobs:
  deploy-gate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Install wavexis
        run: pip install wavexis[cdp]

      - name: Install Chrome
        run: |
          wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
          sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
          sudo apt-get update && sudo apt-get install -y google-chrome-stable

      - name: Batch smoke tests
        run: |
          wavexis batch ./urls/production.txt \
            --assert 'status_code == 200' \
            --assert 'title !matches ".*Error.*"' \
            --output-dir ./smoke-results/

      - name: CWV deploy gate
        run: |
          wavexis cwv https://production.example.com \
            --mobile --throttle \
            --assert 'lcp_ms <= 2500' \
            --assert 'cls <= 0.1' \
            --assert 'inp_ms <= 200' \
            --output ./cwv-gate.json

      - name: Deploy
        if: success()
        run: echo "All gates passed — deploying..."

Multi-Action YAML for CI

CI assertion template

actions:
  - navigate:
      url: https://staging.example.com
      wait_until: networkidle
  - assert:
      title: "== Welcome"
      url: "matches https://staging\\.example\\.com"
      text: "contains Sign In"
  - screenshot:
      full_page: true
      output: ./screenshots/staging.png
  - cwv:
      mobile: true
      throttle: true
      budget:
        LCP_ms: 2500
        CLS: 0.1
        INP_ms: 200
  - axe:
      tags:
        - wcag2a
        - wcag2aa
      impact_threshold: serious
      assert: true
      output: ./axe-results.json

Best Practices

  • Use --assert for all CI gates — exit codes drive pipeline decisions.
  • Save outputs as artifacts — use --output and upload artifacts for debugging.
  • Use batch for smoke tests — verify multiple pages after deploy.
  • Store baselines in git — visual regression baselines should be version-controlled.
  • Set thresholds carefully — too strict causes flaky CI; too loose misses regressions.
  • Use serve mode for large pipelines — share browser instances across jobs.
  • Run CWV with --throttle — simulate real-world conditions in CI.
  • Run axe with --impact-threshold — focus on serious/critical issues in CI.
  • Use --wait-for for SPAs — ensure dynamic content is loaded before assertions.
  • Set per-URL timeouts in batch — prevent one slow page from blocking the pipeline.

Common Pitfalls

  • Not handling exit code 2 — code 2 means error, not assertion failure; handle differently.
  • Baselines out of date — update baselines after intentional UI changes.
  • Visual diff too strict — --threshold 0.01 causes flaky failures from anti-aliasing.
  • Not using --throttle for CWV — lab data without throttle doesn't reflect real users.
  • Batch without --delay — hammering a staging server can cause false failures.
  • Not uploading artifacts — without outputs, CI failures are impossible to debug.
  • Serve mode without rate limiting — concurrent jobs can overwhelm the browser pool.
  • Assertions on dynamic content — use --wait-for before asserting on SPA content.

References

  • references/ci-assertions.md — Assertion patterns and exit codes
  • references/visual-diff.md — Visual regression setup and baselines
  • assets/workflows/github-actions-wavexis.yml — GitHub Actions workflow
  • assets/docker/docker-compose.yml — Docker Compose for serve mode
  • assets/templates/ci-assertion.yml — CI assertion YAML template

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.