Skip to content

narrative-io/narrative-skills-marketplace / plugins/narrative-common/skills/write-nql

write-nql

Verified

Write, validate, and (optionally) execute an NQL query against a Narrative dataset. Drafts the query from the user's question, runs `narrative_nql_validate` until it compiles, explains the query in plain English, and only runs it on explicit approval (or when invoked with `--run`). Use when: "write an NQL query for X", "query this dataset", "validate this NQL", "run NQL against dataset <id>", "how many rows match Y", "show me the top N records from <dataset>". (narrative-common)

references/EDGE_CASES.md

View on GitHub
# Edge cases and gotchas

Read when something doesn't add up — a referenced column isn't in
the schema, the user is about to scan a huge dataset wildcard, the
validator's verdict contradicts the user's understanding, or the
schema appears to have shifted mid-conversation.

## The user asks about a column that doesn't exist

Don't fabricate a similarly named column. Surface the closest
matches from the schema with `AskUserQuestion` and let them
confirm.

## The user asks for a wildcard scan against a huge dataset

If `metadata.record_count` is large (>50M) and no filter is
present, warn explicitly in the explanation and propose a sample
(`TABLESAMPLE BERNOULLI(1)`) or a tighter filter before running.

## `--run` plus a query that scans everything

Honor `--run`, but still surface the cost warning in the
explanation *before* submitting the job.

## Validator says the query is fine but the user disagrees

Treat the user's interpretation as the source of truth for intent.
Loop back to step 4; do not argue.

## MCP gives a non-deterministic schema

Re-describe before blaming the validator if columns "disappear"
between calls; the platform may have updated the dataset
mid-conversation.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall