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 iliaal/ai-skills --skill pinescriptgit clone --depth 1 https://github.com/iliaal/ai-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/iliaal/ai-skills/pinescript)<a href="https://agentmods.dev/skills/iliaal/ai-skills/pinescript"><img src="https://agentmods.dev/badge/skills/iliaal/ai-skills/pinescript.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00040 | $0.01425 |
| Opus 5 | $0.00020 | $0.00713 |
| Sonnet 5 | $0.00008 | $0.00285 |
| Haiku 4.5 | $0.00004 | $0.00143 |
Grade A, and why
pinescript 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 8d 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 — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pine Script Development
Verify before implementing: For Pine Script version-specific syntax or new built-in functions, look up current docs via Context7 (query-docs) before writing code. TradingView updates Pine Script frequently and training data may be stale.
Critical Syntax Rules
- Ternary operators MUST stay on one line -- splitting across lines causes "end of line without line continuation" error. For complex ternaries, use intermediate variables:
isBull = close > open barColor = isBull ? color.green : color.red - Continuation lines outside parentheses MUST be indented by a non-multiple of 4 -- same indentation as the start errors, and 4/8/12 spaces parse as a local block and error too (2 spaces is the conventional choice). Inside parentheses (function calls, parenthesized expressions) any indentation works, including multiples of 4
- NEVER use plot() inside local scopes (if/for/functions) -- use conditional value instead:
plot(condition ? value : na) - barstate.isconfirmed -- use to prevent repainting on real-time bars
Platform Limits
500 bars history for request.security() | 500 plot calls | 64 drawing objects | 40 request.security() calls | 100KB compiled size
- Drawings positioned with
xloc.bar_indexreach at most 9,999 bars into the past and 500 into the future; for anything older, switch the drawing toxloc.bar_timeand pass a timestamp (a time value withoutxloc.bar_timeis treated as a future bar index and errors) - Cap drawing growth with a rolling buffer: push each new object into an array, then
line.delete(arr.shift())oncearr.size()exceeds the intended count -- otherwise the oldest drawings silently vanish at the 64-object limit
Performance
- Tuple security calls -- one
request.security()returning[close, high, low]instead of 3 separate calls - Pre-allocate arrays with
array.new<type>(size)instead of push-and-resize - Short-circuit signals: build conditions incrementally, exit early when first condition fails
- Cache repeated calculations in variables -- Pine recalculates every bar
- Iterate collections with
for item in myArray(orfor [i, item] in myArray) instead offor i = 0 to array.size(...) - 1-- the indexed form re-evaluates the bound each pass and breaks when the loop mutates the array's size - Model related values as a user-defined type, not parallel arrays:
type Tradewithfloat entry,int startBar, plusmethodfunctions, stored in onearray<Trade>. Parallel arrays (entries,startBars, ...) desync on any missed push/remove and every operation must be repeated per array; one typed array keeps each object's fields together
What ships with it
2 files 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.
- 8d ago First seen · 93 lines · 40 tokens per session scan A bff20c784565
pinescript is a skill published in the GitHub repository iliaal/ai-skills (41 stars, last pushed yesterday), licensed MIT. It adds 40 tokens to every session and 1,425 once invoked, about $0.0002 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.
Other skills, from other repositories
alpha-evaluate
A multi-step workflow for testing an investment factor, meaning a measurable stock signal, against market data. It examines predictive relationship, grouped returns, risk-adjusted results, consistency, and robustness.
alpha-backtest
A strategy backtesting workflow that tests factor-based stock portfolios on historical data. Backtesting means simulating how a strategy would have performed in the past.
alpha-mine
An automated process for proposing and testing stock-market formulas, called factors, that combine price or trading data with mathematical operations. It screens the candidates using measures such as IC, which compares a factor with later returns.
alpha-autopilot
An automated research loop for investment factors, which are measurable signals used to select or compare stocks. It finds candidates, tests them, records successful ones, monitors active factors, and retires those that weaken.
alpha-library
A manager for a quantitative-finance factor library, where factors are measurable signals used to study or select investments. It stores a registry of factors in a SQLite database and supports several stock markets through data adapters.
alpha-monitor
A monitoring tool for investment factors, which are measurable signals used to select or rank stocks. It checks whether active factors are losing effectiveness or showing health problems across supported stock markets.