write-context-rules

Installation
SKILL.md

write-context-rules

RULES.md is loaded with every message to the nao agent — keep it lean. Two purposes only:

  1. Orchestrator — point the agent to the right context fast (which metric → which table, which topic → which file, which question type → which skill).
  2. Broad rules — how to query and how to answer.

Anything else (per-table schema, full metric semantics, domain-specific rules) belongs in a referenced file: databases/<table>.md, semantics/<metric>.yaml, or a domain .md. Reference: docs.getnao.io/nao-agent/context-builder/rules-context.

Standard sections (see templates/RULES.md)

  1. ## Business overview — Product + Business model.
  2. ## Data architecture — Warehouse, data stack, layers, sources.
  3. ## Core data models### Most Used Tables (one-line pointers) + ### Tables detail (Purpose / Granularity / Key Columns ≤10 / Use For).
  4. ## Key Metrics Reference — grouped by category; **metric** → table, column, formula.
  5. ## Date filtering — three example formulas (last X weeks / last X days / current month). Don't enumerate every period.
  6. ## Analysis Process — 5 subsections: Understand → Select Table → Write Query → Validate → Context.

Flow

Related skills

More from getnao/nao

Installs
36
Repository
getnao/nao
GitHub Stars
1.2K
First Seen
Apr 30, 2026