Claude Code Integration: AI-Powered Monitoring from Your Terminal
Set up supaguard with Claude Code to create, test, and deploy synthetic monitors directly from your codebase using AI skills. Install the CLI, add skills, and start monitoring in minutes.
Use supaguard with Claude Code to create synthetic monitors directly from your codebase. Claude reads your source code, generates resilient Playwright scripts, tests them in the cloud, and deploys them as recurring checks — all without leaving your terminal.
Why Claude Code + supaguard?
Traditional monitoring setup means writing scripts by hand, configuring schedules, and managing alerting — all separate from your codebase. With the supaguard skill for Claude Code:
- Zero context switching — describe what you want to monitor in plain English
- Code-aware scripts — Claude reads your routes, selectors, and forms to generate accurate Playwright tests
- Cloud-tested before deploy — scripts run in supaguard's cloud runner before going live
- No test files in your repo — monitoring scripts live in supaguard, not your codebase
Prerequisites
- A supaguard account (sign up free — no credit card required)
- Claude Code installed and configured
- The supaguard CLI installed and logged in
Step 1: Log In to the supaguard CLI
Install the CLI globally and log in:
npm install -g supaguard
supaguard loginThis opens your browser to authenticate. Once logged in, the CLI will display a list of your organizations — select the one you want to monitor.
[!TIP] See the full CLI documentation for all available commands, regions, and schedule options.
Verify your login:
supaguard whoamiStep 2: Install the supaguard and Playwright Testing Skills
Skills teach Claude Code how to work with supaguard. Install both with:
npx skills add AbsolutelySkilled/AbsolutelySkilled --skill supaguard
npx skills add AbsolutelySkilled/AbsolutelySkilled --skill playwright-testingWhat each skill does:
| Skill | Purpose |
|---|---|
supaguard | Create, test, and deploy production monitoring checks from your source code |
playwright-testing | Write and debug Playwright e2e tests for CI/CD pipelines |
[!NOTE] The
supaguardskill is for production monitoring — checks that run on a schedule and alert you when things break. Theplaywright-testingskill is for CI/CD testing — tests that run in your pipeline before deploy. Use both together for full coverage.
Step 3: Using the Skills
Create a monitoring check
Open Claude Code in your project directory and use the /supaguard slash command or describe what you want to monitor:
/supaguard Monitor the login flow on our production app. Verify that users
can sign in with email/password and see the dashboard.Claude will:
- Analyze your source code — reads routes, components, and selectors to understand your app
- Generate a Playwright script — writes a monitoring script tailored to your actual UI
- Test in the cloud — runs the script in supaguard's cloud runner to verify it works
- Deploy interactively — prompts you for check name, schedule, regions, and alert channels
Write e2e tests for CI
Ask Claude to write tests using the playwright-testing skill:
Write Playwright e2e tests for our checkout flow. Cover the happy path
and the case where payment fails.This generates tests in your project's test directory, ready for your CI pipeline.
Common commands you can ask Claude
| Request | What happens |
|---|---|
| "Monitor our signup flow" | Generates and deploys a recurring check |
| "Add monitoring for the API health endpoint" | Creates an API check with assertions |
| "Our login check is failing, debug it" | Analyzes the failure and suggests fixes |
| "Write e2e tests for the settings page" | Creates Playwright tests for CI |
| "Monitor checkout in US and Europe regions" | Deploys a multi-region check |
Example: full monitoring setup
Here's what a typical session looks like:
You: Set up monitoring for our app at https://app.example.com.
Monitor the login flow and the main dashboard.
Claude: I'll analyze your codebase and set up monitoring checks.
[reads source code, identifies routes and selectors]
I've generated two monitoring scripts:
1. Login Flow Check
- Navigates to /login
- Fills email and password fields
- Submits and verifies dashboard loads
- Schedule: every 10 minutes
- Regions: US East, EU West
2. Dashboard Health Check
- Verifies dashboard loads with data
- Checks navigation menu is functional
- Schedule: every 10 minutes
- Regions: US East, EU West, India
Both scripts passed cloud testing. Deploy these checks? [Y/n]Troubleshooting
"CLI not found" or authentication errors
Re-run the login flow:
supaguard loginIf the browser doesn't open automatically, copy the URL from the terminal and open it manually.
Skills not activating
Verify the skills are installed:
ls .claude/skills/You should see supaguard/ and playwright-testing/ directories. If not, re-run the install commands from Step 2.
Script fails during cloud testing
Common causes:
- Selector mismatch — your production UI differs from what Claude read in source code. Provide more specific hints about your UI structure.
- Authentication required — use environment variables in supaguard for test credentials instead of hardcoding them.
- Timeout — monitoring scripts must complete within 60 seconds. Simplify the flow or break it into multiple checks.
Firewall blocking cloud runners
If your app is behind a firewall, you'll need to allowlist supaguard's IP ranges. See Firewall Allowlisting.
What's Next?
- Configure alerts — get notified on Slack, PagerDuty, or email when checks fail
- Environment variables — securely manage test credentials
- Writing Playwright tests — learn patterns for reliable monitoring scripts
- Smart Retries — how supaguard eliminates false alarms
CI/CD Integration Guide
Integrate supaguard into your deployment pipeline. Learn how to trigger synthetic checks after every deploy to ensure zero regressions in production.
Communication Channels: Email, Slack, PagerDuty, Webhooks
Set up notification channels for supaguard alerts. Configure Email, Slack webhooks, PagerDuty, Discord, and custom webhooks with payload examples.