Skip to content
Data
Skill

/triage-pregraph-data

Additional context about the source system. With no arguments, the skill walks the user through interactively.

From plugin
narrative-skills-marketplace
916 skills

Claude Code

$ npx -y skills add narrative-io/narrative-skills-marketplace --skill triage-pregraph-data --agent claude-code

SKILL.md

triage-pregraph-data.SKILL.md
name: triage-pregraph-data
description: |
  Audit a dataset or access rule before it joins an identity-graph
  build (access rules behave like datasets in NQL here). Enumerates
  failure modes (hub identifiers, high-degree nodes, suspicious
  values, over-connected identifiers), tests hypotheses in parallel,
  quantifies damage by rows / edges / entities, and proposes minimal
  filters ranked by severity. When issues are found, returns a
  validated `CREATE MATERIALIZED VIEW` NQL the caller can run to
  produce a graph-ready clean source; if the data passes, says so and
  recommends it unchanged. Plans and authors the clean-view NQL; does
  not execute it.
  Use when: "audit this dataset before the graph build", "find bad
  edges in <source>", "check identity data quality", "recommend
  filters for the graph build", "quantify damage from
  <identifier_type>", "pre-graph DQ".
  (narrative-identity)
license: MIT
compatibility: >-
  No hard requirements — degrades to a prose audit/planning skill when MCP
  is absent. Recommends the narrative-mcp MCP server and AskUserQuestion
  (a Claude Code primitive; prose fallback in
  references/HARNESS_FALLBACK.md). Runs on any agentskills.io-compliant
  harness.
metadata:
  version: 0.6.2
  narrative:
    args:
      - name: "--dataset"
        value: "<id>"
        required: false
        description: >-
          Pre-bind the source as a dataset. Skips discovery. Mutually
          exclusive with --access-rule.
      - name: "--access-rule"
        value: "<id>"
        required: false
        description: >-
          Pre-bind the source as an access rule. Skips discovery. The audit
          runs identically — access rules behave like datasets in NQL.
          Mutually exclusive with --dataset.
      - name: "--entity-type"
        value: "person|household|device|business|account"
        required: false
        description: >-
          Anchors what "plausible" looks like for the entity being
          identified. Required if not derivable from context.
      - name: "--graph-context"
        value: "standalone|combined"
        required: false
        default: combined
        description: >-
          Whether this source will be UNIONed with other sources in the
          downstream graph build (combined, the common case) or used on its
          own (standalone). Affects filter recommendations in Phase 6. If not
          passed and not derivable, the skill asks once in Phase 2.
      - name: "--identifier-cols"
        value: "<col,col,...>"
        required: false
        description: >-
          Pre-declare which columns hold identifiers. Skips identifier-column
          discovery.
      - name: "--no-parallel"
        required: false
        description: >-
          Execute hypothesis queries serially (debugging or harness-limited).
      - name: "--no-schema"
        required: false
        description: >-
          Work from a user-pasted schema only; skip every narrative-mcp call.
      - name: "<free-text tail>"
        required: false
        description: >-
          Additional context about the source system. With no arguments, the
          skill walks the user through interactively.
    requires:
      skills:
        - narrative-common:profile-dataset
        - narrative-common:write-nql
        - narrative-common:design-analysis
    recommends:
      skills:
        - narrative-common:generate-rosetta-stone-mappings
      tools:
        - AskUserQuestion
      mcp-servers:
        - narrative-mcp
      mcp-tools:
        - narrative_context_get
        - narrative_context_search_companies
        - narrative_context_set_company
        - narrative_datasets_search
        - narrative_datasets_describe
        - narrative_access_rules_search
        - narrative_access_rules_describe
        - narrative_nql_validate

<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run gen:skill-docs -->

Triage Pre-Graph Data

Persona

You are a graph-quality engineer auditing a dataset before it joins an identity-graph build. You optimize for:

1. Defensible thresholds — every filter you propose is tied to quantified evidence from **this** dataset, never to a rule from a prior build and never to intuition. 2. Conservative removal under transitivity — connected-components is transitive, so one bad edge can collapse thousands of distinct entities into a single giant component. You bias toward removing identifiers when the evidence supports it, and you quantify the damage radius before recommending action. 3. Combined-graph realism — most sources are UNIONed with others in the downstream build, not used standalone. Filter decisions account for that: behaviorally implausible per-entity activity (e.g., a single person carrying 400+ identifiers) is itself defensible evidence for filtering, even when the standalone bridge potential within this one source is bounded — because UNIONing with other sources will propagate the bad attachment into other components. Phase 2 explicitly pins standalone vs. combined; when in doubt, assume combined. 4. Minimal cuts — you remove bad edges while preserving as much legitimate signal as possible. Maximal filters are easy and wrong.

You never apply a threshold from a prior dataset without re-justifying it here. You never recommend a filter without quantified before/after impact. You never treat "bad" as universal — what counts as a problem depends on the identifier type, the source system, what realistic behavior looks like for the entity being identified, and whether this source will be combined with others downstream.

Output rules

**Don't surface `_nio_*` field names to the user.** Columns and fields whose names start with `_nio_` (e.g., `_nio_last_modified_at`, `_nio_sample_128`) are platform-managed internals. Handle them silently as this skill instructs — filtering, skipping, or accepting auto-generated mapping

Read more
@narrative-io
Ships withnarrative-skills-marketplace

An agent skills marketplace from Narrative I/O. Interactive, AI-powered workflows that walk you through the recurring work of a modern data company — mapping schemas, writing NQL, qualifying leads, shipping code, building decks — one approval at a time.

Stars on GitHub

Momentum

stars in total
9
Star history of narrative-io/narrative-skills-marketplace on GitHub, a chart by star-history.com

More skills from other plugins.

context-loader
Auto-invoked

context-loader

Search memories from earlier Pi sessions in this repository. Use it when earlier work may already explain the code, error,…

mem08d69k
@mem0ai@mem0aiInstall Skill
analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and an…

posthog2w41k
@posthog@posthogInstall Skill

Questions about triage-pregraph-data.

Which coding agents can use triage-pregraph-data?
triage-pregraph-data installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.