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.
npx skills add mphinance/alpha-skills --skill pine-to-pythongit clone --depth 1 https://github.com/mphinance/alpha-skillsWrote 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.
[](https://agentmods.dev/skills/mphinance/alpha-skills/pine-to-python)<a href="https://agentmods.dev/skills/mphinance/alpha-skills/pine-to-python"><img src="https://agentmods.dev/badge/skills/mphinance/alpha-skills/pine-to-python/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.
<a href="https://agentmods.dev/skills/mphinance/alpha-skills/pine-to-python"><img src="https://agentmods.dev/badge/skills/mphinance/alpha-skills/pine-to-python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00025 | $0.00566 |
| Opus 5.5 | $0.00010 | $0.00226 |
| Sonnet 5.5 | $0.00005 | $0.00113 |
| Haiku 4.5 | $0.00003 | $0.00057 |
Grade A, and why
pine-to-python 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 21d 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.
How it starts
The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🌲 PineScript to Python Translator
This skill is designed to take raw TradingView PineScript files (.pine) and rigorously deconstruct them into Python-native components so they can be optimized using vectorization and tools like Optuna.
When to use this skill
Use this skill when you want to migrate a backtest from the TradingView ecosystem into a headless Python environment. This is critical for running multi-fold Walk-Forward Analysis (WFA) and Monte Carlo simulations that TradingView cannot handle.
Workflow
-
Deconstruction & Classification (The IR Build)
- Parse the
.pinescript to identifyinput(),input.int(),input.float(), andinput.bool(). - Classify parameters into three buckets:
- Signal: Parameters that dictate entries (e.g.,
length,crossover_threshold). - Risk: Parameters that dictate exits (e.g.,
stop_ticks,trail_offset). - Display: Parameters used only for plotting/UI (discard these).
- Signal: Parameters that dictate entries (e.g.,
- Parse the
-
Boundary Extraction
- For every Signal and Risk parameter, extract the
minval,maxval, andstepif provided. - Format these into Optuna trial suggestions (e.g.,
trial.suggest_int('length', 10, 50)).
- For every Signal and Risk parameter, extract the
-
Logic Translation
- Translate PineScript technical analysis functions (
ta.sma,ta.ema,ta.rsi) into theirpandas-taornumpyequivalents. - Vectorize the entry and exit conditions. Do not use standard
forloops over rows unless path-dependency strictly requires it. Usenp.whereand.shift()wherever possible.
- Translate PineScript technical analysis functions (
-
Hardening & Auditing
- Repaint Risk: Scan the translation for anything relying on the current unclosed bar data. Force the use of
.shift(1)for signal generation. - Division by Zero: Wrap all denominators in a
np.maximum(denominator, 1e-8)guard to prevent NaN explosions during optimization.
- Repaint Risk: Scan the translation for anything relying on the current unclosed bar data. Force the use of
Output Format
The output should be a single Python file containing:
- An
extract_features(df, params)function that builds all the indicators based on a parameter dictionary. - A
generate_signals(df)function that creates asignalcolumn (1 for Long, -1 for Short, 0 for Flat). - A
get_optuna_space(trial)function that returns the hyperparameter search space dictionary.
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.
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.
- 21d ago Changed · -4 tokens per session 6b014ab1a0e9
- 2mo ago First seen · 40 lines · 29 tokens per session scan A ccc4bae561df
pine-to-python is a skill published in the GitHub repository mphinance/alpha-skills (34 stars, last pushed 22d ago), licensed MIT. It adds 25 tokens to every session and 566 once invoked, about $0.0001 per session on Opus 5.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-09-14.
pine-to-python compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pine-to-pythonmphinance/alpha-skills | Skill | 34 | 22d ago | MIT | A | 25 | Claude Code |
| vnpy-exportHKUDS/Vibe-Trading | Skill | 40k | yesterday | MIT | A | 40 | Claude Code, Codex |
| yfinanceHKUDS/Vibe-Trading | Skill | 40k | yesterday | MIT | A | 41 | Claude Code, Codex |
| tqsdk-trading-and-datashinnytech/tqsdk-python | Skill | 5.2k | 9d ago | Apache-2.0 | A | 88 | Codex |
| miniqmt-to-bigqmtlitaolemo/xtquant_big_convert | Skill | 826 | 1mo ago | MIT | A | 144 | Claude Code, Codex |
| ssquantsongshuquant/ssquant | Skill | 129 | 1mo ago | MIT | A | 0 | Claude Code, Codex |
| tushareskloxo/TideTrading | Skill | 15 | 22d ago | MIT | A | 79 | Claude Code, Codex |