pine-debugger — Claude Code skill: debug Pine Script
A skill that hunts down errors and odd behaviour in TradingView Pine Script. It drops debugging tools straight into your code.
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a claude-codeWhat pine-debugger does
The skill covers the usual Pine Script v6 failures and shows how to get around them. It ships with ready-made techniques: a label value inspector, a table-based variable monitor, a loop iteration counter, a repainting detector, an na tracker, plus debugging for request.security() and conditional input calls. The agent reads your script, finds the spot that misbehaves and inserts the debug block.
A good chunk of it is about traps. for loop boundaries are now re-evaluated on every iteration, so a loop over a growing array never ends; the skill points you to for...in or to caching the size before the loop. It also catches line continuation errors, plot inside local scope, and bid/ask returning na outside the tick timeframe.
The skill touches files through Read, Edit, Grep and Glob. No API keys, no external services. One caveat: part of the material describes 2025 Pine Script changes, so if your script targets an older version, the for...in and input active advice won't apply.
What it helps with
- find why a loop over an array hangs
- add a debug label showing indicator values
- check whether a signal repaints on history
- trace where a variable turns into
na - fix a line continuation error in a ternary
Example prompts for the agent
- add a debug table with RSI and the signal to my script
- why does my
forloop over the array never finish? - check if my indicator repaints
How to install pine-debugger
1Skills CLI (Vercel)
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a claude-code2Manually: put the files in place
~/.claude/skills/pine-debugger/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/pine-debugger/
1Skills CLI (Vercel)
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a codex2Manually: put the files in place
.agents/skills/pine-debugger/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a cursor2Manually: put the files in place
.cursor/skills/pine-debugger/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install TradersPost/pinescript-agents pine-debugger2Manually: put the files in place
.github/skills/pine-debugger/SKILL.md1Skills CLI (Vercel)
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a gemini-cli2Platform CLI
gemini skills install https://github.com/TradersPost/pinescript-agents --path skills/pine-debuggerManually: put the files in place
.devin/skills/pine-debugger/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about pine-debugger
How do I install pine-debugger in Claude?
Run npx skills add TradersPost/pinescript-agents --skill pine-debugger -a claude-code. The skill lands in ~/.claude/skills/pine-debugger/SKILL.md.
What does pine-debugger do?
It troubleshoots Pine Script errors and unexpected behaviour, then adds debugging tools to the code: labels, tables, counters and a repainting detector.
What tools does the skill need?
It works through Read, Edit, Grep and Glob, so it reads and edits files in your project. No external API access is involved.