DP

double232/pinescript-skill

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

11 stars 品質 37 トレンド 8

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.md in your repo root
  • Global: ~/.claude/skills/pinescript.md

Usage

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 .pine file
GitHub で README 全文を見る

推奨ツール

別のキーワードを試すか、フィルタを外してください。

インストール

npx skillfish add double232/pinescript-skill
MCP 初心者?mcpskill.org のガイドから始めましょう →