nl2-nrql

Installation
SKILL.md

Natural Language → NRQL

Turn a natural-language question into one correct, executable NRQL query. Discover the schema first, run the finished query once to prove it parses, and return only the NRQL — never a guessed query. See queries.md for the time-resolution response shape and the aggregator-function reference.

Tools you use:

  • list_available_new_relic_accounts — find the account when the user didn't supply one.
  • convert_time_period_to_epoch_ms — resolve any time range that isn't a plain "N units ago".
  • execute_nrql_query — for schema discovery, then once more to confirm the final query parses. Needs account_id both times.

Required inputs — stop and ask if any are missing

Three things must be settled before generating anything. Ask and wait if one is missing — never guess, and don't emit a NRQL block on a turn where you're asking.

  1. Account ID. If not supplied, ask the user for it. Only call list_available_new_relic_accounts if they can't name one — it can return several hundred accounts in a single response, so never call it speculatively.
  2. The question itself. If none was given, ask what to turn into NRQL — don't invent one.
  3. The time range. If none is given, propose the default and get confirmation: "No time range given — shall I generate this for the last 1 hour?" Every query gets an explicit SINCE.

Beyond these three, don't ask follow-up questions — if the interpretation of the question is ambiguous, pick the most reasonable reading and proceed silently.

Installs
12
GitHub Stars
7
First Seen
Oct 3, 2026