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.00029 | $0.00570 |
| Opus 5.5 | $0.00012 | $0.00228 |
| Sonnet 5.5 | $0.00006 | $0.00114 |
| Haiku 4.5 | $0.00003 | $0.00057 |
Grade A, and why
pinescript-to-python-translator 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 1mo 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.
- 1mo ago First seen · 40 lines · 29 tokens per session scan A ccc4bae561df
pinescript-to-python-translator is a skill published in the GitHub repository mphinance/alpha-skills (28 stars, last pushed 10d ago), licensed MIT. It adds 29 tokens to every session and 570 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.
Other skills, from other repositories
vnpy-export
Export a Vibe-Trading backtest strategy to a runnable vnpy CtaTemplate Python class — supports A-share equities, futures, and crypto via BarGenerator + ArrayManager.
yfinance
Skill "yfinance" from HKUDS/Vibe-Trading, covering yfinance, deep yahoo interfaces (references/), quick start, ticker format conversion and supported data types.
tqsdk-trading-and-data
Explain, implement, or debug TqSdk Python workflows for waitupdate or ischanging update loops, market data retrieval, historical download, account type selection, funds or positions or orders or trades, field meanings, order placement or cancellation, target-position tools, TqScenario margin trials, real-account…
miniqmt-to-bigqmt
A conversion guide for moving Python trading strategies from miniQMT, an external trading setup, into the Python environment built into bigQMT, a trading client. It covers code changes, compatibility checks, deployment, and live-trading verification.
tushare
A Python interface to Tushare, a financial-data service providing market, company, fund, futures, and other finance-related data. It shows how to authenticate and query the service into pandas tables.
yfinance
Skill "yfinance" from skloxo/TideTrading, covering yfinance, deep yahoo interfaces (references/), quick start, ticker format conversion and supported data types.