Skip to content
Finance
Skill

/pine-visualizer

Analyzes trading concepts and YouTube videos to extract Pine Script specifications. Use when planning indicators or analyzing video tutorials.

BOOST
From plugin
pinescript
21412 skills3 agents3 commands2 hooks
+1
Install
$ npx -y skills add traderspost/pinescript-agents --skill pine-visualizer --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/pine-visualizer

Context preview

The summary Claude sees to decide when to auto-load this skill.

Analyzes trading concepts and YouTube videos to extract Pine Script specifications. Use when planning indicators or analyzing video tutorials.

SKILL.md

pine-visualizer.SKILL.md
name: pine-visualizer
description: Analyzes trading concepts and YouTube videos to extract Pine Script specifications. Use when planning indicators or analyzing video tutorials.
allowed-tools: Read, Glob, Grep, Bash, WebFetch

Pine Script Visualizer

Specialized in decomposing complex trading ideas into actionable Pine Script components.

YouTube Video Analysis

CRITICAL: When a YouTube URL is Provided

**IMMEDIATELY run the video analyzer** - do not ask for permission:

python tools/video-analyzer.py "<youtube_url>"

Video Analyzer Features

The tool automatically: 1. **Fetches video metadata** (title, author, duration) 2. **Extracts transcript** using the fastest available method:

  • First tries YouTube's built-in captions (instant)
  • Falls back to Whisper transcription if needed

3. **Analyzes trading content**:

  • Detects indicators (RSI, MACD, EMA, Bollinger Bands, etc.)
  • Identifies patterns (breakout, divergence, crossover, etc.)
  • Extracts entry/exit conditions
  • Finds risk management rules
  • Captures specific parameters (periods, percentages, levels)

4. **Generates a specification** for Pine Script implementation 5. **Saves analysis** to `projects/analysis/` for reference

Command Options

# Standard analysis (uses YouTube captions, fast)
python tools/video-analyzer.py "https://youtube.com/watch?v=ABC123"

# Force Whisper transcription (slower but works without captions)
python tools/video-analyzer.py "https://youtube.com/watch?v=ABC123" --whisper

# Use larger Whisper model for better accuracy
python tools/video-analyzer.py "https://youtube.com/watch?v=ABC123" --whisper --model medium

# Output raw JSON for programmatic use
python tools/video-analyzer.py "https://youtube.com/watch?v=ABC123" --json

After Video Analysis

1. **Review the analysis** with the user 2. **Confirm understanding** - ask if the extracted concepts match their expectations 3. **Refine if needed** - user can describe adjustments 4. **Proceed to implementation** - hand off to pine-developer skill

CRITICAL INSTRUCTIONS

  • **NEVER use WebSearch for YouTube videos** - use the local analyzer
  • **DO NOT ask permission** - run analysis immediately when URL is detected
  • **ALWAYS show the summary** to the user for confirmation
  • **Transcripts are cached** - re-analyzing the same video is instant

⚠️ CRITICAL: UDT-First Planning

**When breaking down trading ideas, ALWAYS plan for UDT architecture FIRST.**

When to Plan for UDTs

Plan for UDT architecture when the trading idea involves:

  • Multiple related data points (e.g., regression: slope, intercept, R-value)
  • Drawing objects that need to be managed together (lines, fills, labels)
  • Collections of similar items (e.g., swing highs, order blocks, zones)
  • Historical lookback beyond 5000 bars

UDT Planning Template

When decomposing a trading idea, include this section:

UDT ARCHITECTURE:
1. Type Definition
   - What fields does each instance need?
   - Include time + bar_index for coordinates
   - Include drawing objects as fields

2. Storage
   - Single var array for collection
   - Named instances for special cases (original, live, current)

3. Methods
   - delete(): Clean up drawing objects
   - draw(): Create visuals using xloc.bar_time
   - calculateY(): If line-based calculations needed

4. Coordinate Strategy
   - Store TIME when events occur (for unlimited lookback drawing)
   - Store bar_index for Y calculations (slope * bar + intercept)

Example: Planning a Swing High Detector

**User Request**: "Create an indicator that marks swing highs and draws levels from them"

**UDT-First Breakdown**:

UDT ARCHITECTURE:
1. Type Definition:
   type SwingHigh
       int detectedTime      // When swing was detected
       int detectedBar       // For Y calculations
       float price           // The high price
       int confirmedTime     // When confirmed
       line levelLine = na   // Horizontal level from swing
       label marker = na     // Label marking the swing

2. Storage:
   var array<SwingHigh> swingHighs = array.new<SwingHigh>()
   var SwingHigh currentPending = na  // Unconfirmed swing

3. Methods:
   method delete(SwingHigh this) =>
       if not na(this.levelLine)
           line.delete(this.levelLine)
       if not na(this.marker)
           label.delete(this.marker)

   method draw(SwingHigh this, color lineColor) =>
       this.delete()
       // Use xloc.bar_time for unlimited lookback!
       this.levelLine := line.new(this.detectedTime, this.price,
            time, this.price, xloc=xloc.bar_time, ...)
       this.marker := label.new(this.detectedTime, this.price,
            "SH", xloc=xloc.bar_time, ...)

4. Coordinate Strategy:
   When swing detected:
       capturedTime := time        // For drawing
       capturedBar := bar_index    // For calculations

Anti-Patterns to Flag Early

When analyzing a trading idea, flag these issues:

| If the idea has... | Flag this issue... | Recommend instead... | |--------------------|--------------------|----------------------| | Multiple related values | Don't use parallel arrays | Use single UDT array | | Historical drawings | bar_index has 5000 limit | Use xloc.bar_time | | Repeated drawing code | DRY violation | UDT draw() method | | Manual line deletion | Error-prone | UDT delete() method |

Pine Script v6 2025 Planning Considerations

When analyzing and planning implementations, consider these critical 2025 updates:

Breaking Changes to Flag Early

**March 2025: Use `for...in` for Collections** When planning loop-based implementations (order blocks, swing detection, pattern scanning):

// ✅ BEST: Use for...in for arrays (safe, clean, preferred)
for element in myArray
    // Process element directly - no boundary issues

// ✅ BEST: With index when needed (e.g., order blocks, swing points)
for [index, element] in myArray
    // Have both index and value

// ✅ Works with ma
Read more
Ships withpinescript

A comprehensive Pine Script development environment powered by Claude Code's Skills system. This tool helps you create professional TradingView indicators and strategies with AI assistance. Just type start to begin!

Get the whole plugin

Other skills on pinescript.