Skip to content

Claude Skills and Agents

tradingview-mcp includes predefined skills and agents that provide structured workflows for common tasks. Skills are Claude Code slash commands that invoke multi-step tool sequences. Agents are autonomous task runners configured with a model and tool access.


What Are Skills?

Skills are Markdown files in the skills/ directory, each defining a step-by-step workflow that Claude Code follows when the skill is triggered. They serve as reusable playbooks that ensure consistent, thorough execution of complex tasks.

Each skill file contains:

  • YAML frontmatter with name and description (used for trigger matching)
  • Numbered steps referencing specific MCP tools to call
  • Decision logic for handling different scenarios
  • Cleanup instructions for undoing temporary changes

Skills integrate directly with the MCP tool layer -- every tool reference in a skill file corresponds to an actual tradingview-mcp tool that Claude Code can call.


Skills Reference

chart-analysis

Trigger: User wants technical analysis or chart review.

Workflow:

  1. Set up the chart -- chart_set_symbol, chart_set_timeframe
  2. Add indicators -- chart_manage_indicator (requires full names: "Relative Strength Index", not "RSI"; "Moving Average Exponential", not "EMA")
  3. Customize indicators -- indicator_set_inputs to adjust parameters (e.g., EMA length to 200)
  4. Navigate -- chart_scroll_to_date, chart_set_visible_range
  5. Annotate -- draw_shape for horizontal lines (support/resistance), trend lines, text labels
  6. Capture and analyze -- capture_screenshot, data_get_ohlcv, quote_get, symbol_info
  7. Report -- Current price, key levels, indicator readings, overall bias
  8. Cleanup -- Remove temporary indicators (chart_manage_indicator with "remove") and drawings (draw_clear)

Tools used: chart_set_symbol, chart_set_timeframe, chart_manage_indicator, indicator_set_inputs, chart_scroll_to_date, chart_set_visible_range, draw_shape, capture_screenshot, data_get_ohlcv, quote_get, symbol_info, draw_clear


multi-symbol-scan

Trigger: User wants to compare multiple symbols, screen for opportunities, or scan a watchlist.

Workflow:

  1. Define the scan -- Determine symbols (user-provided or from watchlist_get), timeframe, and criteria
  2. Run the scan using one of three modes:
    • Strategy comparison: batch_run with action get_strategy_results across multiple symbols/timeframes
    • Screenshot comparison: batch_run with action screenshot
    • Custom per-symbol analysis: Loop with chart_set_symbol + chart_set_timeframe + data_get_ohlcv + data_get_indicator
  3. Compile results into a comparison table ranked by the relevant metric
  4. Report -- Ranked list, strongest setups, divergences/anomalies, screenshots of top charts

Watchlist integration: watchlist_get reads all symbols, watchlist_add can save new finds.

Tools used: watchlist_get, watchlist_add, batch_run, chart_set_symbol, chart_set_timeframe, data_get_ohlcv, data_get_indicator, capture_screenshot


pine-develop

Trigger: User wants to build or modify a Pine Script indicator or strategy.

Workflow:

  1. Understand the goal -- Ask about type (indicator/strategy/library), logic, overlay vs. separate pane, inputs
  2. Pull current source (if modifying) -- Run node scripts/pine_pull.js, then read scripts/current.pine
  3. Write the script to scripts/current.pine -- Must include //@version=6, proper declaration, inputs with groups, clear comments
  4. Push and compile -- Run node scripts/pine_push.js which injects code into the Pine Editor, clicks compile, and reports errors
  5. Fix errors -- Read error messages (line + description), edit locally, push again. Common errors: "Mismatched input" (indentation), "Could not find function" (typo/version), "Undeclared identifier" (ordering)
  6. Verify on chart -- capture_screenshot for visual check, data_get_strategy_results for strategies
  7. Iterate -- Pull fresh, edit, push, compile, screenshot

Key rule: Always compile after every change. Never claim "done" without a clean compile.

Tools used: capture_screenshot, data_get_strategy_results, plus the pine_pull.js and pine_push.js utility scripts


replay-practice

Trigger: User wants to practice trading or manually backtest in replay mode.

Workflow:

  1. Setup -- chart_set_symbol, chart_set_timeframe, replay_start with a date
  2. Pre-trade analysis -- data_get_ohlcv for historical context, chart_manage_indicator to add studies, capture_screenshot
  3. Step through bars -- replay_step (one bar) or replay_autoplay (continuous). After significant moves, replay_status for current state
  4. Execute trades -- replay_trade with buy/sell/close, replay_status to confirm
  5. Review -- Final replay_status, capture_screenshot, replay_stop. Report total trades, win/loss, net P&L, key lessons

Tips from the skill: Step through 5-10 bars to find setups, then slow down for entry timing. Use draw_shape to mark entry/exit points.

Tools used: chart_set_symbol, chart_set_timeframe, replay_start, replay_step, replay_autoplay, replay_trade, replay_status, replay_stop, data_get_ohlcv, chart_manage_indicator, capture_screenshot, draw_shape


strategy-report

Trigger: User wants a comprehensive report after backtesting a Pine Script strategy.

Workflow:

  1. Gather data:
    • data_get_strategy_results -- overall metrics (net profit, win rate, profit factor, max drawdown, Sharpe ratio, etc.)
    • data_get_trades -- individual trade list (max 20)
    • data_get_equity -- equity curve data points
    • chart_get_state -- current symbol, timeframe, studies
    • symbol_info -- symbol metadata
  2. Capture visuals -- capture_screenshot for both chart and strategy_tester regions
  3. Analyze:
    • Key metrics: net profit, total trades, win rate, profit factor (target > 1.5), max drawdown, average trade, Sharpe ratio, max consecutive losses
    • Trade analysis: largest winner/loser, average winner vs. loser (reward:risk), long vs. short breakdown
    • Equity curve: smoothness, drawdown periods, consistency
  4. Generate structured report with summary, metrics table, strengths, weaknesses, and recommendations
  5. Suggest improvements based on findings (e.g., if win rate < 50% but profit factor > 1, suggest tighter entries)

Tools used: data_get_strategy_results, data_get_trades, data_get_equity, chart_get_state, symbol_info, capture_screenshot


Agents

performance-analyst

File: agents/performance-analyst.md

Model: Sonnet

Tool access: All tools ("*")

The performance-analyst is an autonomous agent (not a skill) that gathers TradingView strategy data and provides thorough analysis without step-by-step user interaction.

Data gathering: Calls data_get_strategy_results, data_get_trades, data_get_equity, chart_get_state, and capture_screenshot.

Analysis framework:

Dimension What It Evaluates
Profitability Net profit, profit factor, average trade
Consistency Win rate, max consecutive losses, equity curve smoothness
Risk Max drawdown, worst trade, risk-adjusted returns
Edge quality Whether the edge is robust or fragile -- high win rate with tiny winners vs. low win rate with big winners

Output: A structured report with summary (2-3 sentences), key metrics table, strengths and weaknesses, and specific actionable recommendations.


Skills vs. Agents

Skills Agents
Execution Claude Code follows the steps interactively Runs autonomously to completion
Model Uses the current conversation model Can specify a different model (e.g., Sonnet)
Interaction Step-by-step with user feedback Gathers data and reports back
Trigger Slash command or natural language match Invoked programmatically or by name
Tool access Whatever tools the steps reference Configured via tools field in frontmatter