mph-pine

mph-pine is a skill for Claude Code from mphinance/alpha-skills. It costs 59 tokens per session (2,626 once invoked), scanned A, original, MIT.

A guide for building TradingView indicators in Pine Script version 6. TradingView is a charting platform, and an indicator is a calculation displayed on its charts.

In plain words
What is it for?
Use it to create or port indicators and strategies, add alerts, reproduce a Python scanner in TradingView, and apply the specified synthwave dashboard style.
Why use it?
It keeps the code compatible with the current language version and preserves the original calculations, field names, constants, and thresholds when adapting an existing signal.

Skill for Claude Code

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

Part of the mph-kit plugin — 28 skills, 6 commands, 3 agents shipped together

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.

agentmods
npx agentmods add skills/mphinance/alpha-skills/mph-pine
Any agent
npx skills add mphinance/alpha-skills --skill mph-pine
Clone the repo
git clone --depth 1 https://github.com/mphinance/alpha-skills

Made for: Claude Code.

Or install mph-kit, the plugin that ships this one along with the rest of its 28 skills, 6 commands, 3 agents.

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 mph-pine

README.md
[![agentmods](https://agentmods.dev/badge/skills/mphinance/alpha-skills/mph-pine.svg)](https://agentmods.dev/skills/mphinance/alpha-skills/mph-pine)
Your own site
<a href="https://agentmods.dev/skills/mphinance/alpha-skills/mph-pine"><img src="https://agentmods.dev/badge/skills/mphinance/alpha-skills/mph-pine.svg" alt="Measured on agentmods" 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 2,626 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.02626
Opus 5 $0.00030 $0.01313
Sonnet 5 $0.00012 $0.00525
Haiku 4.5 $0.00006 $0.00263

Measured 6d ago against content hash 8c84419f1e4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

mph-pine 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 6d 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.

plugins/mph-kit/skills/mph-pine/SKILL.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mph Pine

Build TradingView Pine Script v6 indicators that look and behave like the mphinance house stable (channels.pine, ghost_dashboard.pine, ghost_alpha.pine). Faithful math, clean v6, a synthwave dashboard, and a compressed AI-readable payload row so Gemini or Sam can read the chart.

When to invoke

Use when the user asks to build, port, or extend a TradingView indicator or strategy: "write a pine indicator", "tradingview indicator for X", "port this Python signal to Pine", "add alerts to my script", "/mph-pine". If the user names an existing engine (a Python scanner, a screener rule), treat that as the source of truth and port it faithfully before adding extras.

Flow

  1. Ground on v6 first. Pull current docs (the context7 / pine-script docs MCP, or tradingview.com/pine-script-docs) before writing. Do not trust v5 muscle memory. Confirm the version line is //@version=6.
  2. Find the source of truth. If porting, read the Python or existing Pine end to end and match field names, constants, and thresholds exactly. Cite the constants in a header comment. Only add new behavior after the faithful port is in place, and say plainly which parts are new.
  3. Scaffold in house style. Header comment block, palette consts, grouped inputs, calculations, draw, plots, alerts, dashboard. See the templates below.
  4. Run the v6 landmine checklist (below) against the finished file.
  5. Scan for em dashes. Search the file for U+2014 and U+2013, including code comments and string literals. Replace with a hyphen or comma. This is the single most common house-rule miss in generated code.
  6. Hand off for compile. There is no offline Pine compiler. Load the finished script onto the user's clipboard and tell them to paste it into TradingView's Pine Editor, Save, Add to chart, and report any red error. Fix reported errors and reload the clipboard.
  7. Save and offer to ship. Write to docs/pine/<name>.pine in the relevant repo. Offer /ship. Never commit without being asked.

Read the full file on GitHub · 167 lines

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. 6d ago First seen · 167 lines · 59 tokens per session scan A 8c84419f1e4a

Subscribe to this mod's changes

mph-pine is a skill published in the GitHub repository mphinance/alpha-skills (19 stars, last pushed 8d ago), licensed MIT. It adds 59 tokens to every session and 2,626 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-30.