사용 방법
- 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
- 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
- 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/getnao/nao --skill build-custom-charts시작 전 확인
- 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
- 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
build-custom-charts
Use this skill when a project needs a visualization beyond nao's built-in chart types.
Create a chart
Add agent/charts/<type>.js, where <type> starts with a lowercase letter and may then contain lowercase letters, numbers, hyphens, or underscores. It must not collide with a built-in chart type (such as bar, line, pie) or table. Names that break these rules are silently ignored. The file must export a render function:
export function render(element, context) {
const { data, config, colors, theme, libs } = context;
element.textContent = `${data.length} rows`;
return () => element.replaceChildren();
}The context contains:
data: rows from the referencedexecute_sqlresultconfig:chartType,xAxisKey,xAxisType,series, andtitlecolors: nao's default chart palettetheme:lightordarklibs: the installedReact,ReactDOM, andRechartsmodules
Use plain JavaScript without JSX. Do not import bare package names; use the libraries from context.libs. A React chart must return a cleanup function that unmounts its root.
Optionally add agent/charts/<type>.json:
{
"name": "Bubble chart",
"description": "Shows two numeric axes while marker size represents a third measure."
}The description tells the agent when to select the chart. Without metadata, nao derives a name from the file name.
Constraints
- Custom charts render only in authenticated, interactive web chats.
- Stories, PNG exports, automations, MCP embeds, and messaging channels use built-in charts.
- Keep modules self-contained and treat them as trusted project code.
- Return cleanup for event listeners, timers, React roots, and other resources.
- Editing the module reloads active custom charts within a few seconds.

