npx skills add ...
npx skills add getnao/nao --skill setup-context
Bootstrap a nao agent for a project — gather warehouse + scope + extra-context info in one round, look up the warehouse-specific config from nao docs, write nao_config.yaml, run nao init + nao sync, set up the LLM key, and generate the first RULES.md. Use when the user has just decided to use nao on a new project. Only for first-time setup; for editing rules, generating tests, or reviewing an existing context, use write-context-rules / create-context-tests / audit-context.
npx skills add getnao/nao --skill setup-context
Take the user from pip install nao-core to a synced project with a starter RULES.md.
Be brief. One batch of questions, then act. Don't ping-pong.
Scope ceiling: ≤100 tables. Above that, sync gets slow and per-table context budget gets thin. 20 is a great target.
Send a single message asking for:
git@github.com:org/repo.git) — sync clones them. No local paths.nao_config.yaml, run nao initFetch the warehouse-specific config from docs.getnao.io/nao-agent/context-builder/databases. Each warehouse has its own required and optional fields (e.g. BigQuery needs project_id + dataset_id (optional); Snowflake needs account_id + warehouse + schema_name (optional); Postgres needs host + port + database + schema_name (optional). Ask the user for any required field you don't already have.
Write nao_config.yaml from the answers (skeleton in appendix below).
Run nao init --no-tty — it detects the pre-written yaml, skips all prompts, scaffolds the folder structure, and auto-installs missing dependencies. No interactive confirmation needed.
Use this command (unsets leaked env vars from the parent agentic CLI — see Step 5):
Print a summary of nao_config.yaml to the user before going further. Format example:
The model is configured in the nao UI, not in nao_config.yaml — don't include a model ID in the summary or the yaml.
Ask the user to confirm before continuing. This is the last cheap chance to catch a wrong project, a misspelled dataset, or a missing repo.
templates fieldPer database in the yaml, set:
Valid values are columns, preview, profiling, query_history, and ai_summary; the default is [columns, preview]. profiling and query_history are opt-in, and query_history requires BigQuery, Snowflake, Postgres, Redshift, Databricks, or a custom query_history_sql.
Don't use accessors — deprecated (renamed to templates).
nao init creates: nao_config.yaml, empty RULES.md, .naoignore, and folders databases/, repos/, docs/, semantics/, queries/, tests/, agent/{tools,mcps,skills}/.
nao syncAfter the user confirms the summary in Step 2:
Common failures: auth (fix yaml), tables not found (check schema casing), permission denied (grant read access), repo missing (fix repos: block, confirm SSH key). Don't move on until sync is clean.
RULES.md (no confirmation)Hand off directly to write-context-rules. Don't ask.
The key lives in nao_config.yaml. Two safe options:
api_key: ${{ env('ANTHROPIC_API_KEY') }} on the provider entry; tell the user to export the key in their shell..gitignore. Never ask them to paste a key into chat.Then nao debug to confirm.
AI_APICallError: Not FoundIf nao chat / nao debug / nao test fails with that error and the URL is https://api.anthropic.com/messages (no /v1/), the parent agentic CLI (Claude Code, Cursor, Codex) is leaking ANTHROPIC_BASE_URL into the child env. Fix:
Regular human terminals aren't affected.
nao chat, ask 3-5 real questions.RULES.md for wrong inferences.write-context-rules (refine), create-context-tests (benchmark), audit-context (anytime), add-semantic-layer (only after tests reveal metric-reliability gaps).cd into the project directory before any nao command.nao init --no-tty with the yaml pre-written — never run nao init without the flag.templates: [columns, preview]. Don't use accessors.repos: block.nao_config.yaml summary and get user confirmation before nao sync.write-context-rules — just hand off.nao_config.yaml skeleton (BigQuery example)Use this shape and adapt the databases: block per warehouse — see docs.getnao.io/nao-agent/context-builder/databases for the exact required/optional fields for Snowflake, Postgres, Redshift, Databricks, Athena, ClickHouse, Fabric, MSSQL, MySQL, Trino, MotherDuck.