lightweight-charts-plugin-authoring
यह क्या करती है
यह स्किल AI एजेंट को Lightweight Charts लाइब्रेरी के plugins बनाने, ठीक करने और प्रकाशित करने में मदद करती है। यह उन डेवलपर्स के लिए है जो वित्तीय चार्ट में कस्टम ड्रॉइंग या series जोड़ना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आपको चार्ट पर ऐसी कस्टम ड्रॉइंग चाहिए जो बनी-बनाई series नहीं देतीं।
- ✓जब किसी मौजूदा Lightweight Charts plugin में बग ठीक करना हो।
- ✓जब आप चार्ट का कोई विचार एक काम करने वाले plugin में बदल रहे हों, जिसे दूसरे डेवलपर्स इस्तेमाल करें।
Skill का लिंक
https://github.com/tradingview/lightweight-charts/blob/master/.github/skills/lightweight-charts-plugin-authoring/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप Lightweight Charts के लिए ऐसा plugin बनाने में मदद कर सकते हैं जो दो प्राइस लाइनों के बीच एक छायादार पट्टी बनाए?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट आपके विचार के लिए सही plugin प्रकार चुनता है, प्रोजेक्ट सेट करता है और लाइब्रेरी के typings जाँचता है। फिर वह लाइब्रेरी के अपने सहायक टूल का इस्तेमाल करके plugin कोड लिखता है।
तकनीकी सामग्री (मूल 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
अक्सर पूछे जाने वाले सवाल
एजेंट किस तरह के plugins बनाने में मदद कर सकता है?
इसमें कस्टम series, series primitives और pane primitives शामिल हैं, और स्किल आपके विचार के हिसाब से सही प्रकार चुनने में मदद करती है।
क्या एजेंट लाइब्रेरी का असली API जाँचता है?
हाँ। कोई विकल्प या method नाम इस्तेमाल करने से पहले वह इंस्टॉल की गई typings या आधिकारिक typings ऑनलाइन पढ़ता है।
क्या यह केवल plugins के बजाय चार्ट के बारे में भी मदद कर सकता है?
सीधे तौर पर नहीं। सामान्य चार्ट सवालों के लिए अलग 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
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।