pinescript
Use when creating or reviewing TradingView Pine Script v6 indicators/strategies/libraries, applying non-repainting best practices, generating Pine Script from other languages, or running Pine Script linting.
How do I install this agent skill?
npx skills add https://github.com/ajoslin/dot --skill pinescriptIs this agent skill safe to install?
- Gen Agent Trust Hubwarn
The skill includes a linter script that is vulnerable to command injection and allows arbitrary command execution via environment variable overrides.
- Socketwarn
1 alert: gptAnomaly
- Snykpass
Risk: LOW · No issues
- Runlayerwarn
5/5 files flagged
What does this agent skill do?
Pine Script
Overview
Provide Pine Script v6 guidance for indicators, strategies, and libraries. Apply non-repainting and performance best practices. Support generating Pine Script via other languages (TypeScript, Python, etc.) by keeping generated output compliant with v6 guidance. Run linting with the bundled script wrapper around pinescript-lint.
Workflow
- Determine script type and version
- Add
//@version=6and chooseindicator(),strategy(), orlibrary().
- Add
- Apply execution model and repainting safeguards
- Use
barstate.isconfirmed, historical offsets, andrequest.security()lookahead guidance.
- Use
- Optimize performance and state
- Prefer
var/varipfor state, limit loops, precompute constants, avoid redundant security calls.
- Prefer
- Generate Pine Script from other languages when needed
- Emit Pine Script v6-compliant output and validate by inspection or TradingView editor diagnostics.
- Lint before delivery (manual Pine Script only)
- Run
node scripts/pinescript_lint.mjs <path>to check formatting and basic issues.
- Run
References
- Pine Script v6 concepts and best practices:
references/pinescript_v6.md - Linting workflow and linter configuration:
references/linting.md
Scripts
- Lint Pine Script files:
scripts/pinescript_lint.mjs - Lint script tests:
scripts/pinescript_lint.test.mjs
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/ajoslin/dot/pinescript">View pinescript on skillZs</a>