Press Delete or Backspace to close the focused tab.
SkillNarrative Common
Write NQL
Draft, validate, and optionally run an NQL query against a Narrative dataset.
About

Overview

Write, validate, and (optionally) execute an NQL query against a Narrative dataset. Drafts the query from the user's question, runs validation until it compiles, explains the query in plain English, and only runs it on explicit approval.

NQLQueryValidationDatasets
Skill Support
Specifications

Plugin
Narrative Common
Runtime
Prompt + code
Version
0.4.0
Languages
NQL
Required Tools
narrative_datasets_search, narrative_datasets_describe, narrative_nql_validate, narrative_nql_run, narrative_jobs_describe
Included Files
SKILL.md
Arguments
ArgumentRequired / DefaultDescription
--runOptionalSkip the end-of-flow confirmation and execute the query immediately after validation succeeds.
--dataset <id>OptionalPre-bind the target dataset. Skips the dataset-search step.
--limit <n>OptionalOverride the default LIMIT (default 100 for raw selects, no limit for aggregations).
--no-explainOptionalSkip the plain-English explanation. Use only when the caller is another skill or automation.
<free-text tail>OptionalTreated as the user's question (e.g., /write-nql --dataset 12345 how many distinct users last 30 days). With no arguments, the skill walks the user through the flow interactively.
Example prompts
PromptWhen to use it
Count distinct sha256_hashed_email values in dataset 123Quickly size the addressable email reach of a dataset.
Validate this NQL before I run itCatch parser errors (COUNT(*), != , reserved words) before submitting a job.
Show the top 100 rows where graph_edge.is_directed is falseInspect symmetric same-entity edges in a graph source.
/write-nql --dataset 123 --run --limit 50 distinct users in the last 30 daysBind a dataset, cap results at 50, and execute immediately once validation passes.
Requires MCP Servers

This skill calls tools from the MCP servers listed below — connect them so your agent has the tools the skill needs.

Installation