From aj-geddes-useful-ai-prompts-4
Implements synthetic monitoring with Playwright to simulate user journeys, test API flows, and validate end-to-end workflows.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4This skill uses the workspace's default tool permissions.
- [Overview](#overview)
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Set up synthetic monitoring to automatically simulate real user journeys, API workflows, and critical business transactions to detect issues and validate performance.
Minimal working example:
// synthetic-tests.js
const { chromium } = require("playwright");
class SyntheticMonitor {
constructor(config = {}) {
this.baseUrl = config.baseUrl || "https://app.example.com";
this.timeout = config.timeout || 30000;
}
async testUserFlow() {
const browser = await chromium.launch();
const page = await browser.newPage();
const metrics = { steps: {} };
const startTime = Date.now();
try {
// Step 1: Navigate to login
let stepStart = Date.now();
await page.goto(`${this.baseUrl}/login`, { waitUntil: "networkidle" });
metrics.steps.navigation = Date.now() - stepStart;
// Step 2: Perform login
stepStart = Date.now();
await page.fill('input[name="email"]', "test@example.com");
await page.fill('input[name="password"]', "password123");
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Synthetic Tests with Playwright | Synthetic Tests with Playwright |
| API Synthetic Tests | API Synthetic Tests |
| Scheduled Synthetic Monitoring | Scheduled Synthetic Monitoring |