When your TradingView Pine Script is throwing errors or producing wrong values, this drops in debugging tools that actually work in Pine's weird execution model. It adds label-based value inspection, table monitors for real-time variables, and detects repainting issues. The source includes ready-to-use snippets for tracking calculation flows and spotting na value propagation, which saves you from Pine's notoriously opaque error messages. One heads up: it's very aware of Pine's line continuation quirks (ternaries across multiple lines will break), so it'll keep you from those frustrating syntax errors. Basically turns Pine's black box into something you can actually see inside.

skills.sh installs
478
GitHub stars
241
last updated
Aug 21, 2026

Install

$ npx -y skills add traderspost/pinescript-agents --skill pine-debugger --agent claude-code

Installs into .claude/skills of the current project.

Files

Pine Script Debugger

Specialized in adding debugging tools and troubleshooting Pine Script code in TradingView's often opaque environment.

⚠️ Pine Script v6 2025 Common Pitfalls

CRITICAL: March 2025 Breaking Change - For Loop Boundaries

for loops now re-evaluate boundaries every iteration.

PREFERRED FIX: Use for...in loops:

// ✅ BEST: Use for...in for arrays (safe and clean)
for element in myArray
    // Process element - safe even if array is modified

// ✅ BEST: Use for...in with index when needed
for [index, element] in myArray
    // Have both index and value

// ✅ for...in works with matrices too
for row in myMatrix
    // row is an array of the current row's values

// ✅ for...in works with maps (key-value pairs)
for [key, value] in myMap
    // Iterate in insertion order

FALLBACK: Cache boundary if traditional for is required:

// ❌ BUG: Infinite loop or unexpected behavior
var arr = array.new<int>()
for i = 0 to array.size(arr)  // Re-evaluated each iteration!
    array.push(arr, i)        // Array grows, loop never ends

Sponsors

Details

Repository
github.com/traderspost/pinescript-agents
Categories
Debugging, Automation & Workflows
First seen
Jun 3, 2026

More from traderspost/pinescript-agents

All 6

Recommended

More Debugging
1secondsky avatarsystematic-debuggingsecondsky/claude-skillsFour-phase debugging framework that ensures root cause investigation before attempting fixes. Never jump to solutions. Use when encountering any bug, test failu457skills.sh installs
2aj-geddes avatarcpu-profilingaj-geddes/useful-ai-promptsProfile CPU usage to identify hot spots and bottlenecks. Optimize code paths consuming most CPU time for better performance and resource efficiency.455skills.sh installs
3aj-geddes avatarintermittent-issue-debuggingaj-geddes/useful-ai-promptsDebug issues that occur sporadically and are hard to reproduce. Use monitoring and systematic investigation to identify root causes of flaky behavior.433skills.sh installs
4pedronauck avatarsystematic-debuggingpedronauck/skillsUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes388skills.sh installs
5davila7 avatarsystematic-debuggingdavila7/claude-code-templatesUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes382skills.sh installs
6mims-harvard avatardevtu-fix-toolmims-harvard/tooluniverseFix failing ToolUniverse tools by diagnosing test failures, identifying root causes, implementing fixes, and validating solutions. Use when ToolUniverse tools f380skills.sh installs