pine-authoring

pine-authoring is a skill for Claude Code from Miha21222/tradingview-mcp. It costs 59 tokens per session (609 once invoked), scanned A, original, MIT.

A Pine Script v5 writing and checking workflow for TradingView indicators and strategies. Pine Script is TradingView’s programming language for chart tools and backtesting rules.

In plain words
What is it for?
Use it to turn an indicator or strategy idea into Pine code, compile it, fix reported errors, and review non-fatal warnings.
Why use it?
It catches syntax and type errors before you paste a script into TradingView, and returns the relevant line and column for each error.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the tradingview-mcp plugin — 10 skills, 1 MCP server shipped together

Good fit Use it to turn an indicator or strategy idea into Pine code, compile it, fix reported errors, and review non-fatal warnings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/miha21222/tradingview-mcp/pine-authoring
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Miha21222/tradingview-mcp --skill pine-authoring
Clone the repo
git clone --depth 1 https://github.com/Miha21222/tradingview-mcp

Made for: Claude Code.

Or install tradingview-mcp, the plugin that ships this one along with the rest of its 10 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pine-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/miha21222/tradingview-mcp/pine-authoring/github.svg)](https://agentmods.dev/skills/miha21222/tradingview-mcp/pine-authoring)
Your own site
<a href="https://agentmods.dev/skills/miha21222/tradingview-mcp/pine-authoring"><img src="https://agentmods.dev/badge/skills/miha21222/tradingview-mcp/pine-authoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pine-authoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/miha21222/tradingview-mcp/pine-authoring"><img src="https://agentmods.dev/badge/skills/miha21222/tradingview-mcp/pine-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 609 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.00609
Opus 5 $0.00030 $0.00304
Sonnet 5 $0.00012 $0.00122
Haiku 4.5 $0.00006 $0.00061

Measured 9d ago against content hash 440ca779fe94, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pine-authoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pine-authoring/SKILL.md · 55 lines

What it actually says

Pine Script authoring with a compiler loop

Write Pine v5 and verify it against TradingView's real compiler in a loop: author → compile → fix errors → recompile. Nothing is published or saved to any TradingView account — this is a read-only compile/typecheck workflow.

When to use

  • You have a strategy/indicator idea and need working Pine source.
  • You're debugging a compiler error and want line/column feedback fast.
  • You want to sanity-check Pine syntax before pasting it into TradingView.

Tools

  • tv_pine_compile(source) — the whole loop. POST the full source (including the //@version=5 line); returns {success, errors[], warnings[]}.

Workflow

  1. Draft the script with the //@version=5 header.
  2. Call tv_pine_compile(source).
  3. If success is false, read each error (message, line, column), fix, and recompile. warnings are non-fatal but worth reading.
  4. Repeat until success: true (no errors), then paste into TradingView.

Common Pine v5 gotchas

  • //@version=5 must be the first line.
  • Indicator vs strategy: indicator("...", overlay=true) vs strategy("...", ...); strategy.* functions (entry, exit, close) only work in a strategy.
  • Built-in variables are close, high, low, open, volume, time, bar_index.
  • ta.* (e.g. ta.sma, ta.crossover) replaces the old sma()/crossover() forms.
  • Series vs simple: don't use a series in a static position (e.g. line.new coordinates need to be passed correctly).
  • input.* for user parameters; plot() for output.
  • Beware request.security() syntax (symbol, timeframe, expression, gaps) for higher-timeframe context.

Error reading

The endpoint's success field can be true even with errors — the tool derives true success = processed AND zero errors. Errors carry start.line/column when the compiler provides them; the tool normalizes both inline (line N col M ...) and structured positions.

References

  • references/pine-notes.md — more idioms and traps.
  • The endpoint is undocumented and may change; treat compile failures as "recheck the endpoint" if the source is clearly valid.
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 55 lines · 59 tokens per session scan A 440ca779fe94

Subscribe to this mod's changes

pine-authoring is a skill published in the GitHub repository Miha21222/tradingview-mcp (0 stars, last pushed 13d ago), licensed MIT. It adds 59 tokens to every session and 609 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories