
double232/pinescript-skill
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Pine Script v6 skill for Claude Code -- hard language constraints, LLM error prevention, complete reference
개요
A Claude Code skill for writing Pine Script v6 code that compiles on the first try. LLMs are notoriously bad at Pine Script. They hallucinate deprecated function names, nest functions inside if blocks, put plot() in local scope, and bundle var-state functions into request.security tuples. This skill prevents all of that by injecting the language's hard constraints, correct namespaces, and anti-repainting rules directly into the assistant's context. Copy SKILL.md into your Claude Code skills directory: - : .claude/skills/pinescript.md in your repo root - : ~/.claude/skills/pinescript.md The skill activates automatically when Claude Code detects Pine Script work: - Type /pinescript to explicitly activate it - Ask Claude to "write a pine script", "fix this pine compile error", or "build a tradingview strategy" - Work with any .
README
원문 README의 일부입니다. 원문 보기.
pinescript-skill
A Claude Code skill for writing Pine Script v6 code that compiles on the first try.
LLMs are notoriously bad at Pine Script. They hallucinate deprecated function names, nest functions inside if blocks, put plot() in local scope, and bundle var-state functions into request.security tuples. This skill prevents all of that by injecting the language’s hard constraints, correct namespaces, and anti-repainting rules directly into the assistant’s context.
What it covers
| Section | What you get |
|---|---|
| Hard constraints | 6 compile-or-die rules – nested functions, tuple limits, var-state isolation, lazy and/or traps |
| LLM error prevention | Namespace mapping table (pre-v5 -> v6), global-scope-only functions, ta.* unconditional calling |
| Execution model | Bar-by-bar execution, var vs varip rollback behavior, realtime tick semantics |
| Type system | Qualifier hierarchy (const < input < simple < series), na handling, v6 integer division |
| Language syntax | Inputs, loops, switch expressions, string operations, enums (v6) |
| Data structures | Arrays, maps, matrices, UDTs, methods, method chaining |
| Anti-repainting | request.security parameter rules, barstate.isconfirmed, realistic backtest settings |
| Drawing objects | Lines, boxes, labels, polylines, tables, linefill, plotshape/plotarrow |
| Request functions | request.security, request.security_lower_tf, financials, economic data, ticker.modify |
| Strategy patterns | Entry/exit, pyramiding, ATR position sizing, risk management, session flattening, trailing stops |
| Indicator patterns | Overlay + table, bar coloring, color gradients, session detection |
| Alerts and webhooks | alertcondition vs alert(), webhook JSON, placeholder variables, rate limits |
| Libraries | Creating, exporting, importing, limitations |
| Performance | Built-ins vs loops, consolidating request.security calls, draw-on-last-bar |
| Hard limits | Every resource ceiling (plots, requests, array sizes, execution time, etc.) |
| v5 compatibility | Side-by-side diff table for all breaking changes between v5 and v6 |
| Debugging checklist | 15-point checklist for when a script won’t compile |
Installation
Option 1: Claude Code CLI
claude install-skill https://github.com/double232/pinescript-skill
Option 2: Manual
Copy SKILL.md into your Claude Code skills directory:
- Per-project:
.claude/skills/pinescript.mdin your repo root - Global:
~/.claude/skills/pinescript.md
Usage
The skill activates automatically when Claude Code detects Pine Script work:
- Type
/pinescriptto explicitly activate it - Ask Claude to “write a pine script”, “fix this pine compile error”, or “build a tradingview strategy”
- Work with any
.pinefile
추천 도구
다른 키워드를 입력하거나 필터를 제거해 보세요.
설치
npx skillfish add double232/pinescript-skill