/tradecraft:xtrading-analyzefrom tradecraft
Runs a 6-layer autonomous trading AI pipeline: fetches live MT5 data, generates charts, and executes multi-agent market analysis with trade psychology coaching. For comprehensive market scans and trading reports.
Ships in tradecraft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Skill: Xtrading Analyze | Domain: trading | Category: infrastructure | Level: advanced Tags:
trading,infrastructure,analysis,multi-strategy,scanner,autonomous
You are the trading analysis brain powered by a 6-layer autonomous system:
L6: MULTI-AGENT SYSTEM (7 specialized agents + supervisor)
L5: COGNITIVE LAYER (hypothesis → plan → reflect)
L4: SELF-IMPROVEMENT (telemetry → evolve → A/B test)
L3: TRADING BRAIN (7-layer state machine, 1,266 lines)
L2: 42 SUPER SKILLS (fused capabilities)
L1: ~265 MICRO SKILLS (granular tools)
Before anything else, check previous recommendations accuracy:
cd C:/Users/Mamoud/Desktop/Xtrading && python -c "
from history import score_history, get_history_summary
import MetaTrader5 as mt5
mt5.initialize()
prices = {}
for sym, mt5sym in [('XAUUSD','XAUUSDm'),('US100','USTECm'),('US30','US30m'),('US500','US500m')]:
tick = mt5.symbol_info_tick(mt5sym)
if tick: prices[sym] = round((tick.bid + tick.ask)/2, 2)
mt5.shutdown()
print('CURRENT PRICES:', prices)
print()
print(score_history(prices))
print()
print('=== HISTORY ===')
print(get_history_summary())
"
Show the user accuracy results first. Be transparent about what was right and wrong. Feed past mistakes into the trade-psychology-coach memory for pattern learning.
Run the data fetcher (auto-deletes old PNGs/JSONs, keeps history.json):
cd C:/Users/Mamoud/Desktop/Xtrading && python fetch_market_data.py
This outputs a JSON file path. Read that JSON file.
Read all chart images generated in C:/Users/Mamoud/Desktop/Xtrading/reports/ for visual analysis.
Always show at minimum the 4H (big picture) and 15M (entry timing) for each instrument.
For each instrument, execute the full pipeline mentally:
Use these super skills to assess market state:
| Super Skill | What to Assess |
|---|---|
market-regime-classifier | Regime: trending/ranging/volatile/quiet |
liquidity-analysis | Liquidity zones, order blocks, stop hunts |
market-structure-intelligence | BOS/CHoCH, Wyckoff phase, supply/demand |
session-intelligence | Active session, killzone, session bias |
macro-intelligence | DXY, yields, event calendar, macro bias |
market-sentiment-intelligence | COT positioning, retail sentiment, news impact |
Based on regime, select the best strategy super skills:
| Regime | Primary Strategy Super Skill |
|---|---|
| Trending | trend-strategy-engine |
| Ranging | mean-reversion-super |
| Volatile breakout | breakout-strategy-super |
| Liquidity trap | ict-smart-money |
| Session-specific | session-strategy-engine |
Generate precise entries using signal super skills:
price-action-engine — candle patterns, structure, zonespattern-recognition-engine — harmonics, Elliott, Fibonacciindicator-signal-engine — RSI, MACD, Ichimoku, pivotsmulti-timeframe-signal-engine — MTF confluence scoringchart-vision-engine — visual pattern recognition from chartsCombine signals using ai-signal-engine:
Before any recommendation, run through risk engine:
risk-and-portfolio — lot size for account risk %drawdown-protection-engine — drawdown state checktail-risk-engine — black swan protectioncorrelation-risk-engine — portfolio correlation checkFor each trade setup:
execution-cost-engine — spread/slippage estimateBefore writing the report, form explicit hypotheses:
Hypothesis 1: "XAUUSD London breakout likely — liquidity sweep detected below PDL"
Hypothesis 2: "US100 mean reversion setup — 3 legs down, extended below BB"
Hypothesis 3: "US30 continuation — clean trend, holding prior bar lows"
Score each hypothesis using the multi-variable rubric from your skills.
Structured report with:
After giving your analysis, save recommendations:
cd C:/Users/Mamoud/Desktop/Xtrading && python -c "
from history import append_run
prices = {'XAUUSD': <price>, 'US100': <price>, 'US30': <price>, 'US500': <price>}
recommendations = [
{'symbol': '...', 'direction': 'SELL/BUY', 'entry': ..., 'sl': ..., 'tp1': ..., 'tp2': ..., 'rr': ..., 'conviction': 'HIGH/MEDIUM/LOW', 'bias': '...', 'strategy': '...', 'confidence': 0.0, 'notes': '...'},
...
]
run_id = append_run(recommendations, prices)
print(f'Saved Run #{run_id}')
"
cd C:/Users/Mamoud/Desktop/Xtrading && python build_visual_report.py
Record this analysis run for the self-improvement engine:
cd C:/Users/Mamoud/.claude/skills && python -c "
from skill_telemetry import log_execution
log_execution('xtrading-analyze', execution_time_ms=0, confidence=0.0, success=True, input_hash='scan_run', output_quality=0.0)
print('Telemetry logged')
"
xtrading-analyze
│
├── Step 1: History Review (learning feedback)
├── Step 2-3: Data Fetch + Charts (market-data-engine)
├── Step 4: 7-Layer Pipeline
│ ├── L1: Market Intel (6 super skills in parallel)
│ ├── L2: Strategy Selection (regime-based)
│ ├── L3: Signal Generation (5 signal super skills)
│ ├── L4: Signal Aggregation (ai-signal-engine)
│ ├── L5: Risk Validation (4 risk super skills)
│ ├── L6: Execution Planning
│ └── L7: Learning Loop
├── Step 5: Cognitive Hypotheses
├── Step 6: Report Generation
├── Step 7: History Save
├── Step 8: Visual Dashboard
└── Step 9: Telemetry Log
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub mahmoud20138/tradecraft --plugin tradecraft169 skills in this plugin
/agent-developmentThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins./agentic-storageAgentic storage architecture — persistent memory for AI agents using MCP, immutable versioning, sandboxing, and intent validation. Covers the stateless problem in LLM agents, RAG limitations (read-only), MCP protocol (JSON-RPC, resources, tools), storage safety layers, and agent file system design. Source: IBM Technology (Martin Keen), March 2026. Use this skill for "agentic storage", "agent memory", "persistent agent state", "MCP storage", "agent file system", "agent hard drive", "stateless agent problem", "agent work product", "immutable versioning", "agent sandboxing", "intent validation", "agent safety layers", "agent context window limits", "storage for AI agents", "agent persistence", "autonomous agent storage", "agent audit trail". Works with mcp-integration, trading-brain, agents, trade-psychology-coach.
Other plugins' skills for the same job