# pine-debugger

A skill that hunts down errors and odd behaviour in TradingView Pine Script. It drops debugging tools straight into your code.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 460 installs · ★ 218
- Author: TradersPost
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/TradersPost/pinescript-agents/tree/HEAD/skills/pine-debugger/SKILL.md
- Updated: 2026-07-23
- HTML: https://affpapa.org/en/nevibecode/skills/pine-debugger

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/pine-debugger/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/pine-debugger/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/pine-debugger/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/pine-debugger/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install TradersPost/pinescript-agents pine-debugger
```

2. **Manually: put the files in place**
- File: `.github/skills/pine-debugger/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/TradersPost/pinescript-agents --path skills/pine-debugger
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/pine-debugger/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add TradersPost/pinescript-agents --skill pine-debugger -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/TradersPost/pinescript-agents/tree/HEAD/skills/pine-debugger/SKILL.md

## When to use it
- 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
- add a debug table with RSI and the signal to my script
- why does my `for` loop over the array never finish?
- check if my indicator repaints

## Similar
- [adk-debugger](https://affpapa.org/en/nevibecode/skills/adk-debugger.md) — skill · 1600 installs
- [debugger](https://affpapa.org/en/nevibecode/skills/zhaono1-debugger.md) — skill · 745 installs
- [node-inspect-debugger](https://affpapa.org/en/nevibecode/skills/node-inspect-debugger.md) — skill · 396 installs
- [ios-debugger-agent](https://affpapa.org/en/nevibecode/skills/ios-debugger-agent.md) — skill · 105 installs
- [incident-response-debugger](https://affpapa.org/en/nevibecode/agents/incident-response-debugger.md) — subagent · ★ 41729
- [argent-metro-debugger](https://affpapa.org/en/nevibecode/skills/argent-metro-debugger.md) — skill · 26300 installs

From the same set: [traderspost/pinescript-agents](https://affpapa.org/en/nevibecode/by/traderspost/pinescript-agents.md) — 5 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
