Skip to main content
By the end of this guide, your monitoring repository has one folder per service, shared defaults in a single config, a group per service with its own locations and variables, and a workflow that redeploys monitoring on every merge to main.
The Checkly check list filtered to Shop, showing the Shop API and Shop web groups with two checks each, tagged api and web
To follow along without your own app, clone the sample project. It monitors the Danube demo shop and its API.
To run this guide from your terminal or your coding agent, run npx checkly init in your project first. It installs the Checkly CLI and Checkly Skills for your agent. Then paste the prompt below into Claude Code, Cursor, Codex, or any agent that supports skills. It builds the same setup as this guide, proves it with npx checkly test --record, and stops for your confirmation before npx checkly deploy.
Prompt
The steps below are the same work done by hand, so you can see what the agent built and why each piece is there.

Step 1: One folder per service

The quickstart scaffold puts every check in a flat __checks__ folder. That works for four files and stops working at forty. Split it by the services in your system, so the folder tells you who owns a check and what it covers.
Project layout
Each service folder gets a group.ts and its checks. The config’s checkMatch glob finds check files at any depth, so nothing else changes when you add a folder.

Step 2: Shared settings in one config

Put the defaults every check should inherit in checkly.config.ts, and the alert channel they share next to the checks.
checkly.config.ts
__checks__/alert-channels.ts
Settings resolve from the most specific level: a value on the check wins over the group, which wins over the project. Keep logicalId stable. Changing it makes Checkly treat the project as new and drops its history.

Step 3: A group per service

A group holds the settings that are true for a whole service and lets you run or mute that service as a unit. The storefront runs from three regions so a regional CDN problem shows up as a single-location failure.
__checks__/web/group.ts
A check joins the group through its group property. The uptime monitor also overrides the project’s ten-minute default, because a URL monitor is cheap enough to run every minute.
__checks__/web/uptime.check.ts
The API group carries a variable instead of locations. Every API check in the folder reads {{API_BASE_URL}}, so moving the API to a new host is a one-line change.
__checks__/api/group.ts
__checks__/api/books.check.ts
Credentials go in secrets, not in code. Add one globally with npx checkly env add API_TOKEN "..." --secret and read it the same way, as {{API_TOKEN}} in API checks or process.env.API_TOKEN in scripts. See environment variables and secrets.
Run the project on Checkly’s infrastructure to confirm every check parses and passes.
Terminal
Terminal
After you deploy in the next step, each group gets its own page with the checks it owns, their combined availability, and a button to run them all at once.
The Shop web group page in Checkly showing two passing checks, availability and response time stats, and recent run results from three locations

Step 4: Deploy from CI on every merge

Preview what the first deploy creates, then deploy once from your machine.
Terminal
Terminal
Terminal
From here on, let CI do it. The workflow below redeploys the project whenever a merge to main touches monitoring code. Checkly diffs the project against what is deployed and applies only the change, so re-running it is safe.
.github/workflows/checkly-deploy.yml
Store CHECKLY_API_KEY as a repository secret and CHECKLY_ACCOUNT_ID as a repository variable. Both come from your Checkly settings, described in CLI authentication. The --force flag skips the interactive confirmation.
This workflow deploys after a merge. Running npx checkly test on every pull request, so a broken check never reaches main, is the subject of the checks on every deploy guide.

Verify it works

Add a check the way a teammate would: one new file in the service folder, nothing else.
__checks__/api/book-detail.check.ts
The preview shows exactly one new resource. Everything else is untouched.
Terminal
Terminal
Commit the file and merge. The workflow deploys it, and the new check appears under Shop API with the group’s variable and the project’s alert channel already applied.

Next

Turn your Playwright tests into monitors: the tests you already have become the checks in your web folder.

Reference