cryptocurrency-trader
Production-grade AI trading agent for cryptocurrency markets with advanced mathematical modeling, multi-layer validation, probabilistic analysis, and zero-hallucination tolerance. Implements Bayesian inference, Monte Carlo simulations, advanced risk metrics (VaR, CVaR, Sharpe), chart pattern recognition, and comprehensive cross-verification for real-world trading application.
What this skill does
# Cryptocurrency Trading Agent Skill
## Purpose
Provide production-grade cryptocurrency trading analysis with mathematical rigor, multi-layer validation, and comprehensive risk assessment. Designed for real-world trading application with zero-hallucination tolerance through 6-stage validation pipeline.
## When to Use This Skill
Use this skill when users request:
- Analysis of specific cryptocurrency trading pairs (e.g., BTC/USDT, ETH/USDT)
- Market scanning to find best trading opportunities
- Comprehensive risk assessment with probabilistic modeling
- Trading signals with advanced pattern recognition
- Professional risk metrics (VaR, CVaR, Sharpe, Sortino)
- Monte Carlo simulations for scenario analysis
- Bayesian probability calculations for signal confidence
## Core Capabilities
### Validation & Accuracy
- 6-stage validation pipeline with zero-hallucination tolerance
- Statistical anomaly detection (Z-score, IQR, Benford's Law)
- Cross-verification across multiple timeframes
- 14 circuit breakers to prevent invalid signals
### Analysis Methods
- Bayesian inference for probability calculations
- Monte Carlo simulations (10,000 scenarios)
- GARCH volatility forecasting
- Advanced chart pattern recognition
- Multi-timeframe consensus (15m, 1h, 4h)
### Risk Management
- Value at Risk (VaR) and Conditional VaR (CVaR)
- Risk-adjusted metrics (Sharpe, Sortino, Calmar)
- Kelly Criterion position sizing
- Automated stop-loss and take-profit calculation
**Detailed capabilities:** See `references/advanced-capabilities.md`
## Prerequisites
Ensure the following before using this skill:
1. Python 3.8+ environment available
2. Internet connection for real-time market data
3. Required packages installed: `pip install -r requirements.txt`
4. User's account balance known for position sizing
## How to Use This Skill
### Quick Start Commands
**Analyze a specific cryptocurrency:**
```bash
python skill.py analyze BTC/USDT --balance 10000
```
**Scan market for best opportunities:**
```bash
python skill.py scan --top 5 --balance 10000
```
**Interactive mode for exploration:**
```bash
python skill.py interactive --balance 10000
```
### Default Parameters
- **Balance:** If not specified by user, use `--balance 10000`
- **Timeframes:** 15m, 1h, 4h (automatically analyzed)
- **Risk per trade:** 2% of balance (enforced by default)
- **Minimum risk/reward:** 1.5:1 (validated by circuit breakers)
### Common Trading Pairs
Major: BTC/USDT, ETH/USDT, BNB/USDT, SOL/USDT, XRP/USDT
AI Tokens: RENDER/USDT, FET/USDT, AGIX/USDT
Layer 1: ADA/USDT, AVAX/USDT, DOT/USDT
Layer 2: MATIC/USDT, ARB/USDT, OP/USDT
DeFi: UNI/USDT, AAVE/USDT, LINK/USDT
Meme: DOGE/USDT, SHIB/USDT, PEPE/USDT
### Workflow
1. **Gather Information**
- Ask user for trading pair (if analyzing specific symbol)
- Ask for account balance (or use default $10,000)
- Confirm user wants production-grade analysis
2. **Execute Analysis**
- Run appropriate command (analyze, scan, or interactive)
- Wait for comprehensive analysis to complete
- System automatically validates through 6 stages
3. **Present Results**
- Display trading signal (LONG/SHORT/NO_TRADE)
- Show confidence level and execution readiness
- Explain entry, stop-loss, and take-profit prices
- Present risk metrics and position sizing
- Highlight validation status (6/6 passed = execution ready)
4. **Interpret Output**
- Reference `references/output-interpretation.md` for detailed guidance
- Translate technical metrics into user-friendly language
- Explain risk/reward in simple terms
- Always include risk warnings
5. **Handle Edge Cases**
- If execution_ready = NO: Explain validation failures
- If confidence <40%: Recommend waiting for better opportunity
- If circuit breakers triggered: Explain specific issue
- If network errors: Suggest retry with exponential backoff
### Output Structure
**Trading Signal:**
- Action: LONG/SHORT/NO_TRADE
- Confidence: 0-95% (integer only, no false precision)
- Entry Price: Recommended entry point
- Stop Loss: Risk management exit (always required)
- Take Profit: Profit target
- Risk/Reward: Minimum 1.5:1 ratio
**Probabilistic Analysis:**
- Bayesian probabilities (bullish/bearish)
- Monte Carlo profit probability
- Signal strength (WEAK/MODERATE/STRONG)
- Pattern bias confirmation
**Risk Assessment:**
- VaR and CVaR (Value at Risk metrics)
- Sharpe/Sortino/Calmar ratios
- Max drawdown and win rate
- Profit factor
**Position Sizing:**
- Standard (2% risk rule) - recommended
- Kelly Conservative - mathematically optimal
- Kelly Aggressive - higher risk/reward
- Trading fees estimate
**Validation Status:**
- Stages passed (must be 6/6 for execution ready)
- Circuit breakers triggered (if any)
- Warnings and critical failures
**Detailed interpretation:** See `references/output-interpretation.md`
## Presenting Results to Users
### Language Guidelines
Use beginner-friendly explanations:
- "LONG" → "Buy now, sell higher later"
- "SHORT" → "Sell now, buy back cheaper later"
- "Stop Loss" → "Automatic exit to limit loss if wrong"
- "Confidence %" → "How certain we are (higher = better)"
- "Risk/Reward" → "For every $1 risked, potential $X profit"
### Required Risk Warnings
ALWAYS include these reminders:
- Markets are unpredictable - perfect analysis can still be wrong
- Start with small amounts to learn
- Never risk more than 2% per trade (enforced automatically)
- Always use stop losses
- This is analysis, NOT financial advice
- Past performance does NOT guarantee future results
- User is solely responsible for all trading decisions
### When NOT to Trade
Advise users to avoid trading when:
- Validation status <6/6 passed
- Execution Ready flag = NO
- Confidence <60% for moderate signals, <70% for strong
- User doesn't understand the analysis
- User can't afford potential loss
- High emotional stress or fatigue
## Advanced Usage
### Programmatic Integration
For custom workflows, import directly:
```python
from scripts.trading_agent_refactored import TradingAgent
agent = TradingAgent(balance=10000)
analysis = agent.comprehensive_analysis('BTC/USDT')
print(analysis['final_recommendation'])
```
See `example_usage.py` for 5 comprehensive examples.
### Configuration
Customize behavior via `config.yaml`:
- Validation strictness (strict vs normal mode)
- Risk parameters (max risk, position limits)
- Circuit breaker thresholds
- Timeframe preferences
### Testing
Verify installation and functionality:
```bash
# Run compatibility test
./test_claude_code_compat.sh
# Run comprehensive tests
python -m pytest tests/
```
## Reference Documentation
- `references/advanced-capabilities.md` - Detailed technical capabilities
- `references/output-interpretation.md` - Comprehensive output guide
- `references/optimization.md` - Trading optimization strategies
- `references/protocol.md` - Usage protocols and best practices
- `references/psychology.md` - Trading psychology principles
- `references/user-guide.md` - End-user documentation
- `references/technical-docs/` - Implementation details and bug reports
## Architecture
**Core Modules:**
- `scripts/trading_agent_refactored.py` - Main trading agent (production)
- `scripts/advanced_validation.py` - Multi-layer validation system
- `scripts/advanced_analytics.py` - Probabilistic modeling engine
- `scripts/pattern_recognition_refactored.py` - Chart pattern recognition
- `scripts/indicators/` - Technical indicator calculations
- `scripts/market/` - Data provider and market scanner
- `scripts/risk/` - Position sizing and risk management
- `scripts/signals/` - Signal generation and recommendation
**Entry Points:**
- `skill.py` - Command-line interface (recommended)
- `__main__.py` - Python module invocation
- `example_usage.py` - Programmatic usage examples
## Version
**v2.0.1 - Production Hardened Edition**
Recent improvements:
- Fixed critical bugs (division by zero, import paths, NaN handling)
- Enhanced nRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.