lightweight-charts-plugin-authoring
하는 일
이 스킬은 AI 에이전트가 Lightweight Charts 라이브러리의 플러그인을 만들고, 고치고, 공개하도록 돕습니다. 금융 차트에 맞춤 그리기나 시리즈를 추가하려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓기본 시리즈가 제공하지 않는 맞춤 그리기를 차트에 넣고 싶을 때.
- ✓기존 Lightweight Charts 플러그인의 버그를 고쳐야 하는 경우.
- ✓차트 아이디어를 다른 개발자가 쓸 수 있는 플러그인으로 만들 때.
스킬 링크
https://github.com/tradingview/lightweight-charts/blob/master/.github/skills/lightweight-charts-plugin-authoring/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“두 가격선 사이에 음영 밴드를 그리는 Lightweight Charts 플러그인을 만드는 것을 도와주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 아이디어에 맞는 플러그인 유형을 고르고, 프로젝트를 설정하며, 라이브러리의 타이핑 정보를 확인합니다. 그다음 라이브러리가 제공하는 도우미 도구로 플러그인 코드를 작성합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Writing a Lightweight Charts™ plugin
This skill is about authoring plugins. For questions about using the chart
itself — series, scales, markers, data, wrappers — use the sibling
lightweight-charts skill; the two are designed to be installed together.
Where you are, and where the sources are
This skill is used in two places, and the same question has a different answer in each. Detect which before looking anything up:
# upstream checkout of lightweight-charts itself?
test -f pnpm-workspace.yaml && test -d packages/lwc-toolkit && echo upstream || echo "a plugin project or other repo"
In a plugin project or any other repository (the common case):
| Looking for | Where |
|---|---|
| the library's API | node_modules/lightweight-charts/dist/typings.d.ts; if it is not installed, the released typings are hosted at https://tradingview.github.io/lightweight-charts/lightweight-charts.d.ts |
| the toolkit's API | node_modules/@tradingview/lwc-toolkit/dist/<module>.d.ts — the .d.ts carry the doc comments, so they read as documentation |
| a reference plugin's source | not in node_modules (packages ship dist/ only). Fetch it from GitHub: https://raw.githubusercontent.com/tradingview/lightweight-charts/master/packages/lwc-plugin-<name>/src/<file>, or clone once and read locally: git clone --depth 1 https://github.com/tradingview/lightweight-charts /tmp/lightweight-charts |
| the docs | every docs page is served as Markdown by appending .md to its URL, e.g. https://tradingview.github.io/lightweight-charts/docs/plugins/custom_series.md. https://tradingview.github.io/lightweight-charts/llms.txt lists every page; docs_map.md beside it lists their headings too |
In the upstream checkout: dist/typings.d.ts (or src/) for the library,
packages/lwc-toolkit/src/ for the toolkit, packages/lwc-plugin-*/src/ for
the plugins, website/docs/plugins/*.md for the docs, plugin-examples/ for
the proof-of-concept examples.
# what version is installed, and does the hook I am about to rely on exist in it?
node -p "require('lightweight-charts/package.json').version"
rg -n "hitTest|conflationReducer|isHovered|ICustomSeriesPaneView|IPrimitivePaneRenderer" node_modules/lightweight-charts/dist/typings.d.ts
# the toolkit's custom-series surface
rg -n "export (declare )?(function|class|interface|type)" node_modules/@tradingview/lwc-toolkit/dist/custom-series/*.d.ts
# a reference implementation, without a checkout
curl -fsSL https://raw.githubusercontent.com/tradingview/lightweight-charts/master/packages/lwc-plugin-stacked-bars-series/src/renderer.ts
Local typings win over the docs when they disagree: the docs describe the current release, the typings describe what the user actually has. If a file is missing, say what could not be verified. Never invent an option, a hook or a toolkit export — a plugin that compiles against an imagined API fails the user's typecheck, and one that compiles against an option the chart ignores fails silently at runtime.
From idea to plugin type
The single most consequential decision, and the one to make first. Ask what the idea is rather than how it looks:
| The idea is… | Type | Because |
|---|---|---|
| a new way to draw a series' own data (bars, bands, stacks, candles) | custom series | it needs its own data, autoscale, price line, last value and time-scale integration |
| a decoration tied to one series (label, marker, band around it, drawing tool on its data) | series primitive | it reads that series' coordinates and is clipped to it |
| a decoration tied to the pane (watermark, legend, title, an overlay for every series) | pane primitive | it spans the pane and outlives any one series |
| a DOM-based accessibility, tooltip or control layer | pane primitive with a DOM overlay | the canvas is not the right medium; append to paneContentElement(pane) |
Default to a primitive. A custom series is the heavier construct — it must
implement priceValueBuilder, isWhitespace, renderer and update, and
its renderer is called with the series' plot data. Only choose it when the
idea is a series. A drawing tool that needs pointer handling is still a
primitive: it draws in a primitive and reacts through subscribeClick,
subscribeCrosshairMove and the coordinate-conversion APIs.
Keep hover and interaction in mind when choosing: primitives get a hitTest
so the chart can report them in crosshair and click even
자주 묻는 질문
에이전트가 만들도록 도울 수 있는 플러그인 종류는 무엇인가요?
맞춤 시리즈, 시리즈 프리미티브, 패널 프리미티브를 다루며, 아이디어에 맞는 유형을 고르도록 돕습니다.
에이전트가 라이브러리의 실제 API를 확인하나요?
네. 옵션이나 메서드 이름을 쓰기 전에 설치된 타이핑 정보나 공식 타이핑 정보를 읽습니다.
플러그인이 아닌 차트 자체에도 도움을 주나요?
직접적으로는 아닙니다. 일반적인 차트 질문에는 별도의 Lightweight Charts 스킬이 더 잘 맞습니다.
상세 정보
작성자의 원본 설명
Use when creating, extending, debugging or publishing a Lightweight Charts™ plugin — a custom series, a series primitive or a pane primitive — or when turning a chart idea ("I want the chart to show/draw X") into a working plugin. Covers choosing the plugin type, scaffolding with create-lwc-plugin, building on @tradingview/lwc-toolkit instead of hand-rolled helpers, which of the official plugin packages to read as the reference implementation, where the docs are, and the autoscale, whitespace, visible-range, hit-test and conflation mistakes every plugin author makes once. Reach for it whenever
인기도
- GitHub 스타
- 18k
- 순위
- #10734
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.