Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generates and analyzes trading strategies from a structured config. Produces runnable JS + portfolio analysis.
.claude/skills/spyderweb47-strategy-skill/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-14 | ✗→✓ | ▲ Improved | -5% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 96% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -21% | 0% |
Take a structured strategy configuration — entry/exit conditions, TP/SL, drawdown limits, seed capital — and produce a runnable JavaScript strategy script that returns {trades, equity}. After the script is backtested, the same skill can analyze the results and suggest concrete improvements.
This skill is the counterpart to the Pattern Skill: instead of finding historical patterns, it trades them (or any other hypothesis).
Vibe Trade should dispatch to the Strategy Skill when the user:
chatbox.card.strategy_builder to show the structured form in the chat
context.strategy_config
context.analyze_results plusthe strategy config to produce an assessment + suggestions
entry rule) — regenerate from the updated config
strategy_config is in context, show the structured form:chatbox.card.strategy_builder to inject the form into the chata runnable strategy for you."
strategy_config is present and mode = "generate" (default):sma() exists)maxAdverseExcursion / maxFavorableExcursion per tradeequity array on every bar (not just on trade events)script_editor.load with the full scriptbottom_panel.activate_tab → portfoliomode = "analyze" (backtest results in context.analyze_results):data.suggestionsstrategy chat (without a structured config) should be handled as a general chat fallback, not by this skill.
| Key | Type | Meaning | |---|---|---| | context.mode | "generate" \| "analyze" | Which operation to run (default: generate) | | context.strategy_config | object | Full strategy config from the form | | context.analyze_results | object | Backtest metrics (analyze mode only) |
strategy_config shape:
js{ entryCondition: string, exitCondition: string, takeProfit: { type: "percentage" | "absolute", value: number }, stopLoss: { type: "percentage" | "absolute", value: number }, maxDrawdown: number, // percent seedAmount: number, // USD specialInstructions: string }
Generate mode:
reply — short confirmation ("Strategy script generated.")script — JavaScript strategy returning {trades, equity}script_type — "strategy"data.config — echoes the config (for persistence)tool_calls — load + activate portfolio tabAnalyze mode:
reply — 2–3 sentence assessmentdata.suggestions — 3–5 improvement suggestionstool_calls — none (analyze is read-only)| Tool | When | Payload | |---|---|---| | chatbox.card.strategy_builder | User wants to build a strategy but no config yet | — | | script_editor.load | Strategy generated | The JS source | | script_editor.run | User asks to backtest immediately | — | | bottom_panel.activate_tab | After generating | "portfolio" | | bottom_panel.set_data | Push analysis data into a tab | {target, data} | | chart.draw_markers | Visualize entry/exit points on the chart | Marker[] | | notify.toast | Status updates ("Backtest complete: 42 trades") | {level, message} |
Generate Config: Entry = SMA(20) > SMA(50), Exit = SMA(20) < SMA(50), TP = 5%, SL = 2%, Max DD = 20%, Seed = $10,000.
→ Returns a strategy script with inline sma() helper, golden-cross entry logic, per-trade PnL + MAE/MFE tracking, equity-curve pushes on every bar. Loads into the editor; bottom panel switches to Portfolio.
Analyze Metrics: 42 trades, 38% win rate, 1.1 profit factor, -18% max drawdown.
→ "Marginal profitability, asymmetric losses are hurting overall returns." Suggestions: tighten stop to 1.5%, add an ATR volatility filter, require ADX > 25 for trend regime, etc.
Wired through core/agents/processors.py::_strategy_processor, which calls core/agents/strategy_agent.py::StrategyAgent.generate_from_config or .analyze_results depending on context.mode. The agent owns STRATEGY_GENERATE_PROMPT and STRATEGY_ANALYSIS_PROMPT.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | pass→fail | 15,672 | 8,417 | -46% | 1 | 1 | 0% | 3,699 | 3,075 | -17% | 0 | 0 | — |
case-01 | fail→fail | 6,849 | 1,387 | -80% | 1 | 1 | 0% | 1,415 | 1,575 | +11% | 0 | 0 | — |
case-02 | fail→fail | 16,639 | 12,739 | -23% | 1 | 1 | 0% | 4,675 | 5,250 | +12% | 0 | 0 | — |
case-14 | fail→pass | 16,628 | 9,405 | -43% | 1 | 1 | 0% | 4,051 | 3,843 | -5% | 0 | 0 | — |
case-04 | pass→fail | 4,023 | 3,209 | -20% | 1 | 1 | 0% | 756 | 1,882 | +149% | 0 | 0 | — |
case-05 | pass→pass | 11,672 | 9,476 | -19% | 1 | 1 | 0% | 2,804 | 3,642 | +30% | 0 | 0 | — |
case-06 | fail→pass | 7,322 | 7,212 | -2% | 1 | 1 | 0% | 1,671 | 3,271 | +96% | 0 | 0 | — |
case-07 | fail→fail | 15,438 | 13,193 | -15% | 1 | 1 | 0% | 2,779 | 4,947 | +78% | 0 | 0 | — |
case-08 | fail→fail | 12,171 | 12,817 | +5% | 1 | 1 | 0% | 2,937 | 4,927 | +68% | 0 | 0 | — |
case-09 | fail→pass | 13,112 | 9,725 | -26% | 1 | 1 | 0% | 3,209 | 3,682 | +15% | 0 | 0 | — |
case-10 | pass→pass | 14,328 | 15,618 | +9% | 1 | 1 | 0% | 2,785 | 6,236 | +124% | 0 | 0 | — |
case-11 | fail→fail | 7,371 | 3,668 | -50% | 1 | 1 | 0% | 1,488 | 2,089 | +40% | 0 | 0 | — |
case-12 | fail→pass | 10,336 | 4,668 | -55% | 1 | 1 | 0% | 2,271 | 2,256 | -1% | 0 | 0 | — |
case-13 | pass→pass | 14,935 | 5,745 | -62% | 1 | 1 | 0% | 3,712 | 2,396 | -35% | 0 | 0 | — |
case-15 | fail→pass | 9,141 | 1,602 | -82% | 1 | 1 | 0% | 2,105 | 1,654 | -21% | 0 | 0 | — |
case-16 | fail→pass | 4,603 | 9,614 | +109% | 1 | 1 | 0% | 1,029 | 4,130 | +301% | 0 | 0 | — |
case-17 | pass→pass | 9,584 | 10,781 | +12% | 1 | 1 | 0% | 2,454 | 4,450 | +81% | 0 | 0 | — |
case-18 | pass→pass | 10,913 | 6,084 | -44% | 1 | 1 | 0% | 2,310 | 2,485 | +8% | 0 | 0 | — |
case-19 | pass→pass | 10,505 | 10,904 | +4% | 1 | 1 | 0% | 2,772 | 4,424 | +60% | 0 | 0 | — |
case-20 | fail→fail | 5,992 | 9,985 | +67% | 1 | 1 | 0% | 1,379 | 4,326 | +214% | 0 | 0 | — |
case-21 | pass→pass | 7,751 | 4,643 | -40% | 1 | 1 | 0% | 1,457 | 2,259 | +55% | 0 | 0 | — |
case-22 | pass→pass | 8,660 | 16,084 | +86% | 1 | 1 | 0% | 2,158 | 6,165 | +186% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.