> ## Documentation Index
> Fetch the complete documentation index at: https://docs.happyuptime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code skill

Install the Happy Uptime skill in Claude Code for first-class agent access.

# Claude Code skill

The `happyuptime-cli` npm package ships a Claude Code skill file. Once installed, Claude Code (and any agent built on the Claude Agent SDK) understands every CLI command, knows your config-as-code schema, and can drive the API directly.

## Install

**Install the CLI**

```bash
    npm install -g happyuptime-cli
    ```
  **Install the skill**

```bash
    happy skill install
    ```

    This copies `happyuptime-cli.md` to `~/.claude/skills/`.
    Use `happy skill install --codex` for Codex, or `happy skill install --all` to install both.
  **Authenticate**

```bash
    happy login
    ```

    Stores an API key in `~/.happyuptime/config.json`. Claude Code calls `happy` directly, so any session inherits your auth.

## What the skill teaches Claude

- Full command tree (monitors, incidents, alerts, status, speed-test, config)
- Every flag and output shape (`--json` is highlighted for chaining)
- The `happyuptime.yml` config-as-code schema, with on-call layers and restrictions
- Conventions: incident severity values, monitor types, region codes
- Common workflows: "create monitor + status page component + alert rule" in one prompt

## Example prompts

> "Create an HTTP monitor for `api.acme.com/health` with 60s interval in us-east and eu-west, and add it to my Acme status page."

> "Look at incidents from the last 24 hours, find any that opened during a deploy, and draft a postmortem for the worst one."

> "Set up a 24/7 on-call rotation with three layers: Primary (weekly handoff Mondays 9 AM ET), Secondary (weekly handoff Mondays), and Manager (override layer for escalation only)."

Claude will translate each into the appropriate `happy` invocations or YAML edits.

## Without the skill

If you don't install the skill, Claude Code can still drive `happy` — the CLI's `--help` output is comprehensive — but the skill saves discovery turns and reduces hallucination on flag names.

## Other agent runtimes

The skill file is plain markdown. Codex, Anthropic's Agent SDK, Cursor's MCP integration, and any system that loads `.md` system prompts can use it directly:

```bash
happy skill print
```

Drop the contents into your agent's system prompt or skills directory.