New Relic CLI Skills
Monitor, query, and manage New Relic observability data via the newrelic CLI. Covers NRQL queries, AI Monitoring telemetry, APM performance triage, deployment markers, read-only al…
Vince Lozada
@vince-winkintel
What This Skill Does
Command-line interface for New Relic observability that runs NRQL queries, triages APM performance, manages deployment markers, configures alert policies and notification channels, monitors infrastructure hosts, and diagnoses agent issues. Requires a New Relic user API key and account ID.
Replaces manual navigation of the New Relic UI by exposing all major observability workflows through a single CLI with consistent commands.
When to Use It
- Run NRQL queries to investigate application performance or error rates
- Triage slow transactions and error traces in an APM application
- Record a deployment marker to correlate code changes with performance
- Create or update alert policies and notification channels
- Check infrastructure host health and resource utilization
- Diagnose why a New Relic agent is not reporting data
Install
$ openclaw skills install @vince-winkintel/newrelic-cli-skillsNew Relic CLI Skills
Quick Decision Tree
Performance issue reported? → apm/SKILL.md
Need to query data with NRQL? → nrql/SKILL.md
AI/LLM application, token, error, prompt, or response telemetry? → aimonitoring/SKILL.md
Recording a deployment? → deployments/SKILL.md
Inspecting alerts or incidents? → alerts/SKILL.md
Infrastructure/host issues? → infrastructure/SKILL.md
Agent not reporting? → diagnostics/SKILL.md
Users, groups, roles, permissions, or access grants? → iam/SKILL.md
Setup & Auth
# Install (manual or package manager)
# macOS (Homebrew)
brew install newrelic-cli
# Windows (Scoop)
scoop bucket add newrelic-cli https://github.com/newrelic/newrelic-cli.git
scoop install newrelic-cli
# Or manually download a release archive from:
# https://github.com/newrelic/newrelic-cli/releases
# Extract it, place the `newrelic` binary on your PATH, then verify with:
newrelic --version
# Configure profile
newrelic profile add \
--profile "default" \
--apiKey $NEW_RELIC_API_KEY \
--accountId $NEW_RELIC_ACCOUNT_ID \
--region US # US, EU, JP, GOV, or FEDRAMP (alias for GOV)
newrelic profile default --profile "default"
# Verify
newrelic profile list --format JSON
For structured profile discovery, pass --format JSON explicitly. The isDefault
field identifies the persisted default profile, and profile names are emitted without
terminal decoration. It does not necessarily identify the effective credentials: the
global --profile flag can select another profile, while NEW_RELIC_API_KEY,
NEW_RELIC_ACCOUNT_ID, NEW_RELIC_REGION, and NEW_RELIC_LICENSE_KEY override the
corresponding stored profile fields.
Common One-Liners
# Search for an entity by name
newrelic entity search --name "my-app"
# Run a NRQL query
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID \
--query "SELECT average(duration) FROM Transaction WHERE appName='my-app' SINCE 1 hour ago"
# Record a deployment
newrelic apm deployment create \
--applicationId <APP_ID> \
--revision "v1.2.3" \
--description "Feature: user auth"
# Run diagnostics
newrelic diagnose run
# Find applications reporting AI Monitoring telemetry
newrelic aimonitoring application search
Entity Reference
Find entity GUIDs (needed for API calls and deployment markers):
# List all APM apps
newrelic entity search --name "" --type APPLICATION --domain APM
# Get APM application details
newrelic apm application get --guid <GUID>
# List all hosts
newrelic entity search --name "" --type HOST
Environment Variables
| Variable | Description |
|---|---|
NEW_RELIC_API_KEY | User key (NRAK-...) |
NEW_RELIC_ACCOUNT_ID | Numeric account ID |
NEW_RELIC_REGION | US, EU, JP, GOV, or FEDRAMP (FEDRAMP is an alias for GOV) |
Sub-Skills
| Sub-skill | When to use |
|---|---|
apm/ | Performance triage, slow transactions, error analysis |
nrql/ | Custom queries, dashboards, ad-hoc data exploration |
aimonitoring/ | AI/LLM applications, token usage, errors, prompts, responses, and telemetry |
deployments/ | Mark releases, correlate deploys with performance |
alerts/ | Read-only incident telemetry and entity alert severity |
infrastructure/ | Host metrics, CPU/memory, process monitoring |
diagnostics/ | Agent health, config validation, connectivity |
iam/ | Users, groups, memberships, roles, permissions, and access grants |
Scripts
| Script | Purpose |
|---|---|
scripts/check-performance.sh | Quick health check across all apps |
scripts/deployment-marker.sh | Record a deployment event |
scripts/top-slow-transactions.sh | Find the 10 slowest transactions |
scripts/error-report.sh | Recent errors with stack traces |
References
references/nrql-patterns.md— Common NRQL query patternsreferences/performance-triage.md— Step-by-step triage guide
Top skills in this category
API Gateway
@byungkyuCall third-party APIs through the Maton gateway, which injects the credential for an app the user has already connected. Use this skill when the user names a connected app and a concrete action in it - read a mailbox, query a CRM, file an issue, update a spreadsheet, etc.
Marketing Mode
@thesethroseMarketing Mode combines 23 comprehensive marketing skills covering strategy, psychology, content, SEO, conversion optimization, and paid growth. Use when users need marketing strategy, copywriting, SEO help, conversion optimization, paid advertising, or any marketing tactic.
Blogwatcher
@steipeteMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
Marketing Skills
@jchopard69Access 23 marketing modules offering checklists, frameworks, and ready-to-use deliverables for CRO, SEO, copywriting, analytics, launches, ads, and social me...
diagram-generator
@matthewyinGenerate and edit diagrams with the mcp-diagram-generator MCP server. Use this skill for new diagrams, existing .drawio/.mmd/.excalidraw edits, network topology, architecture, flowchart, swimlane, sequence, class, ER, and Excalidraw whiteboard work. Always use this skill when the user asks to draw,