newrelic-clilisted
Install: claude install-skill tkolleh/skills
## What this skill does
Translates natural-language observability questions into `newrelic` CLI commands,
resolving account names to numeric IDs automatically. It knows every
New Relic account, which environment and service slot each belongs to, and
which region (US/EU) to use.
## Account resolution
A bundled `accounts.json` (sibling to this file) maps every New Relic
account. Read it at the start of any task to resolve accounts.
### Resolution rules
1. If the user names an **environment** (e.g. "production", "test", "uk-prod"),
match against the `environment` field.
2. If they name a **slot** (e.g. "services", "envoy", "cardinal"), match against
the `slot` field within the target environment.
3. If they give a **numeric account ID**, use it directly.
4. If they name an **alias** (e.g. "Acme_Corp_1", "My_Org"), match
against the `alias` field.
5. **Defaults** when no account is specified:
- Service-specific queries (transactions, throughput, errors) ->
`$DEFAULT_SERVICES_ACCOUNT`
- General queries (infrastructure, custom events) ->
`$DEFAULT_MAIN_ACCOUNT`
Always confirm which account you resolved to before running the query, e.g.:
"Querying **Services Production** ($ACCOUNT_ID)..."
## CLI command reference
### NRQL queries
The most common operation. Always include `--accountId` and default to
`--format JSON` for structured output.
```bash
newrelic nrql query --accountId <ID> --query '<NRQL>' --format JSON
```
**Example patterns:**
```bash