> ## Documentation Index
> Fetch the complete documentation index at: https://checkly-422f444a-immanuel-fix-api-spec.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Checkly Rules

> Add Checkly rules files to your AI agent to provide monitoring context for your coding workflow.

export const YoutubeEmbed = ({id, allowFullScreen = true, end, loading = "eager", start, title = "YouTube video"}) => {
  if (!id) {
    console.error("YouTube component requires an id prop");
  }
  const params = new URLSearchParams();
  if (start) params.append("start", start.toString());
  if (end) params.append("end", end.toString());
  const src = `https://www.youtube.com/embed/${id}?${params.toString()}`;
  return <iframe src={src} title={title} loading={loading} className="w-full aspect-video rounded-xl" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen={allowFullScreen} />;
};

The [`checkly.rules.md` file](https://www.checklyhq.com/docs/ai/checkly.rules.md) includes best practices, example code and required CLI commands to give your AI workflow enough context to perform Checkly-related tasks.

Once the Checkly rules are included in your AI context window, your agent can effectively assist you in managing your monitoring setup.

It will be able to:

<Card title="Create new checks, alert channels or other constructs" horizontal>
  "Can you create a new `BrowserCheck` monitoring `example.com`"
</Card>

<Card title="Gather information about the current monitoring setup" horizontal>
  "What are the currently used monitoring locations?"
</Card>

<Card title="Bulk-update your monitoring resources" horizontal>
  "Can you change all checks to run every 5 minutes instead of every 10 minutes?"
</Card>

With enough application context, you can even create checks for your specific use cases.

<Card title="Analyze application code and create the monitoring setup" horizontal>
  "Can you create new API Checks for the application API endpoints?"
</Card>

Find a live session explaining how to automate Checkly monitoring with AI below and [read the "Agentic Workflows" guide](/guides/agentic-workflows) for more details.

<YoutubeEmbed id="WqTXa7GCk-k" title="No Coding! Just Prompting! Getting the most out of AI for Application Reliability." />

## Claude Code

Claude Code reads instructions from `CLAUDE.md` files. You can place these files globally (in your home directory) or locally (in your project root). Claude Code automatically includes these files in its context.

To use Checkly rules with Claude Code, download the rules file and reference it in your `CLAUDE.md`:

<Tabs>
  <Tab title="Mac and Linux">
    ```bash theme={null}
    mkdir -p .claude &&
    curl -o .claude/checkly.rules.md https://www.checklyhq.com/docs/ai/checkly.rules.md -L
    echo "- examine checkly.rules.md for code generation rules" >> .claude/CLAUDE.md
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    New-Item -ItemType Directory -Path ".claude" -Force
    Invoke-WebRequest -Uri "https://www.checklyhq.com/docs/ai/checkly.rules.md" -OutFile ".claude\checkly.rules.md"
    Add-Content -Path ".claude\CLAUDE.md" -Value "- examine checkly.rules.md for code generation rules"
    ```
  </Tab>
</Tabs>

Restart your Claude Code session to load the instructions.

## GitHub Copilot

GitHub Copilot reads project-level instructions from `.github/copilot-instructions.md`. This file is automatically included in Copilot's context for all chat interactions.

<Tabs>
  <Tab title="Mac and Linux">
    ```bash theme={null}
    mkdir -p .github && curl -o .github/copilot-instructions.md "https://www.checklyhq.com/docs/ai/checkly.rules.md" -L
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    New-Item -ItemType Directory -Path ".github" -Force
    Invoke-WebRequest -Uri "https://www.checklyhq.com/docs/ai/checkly.rules.md" -OutFile ".github\copilot-instructions.md"
    ```
  </Tab>
</Tabs>

## Cursor

Cursor uses `.mdc` (Markdown Cursor) files stored in `.cursor/rules/` for project-specific instructions. These rules are automatically included in Cursor's context.

<Tabs>
  <Tab title="Mac and Linux">
    ```bash theme={null}
    mkdir -p .cursor/rules && curl -o .cursor/rules/checkly.mdc "https://www.checklyhq.com/docs/ai/checkly.rules.md" -L
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    New-Item -ItemType Directory -Path ".cursor\rules" -Force
    Invoke-WebRequest -Uri "https://www.checklyhq.com/docs/ai/checkly.rules.md" -OutFile ".cursor\rules\checkly.mdc"
    ```
  </Tab>
</Tabs>

You can reference the rules file explicitly using `@checkly.mdc` in your Cursor chats.

## Windsurf

Windsurf stores rules in `.windsurf/rules/` as Markdown files. These are included in the AI context when you interact with Windsurf's assistant.

<Tabs>
  <Tab title="Mac and Linux">
    ```bash theme={null}
    mkdir -p .windsurf/rules && curl -o .windsurf/rules/checkly.md "https://www.checklyhq.com/docs/ai/checkly.rules.md" -L
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    New-Item -ItemType Directory -Path ".windsurf\rules" -Force
    Invoke-WebRequest -Uri "https://www.checklyhq.com/docs/ai/checkly.rules.md" -OutFile ".windsurf\rules\checkly.md"
    ```
  </Tab>
</Tabs>

You can reference the rules file using `@checkly.md` in your Windsurf chats.
