Task Router Skill
Task Router
Fetch construction material prices from open APIs. Track price trends, regional variations, and update cost databases.
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
SkillHub CLI
skillhub install datadrivenconstruction/price-apiInspect the source and compatibility requirements, then follow its installation steps.
Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.
Material prices fluctuate constantly. This skill fetches prices from open sources, tracks trends, and updates cost databases with current market data.
import requests
import pandas as pd
from typing import Dict, Any, List, Optional
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from enum import Enum
import json
class MaterialCategory(Enum):
"""Construction material categories."""
CONCRETE = "concrete"
STEEL = "steel"
LUMBER = "lumber"
COPPER = "copper"
ALUMINUM = "aluminum"
CEMENT = "cement"
AGGREGATES = "aggregates"
ASPHALT = "asphalt"
@dataclass
class MaterialPrice:
"""Material price point."""
material: str
price: float
unit: str
currency: str
source: str
date: datetime
region: str = ""
@dataclass
class PriceTrend:
"""Price trend analysis."""
material: str
current_price: float
week_change: float
month_change: float
year_change: float
trend_direction: str # 'up', 'down', 'stable'
class OpenPriceAPI:
"""Client for open material price APIs."""
# Commodity price sources
FRED_BASE = "https://api.stlouisfed.org/fred/series/observations"
# FRED Series IDs for construction commodities
FRED_SERIES = {
'steel': 'WPU101',
'lumber': 'WPS0811',
'concrete': 'WPU133',
'copper': 'PCOPPUSDM',
'aluminum': 'PALUMUSDM'
}
def __init__(self, fred_api_key: Optional[str] = None):
self.fred_api_key = fred_api_key
def get_fred_prices(self, material: str,
start_date: str = None,
end_date: str = None) -> List[MaterialPrice]:
"""Get prices from FRED API."""
if material.lower() not in self.FRED_SERIES:
return []
series_id = s...
These signals come from indexed source analysis and may lag behind changes. Check the current source files.
# Price API for Construction Materials
## Overview
Material prices fluctuate constantly. This skill fetches prices from open sources, tracks trends, and updates cost databases with current market data.
## Python Implementation
```python
import requests
import pandas as pd
from typing import Dict, Any, List, Optional
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from enum import Enum
import json
class MaterialCategory(Enum):
"""Construction material categories."""
CONCRETE = "concrete"
STEEL = "steel"
LUMBER = "lumber"
COPPER = "copper"
ALUMINUM = "aluminum"
CEMENT = "cement"
AGGREGATES = "aggregates"
ASPHALT = "asphalt"
@dataclass
class MaterialPrice:
"""Material price point."""
material: str
price: float
unit: str
currency: str
source: str
date: datetime
region: str = ""
@dataclass
class PriceTrend:
"""Price trend analysis."""
material: str
current_price: float
week_change: float
month_change: float
year_change: float
trend_direction: str # 'up', 'down', 'stable'
class OpenPriceAPI:
"""Client for open material price APIs."""
# Commodity price sources
FRED_BASE = "https://api.stlouisfed.org/fred/series/observations"
# FRED Series IDs for construction commodities
FRED_SERIES = {
'steel': 'WPU101',
'lumber': 'WPS0811',
'concrete': 'WPU133',
'copper': 'PCOPPUSDM',
'aluminum': 'PALUMUSDM'
}
def __init__(self, fred_api_key: Optional[str] = None):
self.fred_api_key = fred_api_key
def get_fred_prices(self, material: str,
start_date: str = None,
end_date: str = None) -> List[MaterialPrice]:
"""Get prices from FRED API."""
if material.lower() not in self.FRED_SERIES:
return []
series_id = s...Task Router
Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...
Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.
OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.