paulpas/agent-skill-router/data-enrichment

Claude Code and agent skill by paulpas/agent-skill-router

Trust tier 2
  • community
  • ext:[{"type":"context","description":"Custom context provider definitions"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

'"Provides Data enrichment techniques for adding context to raw trading

Install

npx vskill@latest install paulpas/agent-skill-router/data-enrichment

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as paulpas/agent-skill-router/data-enrichment.

Role: Add contextual information to raw data for better decision making

Philosophy: Raw data lacks context; enrichment transforms numbers into insights for smarter trading

Key Principles

  1. Reference Data Integration: Add symbol metadata, corporate actions, sector info
  2. Market Context: Incorporate index data, volatility indexes, macro indicators
  3. Event-Driven Enrichment: Add news, earnings, and corporate event data
  4. Derived Features: Calculate ratios, correlations, and relative strength
  5. Data Quality Scoring: Tag enriched data with confidence levels

Implementation Guidelines

Structure
  • Core logic: enrichment/enricher.py
  • Context providers: enrichment/context_providers.py
  • Tests: tests/test_data_enrichment.py
Patterns to Follow
  • Use dependency injection for context providers
  • Implement enrichment pipelines for complex transformations
  • Support asynchronous enrichment for external sources
  • Track enrichment quality metrics

Adherence Checklist

Before completing your task, verify:

  • [ ] Enrichment sources are configurable
  • [ ] Data quality scores are calculated
  • [ ] Enrichment latency is monitored
  • [ ] Fallback values are provided when context unavailable
  • [ ] Enrichment history is tracked

Relative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.

Python Implementation

python
import time
from typing import Dict, List, Optional, Any, Callable
from dataclasses import dataclass, field
from enum import Enum
import logging
class EnrichmentType(Enum):
REFERENCE = "reference" # Symbol metadata, sector, etc.
MARKET = "market" # Index data, volatility
EVENT = "event" # Earnings, news, splits
DERIVED = "derived" # Ratios, correlations
@dataclass
class EnrichmentSource:
"""Configuration for an enrichment source."""
name: str
source_type: EnrichmentType
enabled: bool = True
timeout_seconds: float = 5.0
@dataclass
class EnrichmentResult:
"""Result of data enrichment."""
original_data: Dict[str, Any]
enriched_data: Dict[str, Any]
quality_score: float = 1.0 # 0-1
enrichment_log: List[Dict] = field(default_factory=list)
class EnrichmentPipeline:
"""Pipeline for applying multiple enrichments to data."""
def __init__(self):
self.sources: Dict[str, EnrichmentSource] = {}
self.providers: Dict[str, Callable] = {}
self._initialize_default_sources()
def _initialize_default_sources(self):
"""Initialize default enrichment sources."""
self.register_source(EnrichmentSource(
name="symbol_metadata",
source_type=EnrichmentType.REFERENCE
))
self.register_source(EnrichmentSource(
name="market_indices",
source_type=EnrichmentType.MARKET
))
self.register_source(EnrichmentSource(
name="news_events",
source_type=EnrichmentType.EVENT
))
self.register_source(EnrichmentSource(
name="technical_ratios",
source_type=EnrichmentType.DERIVED
))
def register_source(self, source: EnrichmentSource):
"""Register an enrichment source."""
self.sources[source.name] = source
def register_provider(self, source_name: str, provider_func: Callable):
"""Register enrichment provider function."""
self.providers[source_name] = provider_func
def enrich(
self,
data: Dict[str, Any],
sources: Optional[List[str]] = None
) -> EnrichmentResult:
"""Apply enrichments to data."""
result = EnrichmentResult(
original_data=data.copy(),
enriched_data=data.copy()
)
sources_to_apply = sources or list(self.sources.keys())
total_sources = len(sources_to_apply)
successful = 0
for source_name in sources_to_apply:
if source_name not in self.sources:
continue
source = self.sources[source_name]
if not source.enabled:
result.enrichment_log.append({
"source": source_name,
"status": "skipped",
"reason": "disabled"
})
continue
if source_name not in self.providers:
result.enrichment_log.append({
"source": source_name,
"status": "failed",
"reason": "no provider registered"
})
continue
try:
enrichment_start = time.time()
enrichment = self.providers[source_name](data, source_name)
enrichment_duration = time.time() - enrichment_start
if enrichment is not None:
result.enriched_data.update(enrichment)
result.enrichment_log.append({
"source": source_name,
"status": "success",
"duration_seconds": enrichment_duration,
"keys_added": len(enrichment)
})
successful += 1
else:
result.enrichment_log.append({
"source": source_name,
"status": "skipped",
"reason": "provider returned None"
})
except Exception as e:
result.enrichment_log.append({
"source": source_name,
"status": "failed",
"error": str(e)
})
# Calculate quality score
if total_sources > 0:
result.quality_score = successful / total_sources
return result
def enrich_batch(
self,
data_list: List[Dict[str, Any]],
sources: Optional[List[str]] = None
) -> List[EnrichmentResult]:
"""Enrich a batch of data items."""
return [self.enrich(data, sources) for data in data_list]
class SymbolEnricher:
"""Enriches data with symbol-specific information."""
def __init__(self):
self.symbols: Dict[str, Dict[str, Any]] = {}
self._initialize_symbols()
def _initialize_symbols(self):
"""Initialize default symbol metadata."""
self.symbols.update({
"AAPL": {
"name": "Apple Inc.",
"sector": "Technology",
"industry": "Consumer Electronics",
"currency": "USD",
"market_cap": 2500000000000,
"country": "USA",
"is_etf": False,
"leverage": 1.0
},
"SPY": {
"name": "SPDR S&P 500 ETF",
"sector": "ETF",
"industry": "Equity ETF",
"currency": "USD",
"market_cap": 400000000000,
"country": "USA",
"is_etf": True,
"leverage": 1.0
}
})
def register_symbol(self, symbol: str, metadata: Dict[str, Any]):
"""Register metadata for a symbol."""
self.symbols[symbol] = metadata
def enrich_symbol(
self,
data: Dict[str, Any],
source_name: str
) -> Optional[Dict[str, Any]]:
"""Enrich data with symbol metadata."""
symbol = data.get("symbol") or data.get("symbol_name")
if not symbol:
return None
if symbol not in self.symbols:
return None
metadata = self.symbols[symbol]
enrichment = {}
for key, value in metadata.items():
enrichment[f"{source_name}.{key}"] = value
# Add derived fields
if "is_etf" in metadata:
enrichment[f"{source_name}.is_equity"] = not metadata["is_etf"]
if "sector" in metadata:
enrichment[f"{source_name}.sector_group"] = self._get_sector_group(metadata["sector"])
return enrichment
def _get_sector_group(self, sector: str) -> str:
"""Get sector group from sector."""
sector_groups = {
"Technology": "Technology",
"Communication": "Communication",
"Consumer Discretionary": "Consumer",
"Consumer Staples": "Consumer",
"Healthcare": "Healthcare",
"Financials": "Financial",
"Industrials": "Industrials",
"Utilities": "Utilities",
"Energy": "Energy",
"Materials": "Materials",
"Real Estate": "Real Estate"
}
return sector_groups.get(sector, "Other")
class MarketContextEnricher:
"""Enriches data with market context."""
def __init__(self):
self.indices: Dict[str, Dict[str, float]] = {}
self._initialize_indices()
def _initialize_indices(self):
"""Initialize market indices."""
self.indices.update({
"SPY": {"price": 450.0, "volatility_20d": 0.015, "volume": 100000000},
"QQQ": {"price": 350.0, "volatility_20d": 0.020, "volume": 80000000},
"VIX": {"price": 15.0, "description": "Low volatility"}
})
def enrich_market_context(
self,
data: Dict[str, Any],
source_name: str
) -> Optional[Dict[str, Any]]:
"""Enrich data with market context."""
symbol = data.get("symbol")
if not symbol:
return None
enrichment = {}
# Calculate relative strength to market
if "close" in data and "SPY" in self.indices:
spy_close = self.indices["SPY"]["price"]
market_return = (spy_close - 440) / 440 if spy_close > 0 else 0
stock_return = (data["close"] - data.get("open", data["close"])) / data.get("open", data["close"])
enrichment[f"{source_name}.relative_strength"] = stock_return - market_return
# Add index correlation estimates
for index_name, index_data in self.indices.items():
enrichment[f"{source_name}.{index_name}_price"] = index_data["price"]
enrichment[f"{source_name}.{index_name}_volatility"] = index_data["volatility_20d"]
# Market state
if "VIX" in self.indices:
vix = self.indices["VIX"]["price"]
enrichment[f"{source_name}.market_state"] = self._get_market_state(vix)
return enrichment
def _get_market_state(self, vix: float) -> str:
"""Determine market state based on VIX."""
if vix > 30:
return "high_volatility"
elif vix > 20:
return "moderate_volatility"
else:
return "low_volatility"

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2
7-day trend score
5

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 30 Apr 2026, 7 months ago.

Extension points

  • contextCustom context provider definitions

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/paulpas/agent-skill-router/data-enrichment/badge)](https://verified-skill.com/skills/paulpas/agent-skill-router/data-enrichment)

Something wrong with this skill or its page? Tell us.