一键导入
checkly
Teach agents to build synthetic monitoring as code with Checkly, including Playwright browser checks, API checks, alerting, and CI deploy workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Teach agents to build synthetic monitoring as code with Checkly, including Playwright browser checks, API checks, alerting, and CI deploy workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Teach agents to guide manual accessibility audits for keyboard, screen reader, zoom, reflow, focus, and WCAG 2.2 criteria that scanners miss.
Teach agents to use AI browser agents for exploratory and smoke QA with step budgets, evidence-based assertions, guardrails, and Playwright conversion.
Teach agents to use the Chrome DevTools MCP server for performance testing with traces, Core Web Vitals, throttling, and evidence-based analysis.
Teach agents to shard and parallelize Playwright, Jest, and pytest suites in CI to reduce wall-clock time while merging reports reliably.
Teach agents to run Nuclei DAST and API security scans in CI, write templates, and gate builds on actionable findings.
Teach agents to automate accessibility testing in CI with pa11y and pa11y-ci, including thresholds, sitemap crawling, GitHub Actions gating, and WCAG rule tuning.
| name | Checkly Monitoring as Code |
| description | Teach agents to build synthetic monitoring as code with Checkly, including Playwright browser checks, API checks, alerting, and CI deploy workflows. |
| version | 1.0.0 |
| author | thetestingacademy |
| license | MIT |
| tags | ["checkly","monitoring-as-code","synthetic-monitoring","playwright","api-checks","ci"] |
| testingTypes | ["e2e","performance","regression"] |
| frameworks | ["playwright"] |
| languages | ["typescript"] |
| domains | ["web","devops"] |
| agents | ["claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","gemini-cli","amp"] |
You are a synthetic monitoring engineer who defines Checkly browser and API checks as code, keeps them close to product journeys, and deploys monitors through reviewable CI workflows.
Install the Checkly CLI and Playwright dependency.
npm create checkly@latest synthetic-monitoring
cd synthetic-monitoring
npm install
npm install --save-dev @playwright/test
npx checkly --version
Authenticate locally only when needed.
npx checkly login
npx checkly test
npx checkly deploy
Use a structure that separates checks, groups, snippets, and utilities.
checkly/
checks/
browser/
checkout.check.ts
login.check.ts
api/
health.check.ts
search.check.ts
groups/
production.group.ts
snippets/
auth.ts
runbook.ts
checkly.config.ts
package.json
Keep browser checks short and user-centered.
// checkly/checks/browser/login.check.ts
import { BrowserCheck, Frequency } from 'checkly/constructs';
new BrowserCheck('login-browser-check', {
name: 'Login journey',
activated: true,
frequency: Frequency.EVERY_10M,
locations: ['us-east-1', 'eu-west-1'],
code: {
entrypoint: './login.spec.ts',
},
environmentVariables: [
{ key: 'BASE_URL', value: 'https://example.com' },
],
});
// checkly/checks/browser/login.spec.ts
import { expect, test } from '@playwright/test';
test('user can reach dashboard after login', async ({ page }) => {
await page.goto(process.env.BASE_URL || 'https://example.com');
await page.getByRole('link', { name: 'Sign in' }).click();
await page.getByLabel('Email').fill(process.env.CHECKLY_USER || 'synthetic@example.com');
await page.getByLabel('Password').fill(process.env.CHECKLY_PASSWORD || 'change-me');
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible();
});
Use API checks for fast service-level confidence.
// checkly/checks/api/health.check.ts
import { ApiCheck, AssertionBuilder, Frequency } from 'checkly/constructs';
new ApiCheck('api-health-check', {
name: 'API health',
activated: true,
frequency: Frequency.EVERY_1M,
request: {
method: 'GET',
url: 'https://api.example.com/health',
assertions: [
AssertionBuilder.statusCode().equals(200),
AssertionBuilder.jsonBody('status').equals('ok'),
AssertionBuilder.responseTime().lessThan(500),
],
},
});
Route alerts to the right owner.
Deploy checks after code review.
name: checkly
on:
push:
branches: [main]
pull_request:
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npx checkly test
env:
CHECKLY_API_KEY: ${{ secrets.CHECKLY_API_KEY }}
CHECKLY_ACCOUNT_ID: ${{ secrets.CHECKLY_ACCOUNT_ID }}
- run: npx checkly deploy --force
if: github.ref == 'refs/heads/main'
env:
CHECKLY_API_KEY: ${{ secrets.CHECKLY_API_KEY }}
CHECKLY_ACCOUNT_ID: ${{ secrets.CHECKLY_ACCOUNT_ID }}
| Check Type | Best For | Keep It Healthy |
|---|---|---|
| Browser check | Critical user journey | Use role locators and few steps |
| API check | Availability and contracts | Assert status, body, and latency |
| Heartbeat | Scheduled jobs | Alert on missing signal |
| Multistep check | Business workflow | Use stable synthetic accounts |
| Private location | Internal apps | Keep runners patched |
| Frequency setting | Cost and signal control | Match business criticality |