Skip to content

Business operating system for Claude Code — 57 skills, 21 agents, smart daemon. Unified inbox (WhatsApp/Email/Slack/Telegram), autonomous PR merge, full-AWS monitoring, revenue (Stripe+RevenueCat), e-commerce (Shopify), marketing (Klaviyo/Meta/GA4), voice (Bland/ElevenLabs), APM (Datadog/NewRelic/OTEL), YOLO mode.

feat(09-03): add /ops:monitor + /ops:integrate skills and monitor-agent

auroracapitalfe384f476a46
diff --git a/claude-ops/.claude-plugin/plugin.json b/claude-ops/.claude-plugin/plugin.json
index 7470a3d7..3146445f 100644
--- a/claude-ops/.claude-plugin/plugin.json
+++ b/claude-ops/.claude-plugin/plugin.json
@@ -189,6 +189,41 @@
"type": "string",
"sensitive": false,
"default": ""
+ },
+ "datadog_api_key": {
+ "title": "Datadog API Key",
+ "description": "From Datadog Organization Settings > API Keys — used for /ops:monitor",
+ "type": "string",
+ "sensitive": true,
+ "default": ""
+ },
+ "datadog_app_key": {
+ "title": "Datadog Application Key",
+ "description": "From Datadog Organization Settings > Application Keys",
+ "type": "string",
+ "sensitive": true,
+ "default": ""
+ },
+ "newrelic_api_key": {
+ "title": "New Relic API Key",
+ "description": "User API Key from one.newrelic.com/api-keys — used for /ops:monitor",
+ "type": "string",
+ "sensitive": true,
+ "default": ""
+ },
+ "newrelic_account_id": {
+ "title": "New Relic Account ID",
+ "description": "Numeric account ID from New Relic admin portal",
+ "type": "string",
+ "sensitive": false,
+ "default": ""
+ },
+ "otel_endpoint": {
+ "title": "OTEL Backend Endpoint",
+ "description": "Base URL of your OpenTelemetry-compatible backend (e.g., https://otlp.grafana.net)",
+ "type": "string",
+ "sensitive": false,
+ "default": ""
}
}
}
diff --git a/claude-ops/skills/ops-integrate/SKILL.md b/claude-ops/skills/ops-integrate/SKILL.md
new file mode 100644
index 00000000..8db10abb
--- /dev/null
+++ b/claude-ops/skills/ops-integrate/SKILL.md
@@ -0,0 +1,145 @@
+---
+name: ops-integrate
+description: Add any SaaS API as a first-class integration. Provide the service name — ops-integrate discovers auth patterns, tests connectivity, and registers the API in your partner registry so it's available to other skills.
+argument-hint: "<service-name> [--url <base-url>] [--auth bearer|api-key|basic|oauth2] [--list]"
+allowed-tools:
+ - Bash
+ - Read
+ - Write
+ - Edit
+ - AskUserQuestion
+ - WebSearch
+effort: low
+maxTurns: 25
+---
+
+## Runtime Context
+
+```bash
+PREFS="${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}/preferences.json"
+PARTNER_REGISTRY=$(jq '.partner_registry // {}' "$PREFS" 2>/dev/null || echo '{}')
+```
+
+Parse `$ARGUMENTS`:
+- Contains `--list` → run **List registered integrations** then exit
+- Otherwise → run **Onboarding flow** with the service name as first positional argument
+
+# OPS ► INTEGRATE
+
+## List registered integrations (`--list`)
+
+```bash
+jq -r '.partner_registry // {} | to_entries[] | "\(.key): \(.value.base_url) [\(.value.auth_type)]"' "$PREFS" 2>/dev/null
+```
+
+Display as a table:
+
+```
+Registered integrations:
+ hubspot https://api.hubapi.com [bearer]
+ stripe https://api.stripe.com [bearer]
+ sendgrid https://api.sendgrid.com [api-key]
+```
+
+If no integrations registered: `No integrations registered yet. Run /ops:integrate <service-name> to add one.`
+
+## Onboarding flow (5 steps)
+
+### Step 1 — Discover API details
+
+If `--url` not provided, use WebSearch to find:
+- Official API docs URL
+- Base API URL
+- Authentication pattern (bearer token / api-key header / basic auth / oauth2)
+- API key generation URL (where the user gets credentials)
+- Health/test endpoint (e.g., /healthz, /v1/ping, /me)
+
+### Step 2 — Confirm with user
+
+Present findings via AskUserQuestion (≤4 options):
+
+```
+Found: <service-name> API — Base URL: <url> — Auth: <auth-type>
+[Looks correct — continue] [Change base URL] [Change auth type] [Cancel]
+```
+
+If "Change base URL": AskUserQuestion with free-text input for the new URL.
+If "Change auth type": AskUserQuestion (≤4 options): `[bearer] [api-key] [basic] [oauth2]`
+
+### Step 3 — Collect credential
+
+```
+Paste your <service-name> <auth-type> credential (it will be stored locally only)
+[Paste now] [Configure later]
+```
+
+If "Paste now": collect credential via AskUserQuestion free-text. Derive key name: `<lowercase_service_name>_api_key`
+
+Write to preferences.json via atomic tmpfile swap:
+```bash
+tmp=$(mktemp)
+jq --arg k "$KEY_NAME" --arg v "$CREDENTIAL" '.[$k] = $v' "$PREFS" > "$tmp" && mv "$tmp" "$PREFS"
+```
+
+### Step 4 — Health check
+
+Curl the health/test endpoint with the credential:
+
+```bash
+# Bearer token
+curl -sf -o /dev/null -w "%{http_code}" \
+ -H "Authorization: Bearer ${CREDENTIAL}" \
+ "${BASE_URL}${HEALTH_ENDPOINT}"
+
+# API key header (X-Api-Key)
+curl -sf -o /dev/null -w "%{http_code}" \
+ -H "X-Api-Key: ${CREDENTIAL}" \
+ "${BASE_URL}${HEALTH_ENDPOINT}"
+
+# Basic auth
+curl -sf -o /dev/null -w "%{http_code}" \
+ -u "${CREDENTIAL}:" \
+ "${BASE_URL}${HEALTH_ENDPOINT}"
+```
+
+Report: ✅ if HTTP 200-299, ⚠️ with status code otherwise. If credential not yet configured, skip health check and report `⬜ health check skipped — credential not configured`.
+
+### Step 5 — Register in partner registry
+
+```bash
+tmp=$(mktemp)
+jq --arg name "${SERVICE_NAME}" \
+ --arg url "${BASE_URL}" \
+ --arg auth "${AUTH_TYPE}" \
+ --arg key_name "${KEY_NAME}" \
+ --arg health "${HEALTH_ENDPOINT}" \
+ '.partner_registry[$name] = {base_url: $url, auth_type: $auth, credential_key: $key_name, health_endpoint: $health, added: (now | todate)}' \
+ "$PREFS" > "$tmp" && mv "$tmp" "$PREFS"
+```
+
+Confirmation output:
+
+```
+✅ <service-name> registered in partner registry
+ Auth: <auth-type>
+ Health: <base-url><health-endpoint>
+ Credential key: <key-name>
+
+ Access via: jq '.partner_registry["<service-name>"]' $PREFS
+```
+
+## CLI/API Reference
+
+```bash
+# List all registered integrations
+jq '.partner_registry' "${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}/preferences.json"
+
+# Look up a specific integration
+jq '.partner_registry["hubspot"]' "$PREFS"
+
+# Read a credential for a registered integration
+jq -r ".$KEY_NAME" "$PREFS"
+
+# Remove an integration from the registry
+jq 'del(.partner_registry["<service-name>"])' "$PREFS" > tmp && mv tmp "$PREFS"
+```
diff --git a/claude-ops/skills/ops-monitor/SKILL.md b/claude-ops/skills/ops-monitor/SKILL.md
new file mode 100644
index 00000000..41a1390c
--- /dev/null
+++ b/claude-ops/skills/ops-monitor/SKILL.md
@@ -0,0 +1,140 @@
+---
+name: ops-monitor
+description: Unified APM and monitoring surface. Polls Datadog, New Relic, and OpenTelemetry backends for active alerts, error traces, and entity health. Use --watch for live polling every 60 seconds. Use --setup to configure monitoring credentials.
+argument-hint: "[--watch] [--setup] [--backend datadog|newrelic|otel]"
+allowed-tools:
+ - Bash
+ - Read
+ - Agent
+ - AskUserQuestion
+effort: low
+maxTurns: 20
+---
+
+## Runtime Context
+
+```bash
+PREFS="${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}/preferences.json"
+DD_API_KEY=$(jq -r '.datadog_api_key // empty' "$PREFS" 2>/dev/null)
+NR_API_KEY=$(jq -r '.newrelic_api_key // empty' "$PREFS" 2>/dev/null)
+OTEL_ENDPOINT=$(jq -r '.otel_endpoint // empty' "$PREFS" 2>/dev/null)
+```
+
+Determine `$ARGUMENTS` mode:
+- Contains `--setup` → run **Setup flow**
+- Contains `--watch` → run **Watch mode**
+- Otherwise → run **Default health check**
+
+# OPS ► MONITOR
+
+## Setup flow (`--setup`)
+
+Ask which backends to configure:
+
+```
+Which monitoring backends would you like to configure?
+[Datadog] [New Relic] [OpenTelemetry] [All three]
+```
+
+For each selected backend, collect credentials via `AskUserQuestion` free-text input (one at a time, ≤4 options per call):
+
+**Datadog:**
+1. `datadog_api_key` — API Key from app.datadoghq.com/organization-settings/api-keys
+2. `datadog_app_key` — Application Key from app.datadoghq.com/organization-settings/application-keys
+
+**New Relic:**
+1. `newrelic_api_key` — User API Key from one.newrelic.com/api-keys
+2. `newrelic_account_id` — Numeric Account ID from New Relic admin portal
+
+**OpenTelemetry:**
+1. `otel_endpoint` — Base URL of your OTEL-compatible backend (e.g., https://otlp.grafana.net)
+
+Write each credential to preferences.json using atomic tmpfile swap:
+
+```bash
+tmp=$(mktemp)
+jq --arg k "$KEY" --arg v "$VALUE" '.[$k] = $v' "$PREFS" > "$tmp" && mv "$tmp" "$PREFS"
+```
+
+Run smoke test after saving:
+- **Datadog**: `curl -sf -H "DD-API-KEY: $DD_API_KEY" -H "DD-APPLICATION-KEY: $DD_APP_KEY" "https://api.datadoghq.com/api/v1/validate"` → expect `{"valid": true}`
+- **New Relic**: `curl -sf -H "Api-Key: $NR_API_KEY" "https://api.newrelic.com/graphql" -d '{"query":"{ actor { user { name } } }"}'` → expect `data.actor.user`
+- **OTEL**: `curl -sf "$OTEL_ENDPOINT/healthz"` → expect HTTP 200
+
+Report ✅ or ❌ with status for each backend.
+
+## Default health check (no flags)
+
+Spawn `monitor-agent` via the Agent tool. Display the result as a formatted dashboard:
+
+```
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+ OPS ► MONITOR [<timestamp>]
+━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+ DATADOG ✅ healthy (0 alerts)
+ NEW RELIC 🔴 2 critical entities
+ OTEL ✅ healthy
+──────────────────────────────────────────────────────
+ Total alerts: 2 Severity: CRITICAL
+```
+
+Status icons:
+- `✅` — healthy (0 alerts / configured and reachable)
+- `⚠️` — warning (warn-level alerts present)
+- `🔴` — critical (critical alerts or unreachable)
+- `⬜` — not configured
+
+For each alert or critical entity, display: service name, alert name, and link to the relevant dashboard.
+
+If no backends are configured, show a setup prompt:
+```
+No monitoring backends configured. Run /ops:monitor --setup to add Datadog, New Relic, or OTEL.
+```
+
+## Watch mode (`--watch`)
+
+Poll every 60 seconds. On each tick:
+
+```bash
+while true; do
+ RESULT=$(# spawn monitor-agent and capture JSON output)
+ # Diff against previous tick
+ # Print: timestamp, changed items only
+ # 🆕 new alert: <name>
+ # ✅ resolved: <name>
+ sleep 60
+done
+```
+
+Exit on Ctrl-C.
+
+## `--backend` filter
+
+If `--backend datadog|newrelic|otel` is specified, query and display only that backend.
+
+## CLI/API Reference
+
+| Backend | Auth header | Base URL | Health endpoint |
+|-------------|------------------------------------------------|---------------------------------|------------------------|
+| Datadog | `DD-API-KEY: $key` + `DD-APPLICATION-KEY: $app_key` | https://api.datadoghq.com | /api/v1/validate |
+| New Relic | `Api-Key: $key` | https://api.newrelic.com/graphql | POST GraphQL query |
+| OTEL | varies by backend | `$OTEL_ENDPOINT` | /healthz |
+
+```bash
+# Datadog — active alerts
+curl -sf \
+ -H "DD-API-KEY: ${DD_API_KEY}" \
+ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
+ "https://api.datadoghq.com/api/v1/monitor?monitor_tags=*&with_downtimes=false" \
+ | jq '[.[] | select(.overall_state == "Alert" or .overall_state == "Warn")]'
+
+# New Relic — critical entities (GraphQL)
+curl -sf \
+ -H "Api-Key: ${NR_API_KEY}" \
+ -H "Content-Type: application/json" \
+ -d '{"query":"{ actor { entitySearch(queryBuilder: {alertSeverity: CRITICAL}) { results { entities { name alertSeverity entityType } } } } }"}' \
+ "https://api.newrelic.com/graphql"
+
+# OTEL — health check
+curl -sf "${OTEL_ENDPOINT}/healthz"
+```
diff --git a/claude-ops/skills/ops/SKILL.md b/claude-ops/skills/ops/SKILL.md
index 6fdb458a..2296a292 100644
--- a/claude-ops/skills/ops/SKILL.md
+++ b/claude-ops/skills/ops/SKILL.md
@@ -44,8 +44,9 @@ Route `$ARGUMENTS` to the correct ops skill:
| voice, call, tts, transcribe, phone | `/ops:ops-voice $ARGUMENTS` |
| yolo | `/ops-yolo` |
| doctor, health, fix, diagnose | `/ops:ops-doctor` |
+| monitor, apm, alerts, datadog, newrelic, otel | `/ops:ops-monitor $ARGUMENTS` |
| settings, credentials, creds, config, reconfigure | `/ops:ops-settings $ARGUMENTS` |
-| integrate, connect, add-api, saas | `/ops:ops-integrate $ARGUMENTS` |
+| integrate, connect, add-api, saas, partner | `/ops:ops-integrate $ARGUMENTS` |
| speedup, clean, optimize, cleanup | `/ops:ops-speedup` |
| orchestrate, subagents, agents, dispatch, run | `/ops:ops-orchestrate $ARGUMENTS` |