TradingView Lightweight Charts Skill
Equips AI assistants with TradingView Lightweight Charts v5 API conventions and common foot-guns, so generated financial chart code actually runs.
Pure knowledge skill: no scripts, network calls, or side effects — inherently least privilege. It embeds verify-before-answer commands (local typings/package.), mandates honest disclosure when files are unavailable, forbids inventing APIs, and disambiguates the third-party Python wrapper, giving good data-flow transparency. Deductions: static review cannot confirm runtime behavior; no confirmation/rollback concepts (largely N/A for docs), and publisher is registry-unverified, so not full marks.
Internally consistent: version-detection order, v4→v5 replacement matrix, triage table, and clear failure guidance (state what could not be verified). Static cap of 10 applies; the repo has CI workflows (deploy.yml, pkg-pr-new.yml) and unit/e2e suites, but they cover the library, not the skill's key paths, so only a small uplift to 11.
Description and body match well: clear audience, trigger scenarios (series, scales, markers, plugins, wrappers), non-fit boundaries (Python wrapper; non-time horizontal axes require triage), and consumer/upstream environment detection. Deductions: no Chinese-language support note; reliance on unpkg/GitHub/official site without mainland-China reachability disclosure; no explicit false-trigger negative list beyond the wrapper check.
Well-layered docs: lookup order, mental model, triage, foot-guns, routing map, recipes. License (Apache-2.0) and version anchoring (v5, package. 5.2.1) are clear; upstream README provides install path (npx skills add) and maintenance ownership (TradingView). Deductions: no changelog/version history for the skill itself, no dedicated FAQ/known-limitations section, and many routing-table repo paths are not verifiable from the provided evidence.
Directly addresses high-frequency pain points (UTCTimestamp seconds, setMarkers migration, nonexistent timezone option, per-bar colors, SSR) with copy-pasteable v5-correct code — clear marginal value over manual doc lookup or stale snippets. Static cap of 7: examples unexecuted, direct-usability of outputs unverified against representative results.
The skill itself mandates local-typings-first verification with copyable rg/node commands — auditable primary material; repo CI and test suites corroborate maintenance quality. However, no independent third-party reproduction of the skill itself, and many routing-table doc paths are unconfirmed in this evidence, so not above 5.
- This is a static source review; no commands or code examples were executed and example correctness is unverified at runtime.
- No Chinese-language support is declared; the plain-HTML recipe and several referenced resources depend on unpkg, GitHub, and overseas sites — mainland-China reachability must be confirmed independently.
- Repo paths referenced in the routing table (website/docs, plugin-examples, etc.) were not individually verified in this evidence; consumer projects should rely on local node_modules typings first.
- Publisher is TradingView's official repository but unverified by the FollowSkills registry; the skill has no independent version or changelog — re-check currency against future v5.x releases.
What does this skill do, and when should you use it?
This is the official Agent Skill shipped inside TradingView's lightweight-charts repository, teaching AI coding assistants how to use the v5 API correctly. It covers chart and series creation, time and price scales, realtime data updates, panes, markers, watermarks, plugin/primitive extension, and React/Vue/Web Components wrappers. Its core value is stopping assistants from copying stale v4 snippets — calls like addLineSeries and series.setMarkers no longer exist in v5. It also bakes in concrete fixes for classic traps such as seconds-vs-milliseconds timestamps, timezone display, and the setData versus update distinction.
The skill instructs the assistant to first detect whether it is in a consumer app or an upstream source checkout: in the former it reads node_modules/lightweight-charts/package. and dist/typings.d.ts to establish version and API surface; in the latter it reads the repo's dist/typings.d.ts and src/. It provides an eight-layer mental model (chart, series, scales, data, interaction, layout, extension, wrappers), a v4-to-v5 replacement matrix, a routing map from problem to official docs paths, and copy-paste recipes for realtime updates, dual price scales, volume panes, per-bar colors, markers, timezone formatting, coordinate conversion, Next.js client-only components, and the plugin scaffold. Its answer contract requires naming the relevant v5 API, showing one minimal snippet, calling out the main foot-gun, and stating what local source was verified.
- A frontend developer integrating their first candlestick or line chart in a React/Next.js project who needs correct v5 initialization and teardown lifecycle
- A developer who pasted outdated v4 snippets (series.setMarkers, addLineSeries) and needs migration to v5 equivalents
- A trading tool developer pushing WebSocket ticks to update the latest bar without setData resetting the visible range
- A market-data dashboard needing dual price scales, a separate volume pane, or per-bar red/green coloring
- A plugin author building drawing tools, watermarks, or overlays via series/pane primitives or custom series
- Anyone displaying non-time horizontal axes (option chains) or DST-safe timezone labels via Intl.DateTimeFormat
What are this skill's strengths and limitations?
- Maintained by TradingView inside the official repository, so API information is authoritative
- Gives assertion-style fixes for the highest-frequency failure modes: stale v4 snippets, seconds vs milliseconds timestamps, setData vs update
- Enforces verification against local typings and forbids inventing option names or methods
- Covers vanilla JS through React/Vue/Web Components, SSR, and standalone browser loading
- Apache-2.0 licensed, free to use
- Covers only lightweight-charts; no help for other charting libraries (ECharts, Highcharts, etc.)
- Designed for v5; users pinned to v3/v4 get migration guidance rather than deep legacy support
- Assumes a Node.js environment (typings must be readable from node_modules), so value is limited in pure browser sandboxes
- No standalone automated test suite; effectiveness depends on the host assistant actually loading and following the skill
- The third-party Python wrapper (lightweight_charts) is explicitly out of scope, identified and flagged only
How do you install this skill?
From your project root run: npx skills add https://github.com/tradingview/lightweight-charts — the install command given in the README. This registers .github/skills/lightweight-charts/SKILL.md with compatible assistants (Claude Code, Codex, etc.).
How do you use this skill?
Once installed, the skill is applied automatically when you ask lightweight-charts questions, e.g. "Create a v5 candlestick chart with a volume pane" or "Why does my chart snap to the right edge on every new data point?". The skill instructs the assistant to verify against the installed package's typings first, so the lightweight-charts npm package should already be installed; otherwise the assistant is required to state that it could not verify rather than invent APIs.
How does this skill compare with similar options?
Unlike generic frontend-charting skills, this is a library-specific deep knowledge base: it does not discuss visualization best practices in general but aligns precisely with lightweight-charts v5 APIs and official documentation paths. If your project uses another charting library, pick that library's skill or rely on general documentation.