Smart Skill Router
Architecture
User Request
|
v
+------------------+
| Query Analyzer | <-- Extract intent, domain, keywords
+------------------+
|
v
+------------------+
| Skill Matcher | <-- skills_index.json (instant lookup)
+------------------+
|
v
+------------------+
| Ranking Engine | <-- Score: relevance + tags + priority + deps
+------------------+
|
v
+------------------+
| Dependency | <-- skills_graph.json (load prerequisites)
| Resolver |
+------------------+
|
v
+------------------+
| Bundle Detector | <-- If query spans a bundle, activate it
+------------------+
|
v
Execute Top Skills (max 3-5 concurrently)
Quick Usage
From Python
import sys
sys.path.insert(0, r'C:\Users\Mamoud\.claude\skills')
from skill_router import find_skill, route_query, resolve_deps, get_bundle
# Search by keyword
results = find_skill("liquidity")
# Search by tags
results = find_skill(tags=["orderflow", "liquidity"])
# Full routing with scoring
top_skills = route_query("analyze liquidity trap on EURUSD H1")
# Dependency chain
deps = resolve_deps("ict-smart-money")
# Get a bundle
bundle = get_bundle("scalping")
From CLI
python C:\Users\Mamoud\.claude\skills\skill_router.py search "breakout strategy"
python C:\Users\Mamoud\.claude\skills\skill_router.py route "analyze smart money on gold"
python C:\Users\Mamoud\.claude\skills\skill_router.py deps ict-smart-money
python C:\Users\Mamoud\.claude\skills\skill_router.py bundle scalping
python C:\Users\Mamoud\.claude\skills\skill_router.py stats
python C:\Users\Mamoud\.claude\skills\skill_router.py info risk-and-portfolio
Scoring Formula
score = relevance + tag_match + dependency_bonus + priority - overlap_penalty
Where:
relevance = keyword match in name (+10) or description (+5)
tag_match = keyword match in tags (+8 per tag)
dependency_bonus = +3 if a matched skill depends on this one
priority = skill priority value (1-10)
overlap_penalty = -2 if another higher-scoring skill covers same topic
Predefined Bundles
| Bundle |
Skills |
Use When |
| scalping |
session-scalping, order-flow-delta, liquidity-analysis, scalping-framework, trendline-sr-vision |
Fast intraday trades |
| quant |
statistics-timeseries, backtesting-sim, monte-carlo, strategy-validation, vectorized-backtester |
Quantitative analysis |
| risk |
risk-and-portfolio, risk-of-ruin, tail-risk-hedging, drawdown-playbook, drawdown-recovery |
Risk assessment |
| smc |
ict-smc, ict-smart-money, ict-smart-money, liquidity-order-flow-mapper, smart-money-trap-detector, market-structure-bos-choch |
Smart money analysis |
| chart-vision |
chart-vision, chart-vision-ai, chart-vision-renderer, chart-annotation-overlay, chart-image-preprocessor, trendline-sr-vision |
Chart image analysis |
| mean-reversion |
mean-reversion-engine, mean-reversion-oscillators, capitulation-mean-reversion, divergence-strategy-engine |
Fade/reversion trades |
| trend |
trend-following-systems, trend-breakout, breakout-strategy-engine, ma-ribbon-strategy, ichimoku-complete |
Trend following |
| news |
news-intelligence, news-sentiment, news-sentiment-nlp-engine, social-sentiment-scraper, economic-calendar |
News/sentiment analysis |
| portfolio |
portfolio-optimization, portfolio-optimizer, portfolio-allocation, portfolio-optimization |
Portfolio construction |
| mt5 |
mt5-ea-code-generator, mt5-chart-browser, mt5-integration, mt5-integration, ea-code-generator |
MT5 development |
| session |
session-profiler, session-trading, session-scalping, session-scalping, session-breakout-strategies |
Session-based trading |
| fibonacci |
fibonacci-strategy-engine, fibonacci-harmonic-wave, harmonic-pattern-engine, elliott-wave-engine |
Fib/harmonic analysis |
| azure |
azure-ai, azure-deploy, azure-prepare, azure-diagnostics, azure-compute, ... (18 skills) |
Azure cloud work |
Auto-Selection Protocol
When the user makes a request:
- Extract keywords from the request
- Run
route_query() to get ranked skills
- Check if a bundle applies — if 3+ skills from one bundle match, activate the full bundle
- Resolve dependencies for the top skills
- Execute in order: dependencies first, then primary skills
- Record usage via skill_health.py
Files
| File |
Purpose |
skills_index.json |
Compiled index of all 265 skills (instant lookup) |
skills_graph.json |
Dependency graph, bundles, hierarchy |
skill_router.py |
Search, route, resolve CLI + importable module |
skill_health.py |
Usage tracking, confidence scoring |
skill_cache.py |
Result caching for expensive operations |
skill_usage.json |
Persistent usage statistics |
SKILLS_MAP.md |
Human-readable documentation |
1---2name: smart-skill-router3description: Intelligent skill routing, auto-selection, dependency resolution, and bundle execution for the entire 265+ skill ecosystem. The brain that decides which skills to run, in what order, with what priority. Uses skills_index.json for instant lookup, skills_graph.json for dependency chains, and skill_router.py for scoring/ranking. Use this skill for "which skill should I use", "find skill for", "route to skill", "skill search", "skill lookup", "auto select skill", "run skill bundle", "skill dependencies", "skill graph", "skill stats", "how many skills", "list skills for", "best skill for". This is the ENTRY POINT for all skill-related routing decisions.4---56# Smart Skill Router78## Architecture910```11User Request12 |13 v14+------------------+15| Query Analyzer | <-- Extract intent, domain, keywords16+------------------+17 |18 v19+------------------+20| Skill Matcher | <-- skills_index.json (instant lookup)21+------------------+22 |23 v24+------------------+25| Ranking Engine | <-- Score: relevance + tags + priority + deps26+------------------+27 |28 v29+------------------+30| Dependency | <-- skills_graph.json (load prerequisites)31| Resolver |32+------------------+33 |34 v35+------------------+36| Bundle Detector | <-- If query spans a bundle, activate it37+------------------+38 |39 v40Execute Top Skills (max 3-5 concurrently)41```4243## Quick Usage4445### From Python46```python47import sys48sys.path.insert(0, r'C:\Users\Mamoud\.claude\skills')49from skill_router import find_skill, route_query, resolve_deps, get_bundle5051# Search by keyword52results = find_skill("liquidity")5354# Search by tags55results = find_skill(tags=["orderflow", "liquidity"])5657# Full routing with scoring58top_skills = route_query("analyze liquidity trap on EURUSD H1")5960# Dependency chain61deps = resolve_deps("ict-smart-money")6263# Get a bundle64bundle = get_bundle("scalping")65```6667### From CLI68```bash69python C:\Users\Mamoud\.claude\skills\skill_router.py search "breakout strategy"70python C:\Users\Mamoud\.claude\skills\skill_router.py route "analyze smart money on gold"71python C:\Users\Mamoud\.claude\skills\skill_router.py deps ict-smart-money72python C:\Users\Mamoud\.claude\skills\skill_router.py bundle scalping73python C:\Users\Mamoud\.claude\skills\skill_router.py stats74python C:\Users\Mamoud\.claude\skills\skill_router.py info risk-and-portfolio75```7677## Scoring Formula7879```80score = relevance + tag_match + dependency_bonus + priority - overlap_penalty8182Where:83 relevance = keyword match in name (+10) or description (+5)84 tag_match = keyword match in tags (+8 per tag)85 dependency_bonus = +3 if a matched skill depends on this one86 priority = skill priority value (1-10)87 overlap_penalty = -2 if another higher-scoring skill covers same topic88```8990## Predefined Bundles9192| Bundle | Skills | Use When |93|--------|--------|----------|94| **scalping** | session-scalping, order-flow-delta, liquidity-analysis, scalping-framework, trendline-sr-vision | Fast intraday trades |95| **quant** | statistics-timeseries, backtesting-sim, monte-carlo, strategy-validation, vectorized-backtester | Quantitative analysis |96| **risk** | risk-and-portfolio, risk-of-ruin, tail-risk-hedging, drawdown-playbook, drawdown-recovery | Risk assessment |97| **smc** | ict-smc, ict-smart-money, ict-smart-money, liquidity-order-flow-mapper, smart-money-trap-detector, market-structure-bos-choch | Smart money analysis |98| **chart-vision** | chart-vision, chart-vision-ai, chart-vision-renderer, chart-annotation-overlay, chart-image-preprocessor, trendline-sr-vision | Chart image analysis |99| **mean-reversion** | mean-reversion-engine, mean-reversion-oscillators, capitulation-mean-reversion, divergence-strategy-engine | Fade/reversion trades |100| **trend** | trend-following-systems, trend-breakout, breakout-strategy-engine, ma-ribbon-strategy, ichimoku-complete | Trend following |101| **news** | news-intelligence, news-sentiment, news-sentiment-nlp-engine, social-sentiment-scraper, economic-calendar | News/sentiment analysis |102| **portfolio** | portfolio-optimization, portfolio-optimizer, portfolio-allocation, portfolio-optimization | Portfolio construction |103| **mt5** | mt5-ea-code-generator, mt5-chart-browser, mt5-integration, mt5-integration, ea-code-generator | MT5 development |104| **session** | session-profiler, session-trading, session-scalping, session-scalping, session-breakout-strategies | Session-based trading |105| **fibonacci** | fibonacci-strategy-engine, fibonacci-harmonic-wave, harmonic-pattern-engine, elliott-wave-engine | Fib/harmonic analysis |106| **azure** | azure-ai, azure-deploy, azure-prepare, azure-diagnostics, azure-compute, ... (18 skills) | Azure cloud work |107108## Auto-Selection Protocol109110When the user makes a request:1111121. **Extract keywords** from the request1132. **Run `route_query()`** to get ranked skills1143. **Check if a bundle applies** — if 3+ skills from one bundle match, activate the full bundle1154. **Resolve dependencies** for the top skills1165. **Execute in order**: dependencies first, then primary skills1176. **Record usage** via skill_health.py118119## Files120121| File | Purpose |122|------|---------|123| `skills_index.json` | Compiled index of all 265 skills (instant lookup) |124| `skills_graph.json` | Dependency graph, bundles, hierarchy |125| `skill_router.py` | Search, route, resolve CLI + importable module |126| `skill_health.py` | Usage tracking, confidence scoring |127| `skill_cache.py` | Result caching for expensive operations |128| `skill_usage.json` | Persistent usage statistics |129| `SKILLS_MAP.md` | Human-readable documentation |