getnao/nao

audit-context

Diagnose the health of a nao context at any stage of its lifecycle.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/getnao/nao --skill audit-context

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

audit-context

Diagnose a nao context. Find gaps, MECE violations, failure root causes, and bloat. Output is a short in-conversation report ending in a prioritized plan. Diagnose only — never fix. Route fixes to write-context-rules / add-semantic-layer / create-context-tests.

Run any time: right after setup-context, mid-build, before a release, or when the agent's behavior gets surprising.

Six checks (run in order)

1. Synced context

Read nao_config.yaml. What's wired in (warehouse, repos, Notion, semantic layer, MCPs)? What's missing (dbt repo, ETL configs, BI repo, internal docs)? Has nao sync run — are databases/, repos/, docs/, semantics/ populated?

Scope check: <100 tables is the hard ceiling, ≤20 is the target. Better 12 well-documented tables than 80 half-documented ones. Flag oversized scope explicitly — it's the biggest predictor of reliability failure.

2. RULES.md vs target structure

Six standard sections (from write-context-rules): Business overview, Data architecture, Core data models (Most Used + Tables detail), Key Metrics Reference, Date filtering, Analysis Process. Per section, mark present / missing / thin. Flag placeholders, TODO: markers, and metric entries with no source-of-truth pointer.

3. Context coverage (per table)

For every table in databases/: is it in ## Most Used Tables? Does it have a ## Tables detail block? Is there dbt context (repos/<dbt>/models/**/schema.yml)? Any extra .md?

Then per-table gaps: undocumented columns the agent will reference, calculated fields with no explanation, foreign keys with no relation, common WHERE filters not mentioned anywhere. A table with no docs anywhere is a high-priority finding.

4. Data model consistency (MECE)

  • Mutually exclusive? Two tables computing the same metric differently (worst issue — the agent picks one unpredictably).
  • Collectively exhaustive? Asked metrics that no in-scope table can answer.
  • Duplicated columns? Same logical field under different names (user_id / customer_id / account_id).
  • Ambiguous columns? amount without unit, status without enum values.

5. Test coverage

If tests/ is empty → recommend create-context-tests. Otherwise read tests/outputs/ (most recent run) and categorize each failure:

CategoryLooks likeFix
Data modelWrong column / wrong tableAdd column descriptions; clarify granularity
Date selectionWrong period / week startAdd DO/DON'T SQL in ## Date filtering
Test issueTest SQL itself is wrongFix the test, not the context
InterpretationReasonable but different readingAdd to naming conventions or ## Key Metrics Reference
Metric definitionWrong formula / sourceTighten ## Key Metrics Reference or add a semantic layer

Propose the smallest rule change per failure. Sort by impact (tests affected).

6. Token optimization

  • Files >40KB (flag).
  • ## Tables detail blocks exceeding the 10-column cap.
  • Duplication between RULES.md and databases/<table>.md.
  • In-scope tables with no mention in any test or recent question (trim candidates).
  • Raw / staging tables that snuck into scope.

If RULES.md is bloated, suggest moving per-table detail to databases/<table>.md and keeping only the one-line pointer in ## Most Used Tables. For multi-domain bloat, propose a per-domain file map referenced from RULES.md. Show the proposed structure before moving anything.

Output (in conversation, not a file)

Lead with a one-paragraph summary: sync state | scope wideness (N tables vs ≤100 ceiling) | rules quality (N/6 sections substantive) | test coverage (N tests, X% passing).

Then deep-dive only the sections with findings. Skip clean ones. Format hints:

  • Synced / RULES.md / token bloat → bulleted gaps.
  • Context coverage → table: Table | RULES.md | dbt docs | Extra .md | Gap.
  • MECE → bullets.
  • Test failures → table: Test | Category | Proposed fix.

End with a prioritized plan (easiest-win → biggest-work), each item naming the skill that does the work:

## Plan
1. (easy / 5 min) ... → write-context-rules
2. (small / 30 min) ... → create-context-tests
3. (medium / 1-2 hr) ... → audit-context (rerun after)
4. (large / multi-session) ... → add-semantic-layer

Guardrails

  • Apply one change at a time. Re-run tests between fixes.
  • Tests are the source of truth. If the user says "it's working," ask for the latest pass rate first.
  • Don't move or split files without confirmation. Show the file map first.
  • Don't fix in this skill — diagnose only.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
getnao
커뮤니티

add-semantic-layer

Wire a semantic layer into a nao agent so that metric queries are routed through a single source of truth. Supports dbt MetricFlow (dbt Cloud with Semantic Layer), Snowflake (views or semantic views via MCP), an in-house nao YAML semantic layer, or other tools (via MCP discovery). Installs the right MCP server, updates RULES.md to route metric queries through the semantic layer, and (for the nao YAML option) generates starter metric files. Use after a first round of tests has shown the agent str

설치 수
2
GitHub Stars
1.9천
업데이트
10월 20일
getnao
커뮤니티

build-custom-charts

Create or update browser-rendered custom nao chart modules in agent/charts.

설치 수
2
GitHub Stars
1.9천
업데이트
10월 20일
getnao
커뮤니티

create-context-tests

Generate a test suite of natural-language → SQL pairs that becomes the quality benchmark for a nao agent, then run it via nao test. Use when the user wants to start measuring agent reliability, extend an existing test suite, or add tests for new metrics. Tests are the only honest answer to "is the context working?". Do not use for writing rules (write-context-rules) or diagnosing failures (audit-context).

설치 수
2
GitHub Stars
1.9천
업데이트
10월 20일
getnao
커뮤니티

deploy-context

Wire a nao project's context folder to a remote nao instance (Cloud or self-hosted) so every push to main automatically runs nao deploy via GitHub Actions. Use when the user has a working local nao project versioned in Git and wants their team's deployed instance to always reflect the latest committed context. Covers nao deploy usage, the GitHub Actions workflow, organization API keys, GitHub Secrets, .naoignore, environment-variable references in naoconfig.yaml, and create-vs-update behavior. D

설치 수
2
GitHub Stars
1.9천
업데이트
10월 20일